Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


CHAPTER 7 Internet Control Message Protocol 205 device is up and reachable over the network. A successful ping means that network administrators looking at problems can relax a great deal: The network routers on the path and at least two hosts are running just fine. Ping implementations and the parameters supported vary greatly among operating systems and routers (most routers support ping). Some only send four packets and quit, unless told to send more. Others send constantly until told to stop. The parameters can usually set many of the IPv4 packet header fields such as TTL,TOS, and so on to specific values. Usually, Unix versions use the PID as the Identifier field in the ping message, but Linux increments this based on application calls. Unix ping messages are usually 56 bytes long, but Windows implementations use only 32 bytes. The payload of the ping message echoed back to the sender typically consists of an 8-byte timestamp and a fill pattern. The timestamp can be used to roughly calculate round-trip delays through the network (in milliseconds). Ping has some quirks that users should be aware of. First, small pings (maybe 56 or 64 bytes in the packet) often work fine, while larger pings with more realistic payload sizes do not go through reliably. That's what users care about--the network is strug- gling with real data packets. Seeing a small ping getting through reliably is not always