TTL - what is it?

Table of contents:

TTL - what is it?
TTL - what is it?
Anonim

TTL - what is it? TTL stands for Time to Live. That is, the lifetime of the packet, allotted to it at the moment of transition from the initial node to the final one. In the IPv4 standard, an eight-bit field in the header is allocated to reflect TTL. Passing through numerous nodes to the destination, the value of the packet decreases by 1 unit each time. This is done in order to limit the time of his presence in the nodes to a specific number. And this, in turn, helps to avoid network congestion.

As conceived by the authors of the technology, the packet lifetime loses 1 unit every second. But thanks to high connection speeds and the number of routers and nodes, the decrease is much faster.

ttl is what
ttl is what

What happens if the TTL reaches zero? The packet will disappear, and the sender will receive a message that its time to live has expired, which means that you need to try again. The maximum value that an eight-bit field can represent is 255. There are default values for operating systems. For example, TTL in Windows is 128, and in Linux and derivatives - Mac, Android - 64.

The DNS environment has its own TTL, and it reflects the freshness of the cached data. But the article will not be about him.

What is TTL used for and in what areas

Package lifetime is actively used by variousInternet providers such as Yota. Thus, they are trying to limit access to the consumption of excessive traffic when distributing Wi-Fi. This is due to the fact that the packet, passing from the device receiving traffic to the distributing one, reduces the TTL, as a result, the provider receives a value less or, in the case of Windows, more than expected.

For an example, you can describe the process of a smartphone based on "Android". The device sends a request to receive data from a specific site. A TTL is sent along with it, the value of which is 64. The provider knows that this is the standard digit of the packet lifetime for this device, so it freely allows it to access the Network.

ttl windows
ttl windows

Now the device starts distributing Wi-Fi and becomes a kind of router. The connected smartphone runs on the Windows platform, and its TTL, passing through the distributing device, will be 127. The provider will meet this packet and understand that its Internet is being distributed. Therefore, it will block the connection.

Possibility to change TTL on different devices

Changing the packet lifetime value can be useful for bypassing traffic blocking by the ISP. For example, if the cable connection is turned off, and the user urgently needs to access the Internet from the computer. Then the smartphone becomes an access point and puts the PC on the network.

change ttl
change ttl

It is worth noting that some providers block access not only via TTL, but also track site visits. And if the resource has nothing to do with the smartphone, i.e., it doesn’t need it,the connection is broken.

You can change the TTL in several ways, which will be described later.

Change TTL on Android devices

The easiest way to change the lifetime of a package on Android devices is to use specialized software. For example, a very effective product is TTL Master. It can change the lifetime of the dispenser packet to that which results from the data pass. For example, when distributing Wi-Fi on a Windows device, you need to set the value to 127, and on Android or Linux - 63.

modem ttl
modem ttl

The program is free and can be easily found in the official Google Play store. However, it requires root permissions on the device to function.

The program interface is simple - the current value of the parameter is displayed in the upper part. A little lower are blanks for Windows operating systems and others. You can also set the desired value manually. A little lower is a button with the ability to go from the application directly to the modem settings. In some versions, a solution is available through iptables, for which there is a specific item.

In the settings it is possible to set the launch and change of the lifetime automatically when the device boots. Some versions of Android allow you to start the access point immediately after changing the value. There is support for the Russian language.

ttl value
ttl value

The application is constantly evolving and improving. There is a profile on github in whicheveryone can branch off and add their capabilities to the project. If accepted by the developers, they will be included in the next release.

You can also try the method of changing system files manually to change the package lifetime value. This will require root rights. First you need to switch to flight mode, that is, make the phone lose the Network.

Then use any explorer that can edit files. In it, you need to go along the path proc/sys/net/ipv4. In this directory, you are interested in a file named ip_default_ttl. It contains the value 64, which needs to be changed to 63.

Next, you need to take the phone out of airplane mode so that it registers on the Web again. Now you can distribute wireless Internet and try to connect an iOS or Android device, that is, with TTL 64.

ttl change
ttl change

If you want to use a Windows PC as one of the clients, you will need to set a constant packet lifetime value as described below.

Change TTL on a computer with Windows operating systems

If you need to distribute the Internet from your Android smartphone to a computer running Windows, you will have to slightly adjust the registry values. This method will be relevant when the phone is not rooted and it is impossible to bypass the lock on it.

Starting the registry in the line of operating systems can be done through the "Start" menu item "Run". Enter Regedit in it and click OK. Two areas will appear in the window that opens. On the left istree structure, and on the right - values. You need to find the HKEY_LOCAL_MACHINE \SYSTEM\CurrentControlSet\Services\Tcpip\Parameters branch. For Windows 8 Tcpip can be replaced with Tcpip6.

usb ttl converter
usb ttl converter

In the window with the values, you need to create a new one. This is done with a right click. Select New from the context menu, then a new DWORD value, and name it Default TTL. What's this? This will be a static setting for a constant lifetime value. Then right-click again, and select Edit. The number type must be decimal, and the value must be 65. Thus, the system will transmit the packet lifetime of 65, that is, one more than Android. That is, when passing through a smartphone, it will lose one unit, and the provider will not notice the catch. After making changes, you need to restart your computer.

Now you can distribute the Internet to "Android" without using special software and devices.

Change to Linux

How is TTL changed on a computer with Linux operating systems? For Linux, changing the packet lifetime is changed with one line in the terminal: sudo iptables -t mangle -A POSTROUTING -j TTL --ttl-set 65

Change packet lifetime on modems

You can change the TTL of the modem by changing the IMEI. This is such an identification code that is unique for each device that has access to cellular networks. The problem is that there is no universal way. This is due to the fact that each individual modem must have its ownfirmware that will change IMEI.

The w3bsit3-dns.com website has a selection of solutions for changing the lifetime on modems from different manufacturers and models. You can also find detailed implementations of this task there.

Change package lifetime on iOS

With TetherMe tweak, you can change to iOS TTL. What it is? This is a deb app that unlocks hotspot mode on iOS devices. The fact is that Apple allows some cellular network operators to block the "Modem Mode" function at the SIM level. This application allows you to activate it and use your phone as a modem.

Change TTL in MacOS

MacOS has a default lifetime of 64. If you want to change it, you need to enter the command in the terminal: sudo sysctl -w net.inet.ip.ttl=65.

However, with this approach, the value will change back to 64 after a reboot. Therefore, a number of manipulations must be performed. The etc directory exists at the root of the disk. It is hidden, but you need to get into it. The sysctl.conf file is created there. You need to write only one line in it - net.inet.ip.ttl=65. And of course, save.

To display this hidden folder in Finder, go to the main disk and press cmd+shift+G. In the window that appears, enter the name of the folder you are looking for, after which it will be found.

Conclusions

There is such a thing as a USB TTL converter. However, it has nothing to do with the context of the article, and should not be confused with the lifetime of the package. USB TTL converter - a kind of adapter for creating connectionsbetween USB devices and TTL logic.

The article explained in detail about TTL - what it is and what it is for. Several ways to change it will allow you to bypass the traffic blocking restriction on some providers. This makes it possible to use the Internet everywhere.

The implementation is different on different devices, you can do it both using software tools and manually changing system files. Some modems will have to be flashed, and each has its own version of the software.

These instructions can bypass the blocking of many providers that provide Internet access via a cellular network.

Recommended: