Ttl ??

dreamworks

--== babyface ==--
Joined
19 Jan 2003
Messages
355
Hi guys ..

I hope to understand more about Time To Live please? What exactly is TTL in a network?

Lets say for example my wireless broadband, the package which is offered is 1Mbps/256kbps and when I ping the local isp, my TTL=249. Is this good or bad?

:rolleyes: Appreciate any advise. Thanks.
 
TTL is a one of the fields in the header of an IP datagram. Basically, the purpose of the field is to make sure the datagram doesn't circulate around the network forever. It's decremented each time the datagram is processed by a router along the way, and if the TTL field reaches 0, the datagram is dropped.
 
Ok .. so if thats the case, the longer it is the better or the shorter it is the better.

For eg. situation A, TTL=1500, situation B, TTL=750 and situation C, TTL=250.

Of the above, which is considered to be "Good" connection? Also, does an internal router plays any role in the TTL? I still don't quite get what is the function of TTL?? :)
 
There's no "better" or "worse" as such :)

The TTL field in the header is arbitrarily set by the particular application that's sending out the packet. So for example, 'traceroute' sends out packets with smaller TTL values than 'ping'

Since the purpose of traceroute is to tell you which routers your packets travel through, the utility sets the TTL of the first packet to 1. When the packet reaches the first router, it's decremented to 0 and dropped, and the router sends a message back to the host. Traceroute uses this information to print the IP/hostname of the first router. It then sends a second packet with a TTL of 2, and now the second router in the path drops the packet and sends back a message. The next packet has a TTL of 3 and so on. This goes on until the packet reaches the final destination router (unless the destination is unreachable). This way traceroute can display information about each router that the packet visited in it's journey from the source to the destination.

Do you have a better idea of the purpose and how it works now? :)
 
NetRyder said:
Do you have a better idea of the purpose and how it works now? :)

Damn, I sure do. :)
 
Last edited:
So basically kinda like mile markers. Or router markers, counting down to the destination?
 
The app knows how many it is to the destination. Or does it guesstemate it?
 
there is a default ttl set by <insert os here> in somecases its hardcoded and in others its user changeable.

If an application doesnt specify a ttl then the os default is applied, otherwsie an application can specify the ttl.

however if you set the ttl too high you'll increase latancy as your packet could then potentially take a longer route depending on how the "in-between" routers are configured.
 
I see .. so basically if its 249, it basically means the packet has travelled through 249 routers just to reach the destination?
 
dreamworks said:
I see .. so basically if its 249, it basically means the packet has travelled through 249 routers just to reach the destination?

As I understand what's been said, no. If the default ttl is set to 250 then the packet has travelled through 1 router (250-249), where as if the default ttl was set to 500 then the packet has traveleld through 251 routers (500-249)
 
dreamworks said:
I see .. so basically if its 249, it basically means the packet has travelled through 249 routers just to reach the destination?
No. TTL counts down. The standard number is probably 255 (8 bits maxed out, I think it's the maximum value). So 249 means 6 routers. The hop chains are rarely very long, the maximum length for traceroute (in Windows anyway) is 30 hops. My route to OSNN for instance (Sweden -> US) is 18 hops. You usually never need to care about the TTL as it's just a maximum limit to tell the routers when to drop a packet that has clearly gotten stuck in a loop.
 
DwarfData said:
As I understand what's been said, no. If the default ttl is set to 250 then the packet has travelled through 1 router (250-249), where as if the default ttl was set to 500 then the packet has traveleld through 251 routers (500-249)



But... as was said, it counts down to zero.

That being said, 500=500 not 251. Count down from 500 to 0 = 500 (don't count zero :D)
 
dreamworks said:
I see .. so basically if its 249, it basically means the packet has travelled through 249 routers just to reach the destination?
No, it means the packet has visited either 3 or 6 routers (depending on the OS version of the destination host) to reach the destination. Remember that the TTL value is decremented at each router.

When you issue the ping command, your machine sends out a packet to the server. The server then sends back a response packet with an initial TTL value of 255 (most recent systems do this). The response packet visits 6 routers on the way back to you. When your machine receives the packet, it reads the TTL value in the response packet, which is 255 - 6 = 249; i.e., there are 6 routers between you and the destination.

On certain older systems, the TTL value of the response packet would be set to the same as the value in the packet that the host received. In this case, if the TTL value displayed by your system was 255 - 6 = 249, the 6 would represent the total number of routers visited during the round-trip (not one-way); i.e., there are 3 routers between you and the destination - 3 hops on the way up, 3 more on the way down.

:)

Edit: Three other posts in the time it took to type this. :D
 
Last edited:
Zedric said:
No. TTL counts down. The standard number is probably 255 (8 bits maxed out, I think it's the maximum value). So 249 means 6 routers. The hop chains are rarely very long, the maximum length for traceroute (in Windows anyway) is 30 hops. My route to OSNN for instance (Sweden -> US) is 18 hops. You usually never need to care about the TTL as it's just a maximum limit to tell the routers when to drop a packet that has clearly gotten stuck in a loop.


So what is the default per router, or hop?

Is each hop a router?
 
gonaads said:
But... as was said, it counts down to zero.

That being said, 500=500 not 251. Count down from 500 to 0 = 500 (don't count zero :D)

A bit of misunderstanding I think.

If the default ttl is 500, i.e. the maximum allowed, but when you ping you get a ttl value of 249 then, counting down from 500 that's 251 hops.
 
Yep. The TTL field in the IP header is 8 bits.
Maximum value = (2^8) - 1 = 255
 

Members online

No members online now.

Latest profile posts

Also Hi EP and people. I found this place again while looking through a oooollllllldddd backup. I have filled over 10TB and was looking at my collection of antiques. Any bids on the 500Mhz Win 95 fix?
Any of the SP crew still out there?
Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. :(

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
hello peeps... is been some time since i last came here.
Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.

Forum statistics

Threads
62,015
Messages
673,494
Members
5,621
Latest member
naeemsafi
Back