How to Change Default TTL Value Set On Ping Packets

TTL value (Time To Live) tells the life span of the ping packets by setting the number of hops they can cross. When it reaches the hop count set by TTL, they expire. When you ping an address from Command Prompt, computer automatically assign a default Time To Live value which is greater than the hop count between the destination and your computer. Sometimes it may not be enough for the packets to reach the address. In those cases we need to set a different Time To Live value on them. We can simply change this value from command prompt but the manually configured value must be between 0 to 255. If the TTL set is 0, ping packets won't go further from your computer. If it is 1,  they expire when they reach the subnet. From the Time To Leave value in ping reply, we can find the hop count between destination and your computer. Check the below image to learn how to find the hop count between your computer and different websites.
Manually assign

Here you can see the hop counts between your computer and different addresses.

How to Change Default TTL Value When You Ping an Address

To change the default Time To Live value set on ICMP echo packets, follow the command below.
Ping -i (TTL value) Address

Eg: Ping Google.com -i 100

Please note that if you set a lower TTL value for ICMP requests than the actual hop count between your computer and destination, they will never reach the address. The below image shows this.
How to limit value

Here I set a TTL value which is less than the actual hop count between my computer and Google server. So the packets expired on its way before reaching the destination and I have received the Time To Live Expired in Transit error message. To learn more about this specific error message click on the link below.
What is The Error Message TTL Expired in Transit

By setting different Time To Live value on ping packets we can troubleshoot many connectivity issues. One of the most common ICMP error message is Transmit failed general failure. To learn more about this error click on the link below.
Reasons and Solution For  Transmit failed. General Failure

Here we have seen the effect of TTL value while sending requests to the destination. If the Time To Live value set is lower than the actual distance between the destination and your computer, ping packets will expire. There is another ping error message when ping packets send from your computer failed to reach the destination host. To learn more about it click on the link below.
Reasons and Solution for Destination Host Unreachable Error Message

Technology Blog

1 comment:

Anonymous said...

Thanks for sharing this test

Amit