Just had a look further into this - lol theres been plenty debates over the same question.. and some confusion because TCP/IP packets use a different TTL to ICMP.
But I believe the answer and explanation actually lies in the
UNIX System Manager's Manual which explains the ping command.
Summary
~ Ping packets (ICMP ECHO_REQUEST ) get a TTL of 255
~ TTL gets decreased by 1 for each router/server (hop) that it passes through.
Most Unix systems set the ICMP ECHO_REQUEST packets to 255 (ping uses ICMP)
When responding to ping the remote server can either
- Not change it; (TTL value in the received packet will be 255 minus the number of routers in the round-trip path).
- Set it to 255; (TTL value in the received packet will be 255 minus the number of routers in the path from the remote system to the pinging host).
- Set it to some other value. (Some machines use the same value for ICMP packets that they use for TCP packets).
----
Still not sure about this bit though
This is why you will find you can ``ping'' some hosts, but not reach them with telnet(1) or ftp(1).and where that fits in and how - because take for eg erics router has a TTL of 255 but I assume you can still telnet into it.
.. or maybe Ive missed something.