Ttl ??

dreamworks

--== babyface ==--
#1
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.
 
#2
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.
 

dreamworks

--== babyface ==--
#3
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?? :)
 
#4
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? :)
 
#9
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.
 
#12
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)
 
#13
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.
 

gonaads

Beware the G-Man
Political User
#14
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)
 
#15
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:

gonaads

Beware the G-Man
Political User
#16
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?
 
#17
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.
 

Members online

No members online now.

Latest posts

Latest profile posts

Perris Calderon wrote on Electronic Punk's profile.
Ep, glad to see you come back and tidy up...did want to ask a one day favor, I want to enhance my resume , was hoping you could make me administrator for a day, if so, take me right off since I won't be here to do anything, and don't know the slightest about the board, but it would be nice putting "served administrator osnn", if can do, THANKS

Been running around Quora lately, luv it there https://tinyurl.com/ycpxl
Electronic Punk wrote on Perris Calderon's profile.
All good still mate?
Hello, is there anybody in there? Just nod if you can hear me ...
Xie
What a long strange trip it's been. =)

Forum statistics

Threads
61,970
Messages
673,297
Members
89,017
Latest member
Poseeut