Technical data

ping
Different data patterns
The network layer should never treat packets differently depending on the data
contained in the data portion. Unfortunately, data-dependent problems have been
known to invade networks and remain undetected for long periods of time. In
many cases the problematic pattern does not have sufficient transitions, such
as all ones (1) or all zeros (0), or has a pattern at the right, such as almost all
zeros (0). It is not necessarily enough to specify a data pattern of all zeros on the
command line because the problematic pattern of interest is at the data-link level,
and the relationship between what you enter and what the controllers transmit
can be complicated.
Data-dependent problems can be identified only by extensive testing. If you
are lucky, you can manage to find a file that either cannot be sent across your
network or that takes much longer to transfer than other files of similar length.
You can then examine this file for repeated patterns that you can test by using
the
-p
option to the
ping
command.
TTL details
The TTL value of an IP packet represents the maximum number of IP routers
that the packet can go through before being thrown away. You can expect each
router in the Internet to decrement the TTL field by exactly one.
The maximum possible value of this field is 255, and most UNIX compatible
systems set the TTL field of ICMP ECHO_REQUEST packets to 255. This is why
you can use the
ping
command on some hosts but not reach them with
TELNET
or
FTP
.
In normal operation,
ping
displays the TTL value from the packet it receives.
When a remote system receives a
ping
packet, it can do one of three things with
the TTL field in response:
Not change the field. This is what Berkeley UNIX compatible systems did
before BSD Version 4.3. In this case, the TTL value in the received packet
will be 255 minus the number of routers in the round-trip path.
Set the field to 255. This is what current Berkeley UNIX compatible systems
do. In this case, the TTL value in the received packet will be 255 minus
the number of routers in the path from the remote system to the host that
received the
ping
commands.
Set the field to some other value. Some machines use the same value for
ICMP packets that they use for TCP packets; for example, either 30 or 60.
Others may use completely wild values.
Cautions
Many hosts and gateways ignore the RECORD_ROUTE option.
Flooding and preloading the
ping
command is generally not recommended, and
flooding
ping
messages on the broadcast address should be done only under very
controlled conditions.
Flags
-c count
Stops after sending (and receiving) the specified number (count) of ECHO_
RESPONSE packets.
A–28 Troubleshooting Utilities Reference