This preview shows page 1. Sign up to view the full content.
Unformatted text preview: ce = -3743 ms
sun % icmptime aix
orig = 83606768, recv = 83532183, xmit = 83532183, rtt = 253
difference = -74585 ms
Another interesting example is to the router gateway (a Cisco router). It shows that when
a system returns a nonstandard timestamp value (something other than milliseconds past
midnight, UTC), it is supposed to turn on the high-order bit of the 32-bit timestamp. Our
program detects this, and prints the receive and transmit timestamps in angle brackets (after
turning off the high-order bit). Also, we can't calculate the difference between the originate
and receive timestamps, since they're not the same units.
sun % icmptime gateway
orig = 83620811, recv = <4871036>, xmit = <4871036>, rtt =
sun % icmptime gateway
orig = 83641007, recv = <4891232>, xmit = <4891232>, rtt =
If we run our program to this host a few times it becomes obvious that the values do contain
millisecond resolution and do count the number of milliseconds past some starting point,
but the starting point is not midnight, UTC. (It could be a counter that's incremented every
millisecond since the router was bootstrapped, for example.)
As a final example we'll compare sun's clock with a system whose clock is known to be
accurate-an NTP stratum 1 server. (We say more about NTP, the Network Time Protocol,
below.) file:///D|/Documents%20and%20Settings/bigini/Docu...homenet2run/tcpip/tcp-ip-illustrated/icmp_int.htm (8 of 16) [12/09/2001 14.46.42] Chapter 6. ICMP: Internet Control Message Protocol sun % icmptime clock.llnl.gov
orig = 83662791, recv = 83662919, xmit = 83662919, rtt = 359
difference = 128 ms
sun % icmptime clock.llnl.gov
orig = 83670425, recv = 83670559, xmit = 83670559, rtt = 345
difference = 134 ms
If we calculate the difference minus one-half the RTT, this output indicates that the clock
on sun is between 38.5 and 51.5 ms fast.
There are other ways to obtain the time and date.
1. We described the daytime service and time service in Section 1.12. The former
returns the current time and date in a human readable form, a li...
View Full Document
This test prep was uploaded on 04/04/2014 for the course ECE EL5373 taught by Professor Guoyang during the Spring '12 term at NYU Poly.
- Spring '12