TTL survival time ()

Source: Internet
Author: User

TTL:(Time to live) life time is a value in the IP protocol package. It tells the network router package whether the time in the network is too long and should be discarded. There are many reasons that the package cannot be delivered to the destination within a certain period of time. For example, an incorrect route table may cause an infinite loop of packets. One solution is to discard the packet after a period of time and then send a message to the sender, which determines whether to resend the packet. The initial value of TTL is usually the default value of the system, which is the 8-bit domain in the header. The original assumption of TTL is to determine a time range and discard the package after this time. Since each vro must at least reduce the TTL domain by one, TTL usually indicates the maximum number of vrouters that can pass the packet before it is discarded. When the Count reaches 0, the router decides to discard the packet and send an ICMP packet to the original sender. For example, the following data indicates that the data passes through seven routers to reach the destination.
Pinging [] with 32 bytes of data:

Reply from bytes = 32 time = 44 Ms TTL = 57
Reply from bytes = 32 time = 354 Ms TTL = 57

In Windows 95/98, the default value of TTL is 32. It is recommended that you set the value to 128 when it is difficult to reach a node. Ping and tracerouter both use the TTL value to try to reach the specified host or track the route to that host.

Traceroute sets the packet's TTL value to a small value so that it is discarded continuously by each vro on the way to the destination. The time between the packet sent and the returned ICMP message is used to calculate the time from one vro to another.

Because the default TTL values of different operating systems are different, it is suggested that the type of the target system can be determined by the returned TTL value. This is correct, but it is not a TTL function, only an application that understands TTL. The TTL value can be modified.

Some special TTL values are defined by the system (such as NIDs) to deny unauthorized access to data. When executing the ping command, we can use the-I parameter to specify the TTL value. If you can set TTL to 0, the packet will be discarded immediately. Sometimes we run a ping command, but the other address is busy in the busy hours, with a prompt in English (the approximate meaning is that TTL is invalid ), it indicates that the TTL of the packet is 0 or smaller than the TTL value allowed by the next network segment before the packet reaches the target (that is, when the returned IP address is reached, the package has been discarded by the route. The following lists the default TTL values of common operating systems.

TTL = 32 Windows 9x/me
TTL = 64 Linux
TTL = 128 windows x/XP
TTL = 255 Unix

View the TTL value of the Local Machine 
Start-run-Enter cmd and press Enter. Enter Ping in the place where the cursor is flashing, and then press Enter.

Modify the TTL value of the Local Machine 
Open the Registry Editor, expand "HKEY_LOCAL_MACHINE/system/CurrentControlSet/services/TCPIP/parameters", find "defaultttl", and change the value to a decimal number less than 255, if no defaultttl item exists, create a "defaultttl" item of the DWORD type, specify the value you want to set, and then restart the machine.

TTL survival time ()

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.