How to Change the Default TTL Value Set On Ping Packets?

Published by: Alex George
While troubleshooting connectivity issues, we may need to change the default TTL value set on the Ping packets. It is because the TTL value (Time To Live) tells the life span of the ping packets. In simple words, it is the number of hops they can cross. When it reaches the hop count set by TTL, it expires. This tutorial explains how to assign a new Time To Live value to a Ping packet and the after effects of this process.

When Should I Assign a New TTL Value
When you ping an address from the Command Prompt, your computer automatically assigns a default Time To Live value (a number 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 change this value from the 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 the destination and your computer.

Check the below image to learn how to find the hop count between your computer and different websites.



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

How to Change Default TTL Value When You Ping an Address
Use the command below to change the default Time To Live value set on ICMP echo packets.

Ping -i (TTL value) Address

Example: Ping Google.com -i 100

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?

  1. Resolve Getting 169.254.X.X (APIPA) Windows Automatic Private IP Address
  2. How to Set Idea 4G On Android Phone?
  3. PING: Transmit failed. General Failure

By setting different Time To Live value on ping packets, we can troubleshoot many connectivity issues. One of the most common ICMP error messages is Transmit failed general failure.

  1. Ping Gives Hardware Error
  2. What is Destination Net Unreachable?
  3. Reasons For Request Timed Out Error

Here we have seen the effect of TTL value while sending requests to the destination.

  1. Ping Request Could not Find Host. Please Check the Name and Try again
  2. Error 628: The Connection was Terminated by the Remote computer
  3. Error 797: A Connection to the Remote Access Server was not Made

If the Time To Live value set is lower than the actual distance between the destination and your computer, ping packets will expire.

  1. Adobe Flash Player has Stopped a Potentially Unsafe Operation
  2. Can't Access the Control Panel
  3. How to Backup and Restore Windows Registry?

It will lead to another ping error message Destination host unreachable error.

  1. How to Setup Siemens SpeedStream Modem With Bell PPP DSL Internet?
  2. How to Create a Direct Download Link For Older Versions Of Google Chrome Web Browser?
  3. How to Use Google Chrome Browser To Access A Remote Computer?

3 comments:

  1. Anonymous11:21 AM

    Thanks for sharing this test

    Amit

    ReplyDelete
    Replies
    1. Hi, I'm writing through a translator. When I enter a ping command for sites like youtube or google, a different TTL value is used, as I understand this is why the approximate receive-transmit time in ms changes. The receive-transmit time for YouTube is approximately 15ms, but for api.telegram.org this value reaches 70ms, this is very bad for me and I would like to either remove this delay altogether or reduce it to 5-10, is this possible? TTL for api.telegram.org is 54

      Delete
    2. Do you use any proxy or VPN to connect to the Internet?

      If yes, disable it and ping again.

      Delete

Newer Post Older Post Home