TCP IP Illustrated

2521334 icmpseq2 ttl255 time0 ms 64 bytes from

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: tl=255 time=0 ms 64 bytes from 140.252.13.34: icmp_seq=3 ttl=255 time=0 ms 64 bytes from 140.252.13.34: icmp_seq=4 ttl=255 time=0 ms 64 bytes from 140.252.13.34: icmp_seq=5 ttl=255 time=0 ms 64 bytes from 140.252.13.34: icmp_seq=6 ttl=255 time=0 ms 64 bytes from 140.252.13.34: icmp_seq=7 ttl=255 time=0 ms ^? type interrupt key to stop --- svr4 ping statistics --8 packets transmitted, 8 packets received, 0% packet loss round-trip min/avg/max = 0/0/0 ms When the ICMP echo reply is returned, the sequence number is printed, followed by the TTL, and the round-trip time is calculated. (TTL is the time-to-live field in the IP header. The current BSD ping program prints the received TTL each time an echo reply is received-some implementations don't do this. We examine the usage of the TTL in Chapter 8 with the traceroute program.) As we can see from the output above, the echo replies were returned in the order sent (0, 1,2, and so on). file:///D|/Documents%20and%20Settings/bigini/Docu...homenet2run/tcpip/tcp-ip-illustrated/pingprog.htm (2 of 13) [12/09/2001 14.46.45] Chapter 7. Ping Program ping is able to calculate the round-trip time by storing the time at which it sends the echo request in the data portion of the ICMP message. When the reply is returned it subtracts this value from the current time. Notice that on the sending system, bsdi, the round-trip times are all calculated as 0 ms. This is because of the low-resolution timer available to the program. The BSD/386 Version 0.9.4 system only provides a IO-ms timer. (We talk more about this in Appendix B.) We'll see later that when looking at the tcpdump output from this ping example on a system with a finer resolution clock (the Sun) the time difference between the ICMP echo request and its echo reply is just under 4 ms. The first line of output contains the IP address of the destination host, even though we specified its name (svr4). This implies that the name has been converted to the IP address by a resolver. We examine resolvers and...
View Full Document

Ask a homework question - tutors are online