IP address/domain name:
More about ...

PING

Problems with IP-level connectivity? PING helps you to dolve many problems. When troubleshooting ping can be used to send an ICMP echo request to a target host name or IP address. Use ping whenever you need to verify that a host computer can connect to the TCP/IP network and network resources. You can also use ping to isolate network hardware problems and incompatible configurations.
It is usually best to verify that a route exists between the local computer and a network host by first using the ping command and the IP address of the network host to which you want to connect. The syntax of the ping command (the simplest) comes as:
ping IP_address
Whem to use ping ... :
1.

Ping the loopback address

to verify that TCP/IP is installed and configured correctly on the local computer.
ping 127.0.0.1
2. Adding computer to a network. Here ping helps you to see if your machine was

added to the network

correctly.
ping IP_address_of_your_machine
3. Ping the IP address of the default gateway to verify that the default gateway is functioning and that you can communicate with a local host on the local network.
ping IP_address_of_default_gateway
4.

Ping the IP address of a remote host

.In this way you can verify that you can communicate with the remote host.
ping IP_address_of_remote_host
The ping command uses socket to resolve a computer name to an IP address, so if pinging by address succeeds, but pinging by name fails, then the problem comes from computer name, not network connectivity.
Ping works, that means that ....
  • TCP/IP was installed and configured correclty.
  • The IP address of the local computer is valid (see the General tab of the Internet Protocol (TCP/IP) Properties dialog box)
  • IP routing is enabled and the link between routers is operational.
The complete

MS-DOS PING

syntax:

 

 

ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS] [-r count] [-s count] [[-j host-list] | [-k host-list]] [-w timeout] destination-list

 

Where the options are:

  • -t Pings the specified host until stopped.
    To see statistics and continue - type Control-Break;
    To stop - type Control-C.
  • -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.



The complete

Linux/UNIX PING

syntax:

ping -s [-d] [-l] [-L] [-n] [-r] [-R] [-v] [ -i interface_address ] [-I interval] [-t ttl] host [packetsize] [count]

 

Where the options are:

  • -d Set the SO_DEBUG socket option.
  • -l Loose source route. Use this option in the IP header to send the packet to the given host and back again. Usually specified with the -R option.
  • -L Turn off loopback of multicast packets. Normally, if there are members in the host group on the out- going interface, a copy of the multicast packets will be delivered to the local machine.
  • -n Show network addresses as numbers. ping normally displays addresses as host names.
  • -r Bypass the normal routing tables and send directly to a host on an attached network. If the host is not on a directly-attached network, an error is returned. This option can be used to ping a local host through an interface that has been dropped by the router daemon.
  • -R Record route. Sets the IP record route option, which will store the route of the packet inside the IP header. The contents of the record route will only be printed if the -v option is given, and only be set on return packets if the target host preserves the record route option across echos, or the -l option is given.
  • -v Verbose output. List any ICMP packets, other than ECHO_RESPONSE, that are received.
  • -i interface_address Specify the outgoing interface address to use for multicast packets. The default interface address for multicast packets is determined from the (unicast) routing tables.
  • -I interval Specify the interval between successive transmissions. The default is one second.
  • -t ttl Specify the IP time to live for unicast and multicast packets. The default time to live for unicast packets is set with ndd (using the icmp_def_ttl variable). The default time to live for multicast is one hop.
  • host The network host.
  • packetsize Specified size of packetsize. Default is 64.
  • count Amount of times to send the ping request.