Kitz Forum
Broadband Related => Broadband Technology => Topic started by: UncleUB on November 05, 2008, 08:56:52 AM
-
Hi all just done ping command test and having read Kitz's tutorial I noticed that the TTL value by default is 255,well mine has pinged back at 112.Why is it that low?
The average round trip time in milli- seconds was 39.
packets sent4,received 4,lost 0
-
Well Kitz's description does not make much sense when I ping another PC on my home lan as the TTL shows as 128 and sure as hell there are not 128 hops to get to it. If I ping my router I get a TTL of 64. Go figure.......
-
I imagine that this depends on the particular implementation of the ping command. If you look at the options at the end of the tutorial you'll see that the -i option can set the TTL to a specific value. I expect that the implementation of ping on your systems uses by default the parameter -i128 or something like that. On my Linux systems if I ping the router it returns 254 which is what Kitz's tutorial says it should do, but I get a value of 120 from bbc.co.uk which is 8 hops from here.
-
Eric,that ping of 112 was from bbc.co.uk
-
Eric my ping was to another local PC and to the same PC the TTL was 64, no ping parameter was added to the command, so its whatever the default is on XP. Also ping times are less that 1ms!
-
hmm very good point and something I hadnt noticed had happened.
My default TTL is now 128 rather than the 255 it was for many years.
- You can check your default TTL by using the command ping localhost
The default TTL can be set within the operating system so possibly at some point over the last 4 or so years since I did that tutorial, something has changed within XP.
Need to do a bit of digging around before I comment further and make a dork of myself.
-
>> - You can check your default TTL by using the command ping localhost
I suspect that it's a bit more complicated than that, and that the default TTL varies according to the type of target. I don't know if Windows uses similar variation, but on my Linux systems I get three different values of default TTL:
ping localhost : TTL = 64
ping 192.168.1.254 (my router) : TTL = 254 which equals 255 minus 1 hop
ping bbc.co.uk : TTL = 120 which equals 128 minus 8 hops
So, depending on the target, the default TTL can be 64, 128 or 255.
-
>> on the target, the default TTL can be 64, 128 or 255.
I havent searched it yet.. thats what I was going to do before commenting further.. but I suspect youre right.. and thats what was crossed my mind.. in that I suspected that the remote host could actually over-ride the default TTL - regardless of whats set on your system.
I was going to look properly later into remote hosts over-riding the TTL and update the page if necessary accordingly.
-
For me, both localhost and router TTL=64
-
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 (http://www.rt.com/man/ping.8.html) 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.
-
>> erics router has a TTL of 255 but I assume you can still telnet into it.
Yes I can.
-
Ive made a quick and small adjustment to the page which should hopefully cover it.
There's already a link on there to the unix system man, so I'll let anyone read all the techy specs in there if they want.
-
You might find this Chapter from the O'Reilly "fish book" - AKA Internet Core Protocols: The Definitive Guide - useful?
http://oreilly.com/catalog/coreprot/chapter/ch02.html#32174
TTL is measured in hops or seconds - AFAIK the two are interchangeable, certainly on Cisco kit anyway.
-
Wow,a lot of this is all looking a bit techy.
I only wanted to know if I was pinging,(ok)
Now my head is zinging :D
-
Never mind Phil, you stimulated a useful discussion. :)
-
Happy to help Eric. :) Now I'm off for some paracetamols :bye:
-
Thanks for the linky rizla.. I must admit that although obviously Ive had to study protocols in the past, they dont rock my boat and its not anything Ive gone any deeper into than the necessary to be able to Pass what I needed to. :D
The idea of the page was to make it simple for average person, so I'm going to avoid any of the too techy refs on the page itself.