Time to Live (TTL) manipulation on MikroTik RouterOS

Another interesting topic that I would like to explore now is about the Time to Live (TTL).

By default, the TTL is a field in the IP header that sets how many routers a packet can traverse before it is discarded, meaning that it has a number set to it and each time the packet moves to a Layer 3 device then the number will decrease.

As I mentioned, we are talking about Layer 3 here, meaning that the TTL works on Layer 3. Its main function is to disallow a loop to happen on Layer 3 networks including the internet.

You may say now: Maher, wait a second! What do you mean by all this, can you please explain more?

😊- yes, I can explain more. Let’s see that in a graph:

On MikroTik RouterOS, the TTL starts with 64. Whenever a packet moves to another router in order to follow its path to reach to the destination address, then it will get decremented by 1.

Whenever the TTL reach to a value of 1, then it will be dropped completely. This mechanism is a great one to not have loops on Layer 3 networks because if we did not have TTL, then the packet will be moving infinitely causing loops on every network.

I would like to stress one more time that TTL works on Layer 3 and not on Layer 2, because there is possibility to have Layer 2 loops as well where the frame keeps moving in the Layer 2 network. In this case, the TTL has nothing to do with stopping the loop in Layer 2, but fortunately we do have another mechanism which can stop loops on Layer 2 using the Spanning-Tree protocol (out of scope of this course).

Back to TTL, as I have mentioned, the default TTL value on MikroTik RouterOS is 64 but this may be changed by MikroTik RouterOS from one version to another.

I think by now, the idea of TTL is clear for you – but what has this to do with the static routing? In which scenario we can use TTL and what can we benefit from it?

Let’s think of it a bit. We said that once the TTL reach to 1, then the packet will be dropped and won’t move to another hop. What if we can profit from this when deploying an internet service to a hotel for example?

Normally, a hotel does not want that the internet service that it is providing it to its guests to be distributed by the guests to more people or more devices.

In other words, if a guest is a good network engineer, he can bring with him a MikroTik router, connect it to the internet of the hotel, and share the internet to all his devices and possibly to other guests as follows:

Apologies, the Full Lesson Access is Only for Members....

\

Get Access to all Lessons from different Vendors

\

Affordable Price to Enhance your IT Skills!

\

Always Accessing all Lessons including the New Added Ones

100% Satisfaction Guaranteed!

You can cancel your membership at anytime.
No Questions Asked Whatsover!

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

About