Latest Post

Search

Showing posts with label Networking. Show all posts
Showing posts with label Networking. Show all posts

IP Address to a IP Number


How TO convert an IP Address to a IP Number?
IP address (IPV4) is divided into 4 sub-blocks. Each sub-block has a different weight number.

To calculate IP Number the formula is given below
IP Number = 16777216*a + 65536*b + 256*c + d

where
IP Address = a.b.c.d


For example, if IP address is “127.4.5.13“, then its IP Number would be

IP Number = 16777216*127 + 65536*4 + 256*5 + 13
= 2130706432 + 262144 + 1280 + 13
= 2130969869
 

Windows Sockets


Windows Sockets is the mechanism for communication between applicationsrunning on
the same computer or those running on different computers which are connected to a
LAN or WAN. Windows Sockets defines a set of standard API’s that an application uses
to communicate with one or more other applications, usually across a network. Windows
Sockets supports initiating an outbound connection, accepting inbound connections,
sending and receiving data on those connections, and terminating a session.



Windows socket is a port of the Berkeley Sockets API that existed on Unix, with
extensions for integration into the Win16 and Win32 applicationenvironments. Windows
Sockets also includes support for other transports such as IPX/SPX and NetBEUI.
Windows Sockets supports point-to-point connection-oriented communications and
point-to-point or multipoint connectionless communications when using TCP/IP.
Windows Socket communication channels are represented by data structures called
sockets. A socket is identified by an address and a port,
for example;
131.107.2.200:80


A more detailed explanation is here...
Image Credits: burks.bton.ac.uk
 

The Telnet Command

Technically, telnet is a protocol. This means it is a language thatcomputer use to
communicate with one another in a particular way. From your point of view, Telnet is a program that lets you login to a site on the Internet through your connection to Teleport.

It is a terminal emulation program, meaning that when you connect to the remote site,
your computer functions as a terminal for that computer.


Once the connection is made, you can use your computer to access information, run
programs, edit files, and otherwise use whatever resources are available on the other
computer. What is available depends on the computer you connect to. Most of the times, if you type ‘?’ or ‘help’, you would normally receive some type of information, menu options, etc.

Note: telnet connections give you command-line access only. In other words, instead of being able to use buttons and menus as you do with a graphical interface, you have to type commands. However, telnet allows you to use certain utilities and resources you cannot access with your other Internet applications.

Usage: telnet hostname or IP address port(optional)
 

How to use PING


The ping (Packet Internet Groper) is used to send ICMP (Internet Control Message
Protocol) packets from one host to another. Ping transmits packetsusing the ICMP
ECHO_REQUEST command and expects an ICMP ECHO_REPLY.Ping is the primary TCP/IP command used to troubleshoot connectivity, reachability, and name resolution.

Syntax
ping [-t] [-a] [-n Count] [-l Size] [-f] [-i TTL] [-v TOS] [-r Count] [-s Count] [{-j HostList | -k HostList}] [-w Timeout] [TargetName]


Switches:
-t Ping the specifed host until interrupted.
-a Resolve addresses to hostnames.
-n count Number of echo requests to send.
-l size Send buffer size.
-f Set Don’t Fragment flag in packet.
-i TTL Time To Live.
-v TOS Type Of Service.
-r count Record route for count hops.
-s count Timestamp for count hops.
-j host-list Loose source route along host-list.
-k host-list Strict source route along host-list.
-w timeout Timeout in milliseconds to wait for each reply.

Examples
The following example shows ping command output:

C:\>pimg example.microsoft.com

Pinging example.microsoft.com [192.168.239.132] with 32 bytes of data:
Reply from 192.168.239.132: bytes=32 time=101ms TTL=124
Reply from 192.168.239.132: bytes=32 time=100ms TTL=124
Reply from 192.168.239.132: bytes=32 time=120ms TTL=124
Reply from 192.168.239.132: bytes=32 time=120ms TTL=124


To pingthe destination 10.0.99.221 and resolve 10.0.99.221 to itshost name
type: ping -a 10.0.99.221

To ping the destination 10.0.99.221 with 10 Echo Request messages, each of which has a Data field of 1000 bytes, 
type: ping-n 10 -l 1000 10.0.99.221

To ping the destination 10.0.99.221 and record the route for 4 hops,
type: ping-r 4 10.0.99.221

To ping the destination 10.0.99.221 and specify the loose source route of 10.12.0.1-10.29.3.1-10.1.44.1,
type: ping -j 10.12.0.1 10.29.3.1 10.1.44.1 10.0.99.221
 

The Netstat Command


Displays active TCP connections, ports on which the computer is listening, Ethernet statistics, the IP routing table, IPv4 statistics (for the IP, ICMP, TCP, and UDP protocols), and IPv6 statistics (for the IPv6, ICMPv6, TCP over IPv6, and UDP over IPv6 protocols). Used without parameters, netstat displays active TCP connections.

Syntax
netstat [-a] [-e] [-n] [-o] [-p Protocol] [-r] [-s] [Interval]

Switches:
-A Shows the addresses of any associated protocol control blocks.
-a Will show the status of all sockets. Sockets associated with network
server processes are normally not shown.
-I Shows the state of the network interfaces.
-m Prints the network memory usage.
-n Causes netstat to show actual addresses as opposed tohostnames or
network names.
-r Prints the routing table.
-s Tells netstat to show the per protocol statistics.
-t Replaces the queue length information with timer information.




Examples
To display both the Ethernet statistics and the statistics for all protocols, type the following command: netstat -e -s

To display the statistics for only the TCP and UDP protocols, type the following
command: netstat -s -p tcp udp

To display active TCP connections and the process IDs every 5 seconds, type the following command: nbtstat -o 5

To display active TCP connections and the process IDs using numerical form, type the following command: nbtstat -n -o

 
 
Support : everytricks4.blogspot.in/ | Johny Template | Mas Template
Copyright © 2011. Computer Tricks - All Rights Reserved
Creating Website Published by
Proudly powered by Blogger