According to the developer of the PING command, it does not stand for anything
at all. You will find it defined as Packet InterNetwork Grouper. Ping is a
good command to troubleshoot TCP/IP connectivity problems. By pinging an IP
address, you can eliminate any application layer issues and test TCP/IP with
the purest user accessible utility in the application layer.
--------------------------------------------------------------------------------
How does traceroute work?
TCP/IP packets have a field called a TTL (Time-To-Live) which is reduced by
1 every time they are passed thru a router. This is to keep packets from
looping forever in the event their destination cannot be located and become
stuck in a routing loop. When the TTL is reduced to 1, the next router will
drop the packet and send an ICMP message of type 11 / code 0 to source host
specified in the "source ip address" field of the UDP packet. ICMP message
type 11 is "Time Exceeded" and message code 0 is "Time-To-Live Exceeded in
Transit". Windows PING will report "TTL expired in transit" while Linux will
report "Time to live exceeded".
Traceroute works by first sending a ping with a TTL of 1 to the host in which
you are tracing the route to, the first router will drop the packet and send
an ICMP message: "TTL expired in transit" to the ip of the source host (you).
Traceroute then sends another ping with a TTL of 2, this packet is then dropped
by the second router along the path to the packets destination. Traceroute
continues to increase the TTL until the packets successfully reaches the host
specified by the trace.
You can use the Windows ping command to perform your own traceroute by using
the -i switch in windows or -t on BSD and Linux.
Windows Commands:
c:\>ping -i 1 4.2.2.2
c:\>ping -i 2 4.2.2.2
c:\>ping -i 3 4.2.2.2
c:\>ping -i 4 4.2.2.2
c:\>ping -i 5 4.2.2.2
c:\>ping -i 6 4.2.2.2
...
Command Results:
Reply from 192.168.4.1: TTL expired in transit.
Reply from 192.168.1.1: TTL expired in transit.
Reply from 73.9.152.1: TTL expired in transit.
Reply from 68.87.162.1: TTL expired in transit.
Reply from 12.119.213.53: TTL expired in transit.
Reply from 12.123.134.86: TTL expired in transit.
...
This method of course does not provide the timing that traceroute does but it
does teach you about the TTL field, ICMP messages, and how traceroute works.
--------------------------------------------------------------------------------
How To Find the MTU of Routers Along a Route
IP packets have a special flag called DF or "don't fragment". If this field is
set to 1, a router passing this packet will not fragment the packet, if the
packet exceeds the router's MTU, the router will adhere to the DF field
instruction and drop the packet and return an ICMP message as opposed to
fragmenting and sequencing the packet for delivery.
You can use swithes with the ping command to both set the size of the message
payload (-l size) and set the DF flag to true (-f). By using these two switches
together, you can determine the MTU of a router(s) in route to a remote network
or host. The -l switch specifies the buffer, or payload of the packet, the IP
and ICMP headers will add an additional 28 bytes to the packet, so the payload
you specify with the -l switch should be n-28 to test the MTU (total packet
size, not just packet payload). (MSKB:314825)
ping -f -l MTU_SIZE_TO_TEST_IN_BYTES-28 REMOTE-HOST|IP_ADDRESS
Verify an MTU of 1500 bytes: MTU(1500)-IP_headers(28)=1472 :
c:\>ping -f -l 1472 4.2.2.2
Reply from 4.2.2.2: bytes=1472 time=48ms TTL=244
Reply from 4.2.2.2: bytes=1472 time=48ms TTL=244
Test an MTU of 1501 bytes: MTU(1501)-IP_headers(28)=1473 :
c:\>ping -f -l 1473 4.2.2.2
Packet needs to be fragmented but DF set.
Packet needs to be fragmented but DF set.
If the packet needs to be fragmented, you can find the specific router that is
reporting this by pinging the individual routers starting with the first router
in the route or path. You can of course find the list of routers using either
traceroute or the ping w/TTL method.