(1) What is Time To Live (TTL)?
Time-to-live (TTL) is a value that defines the duration or the maximum number of routers a packet can pass through before it gets discarded. The TTL is defined when a packet is created and typically decreases by one each time it is forwarded to a router.
For example: If a packet’s TTL is 2, when it passes the first router, the TTL is reduced by 1 and sent to the second router. If it reaches the second router, the TTL is decremented to 0. If the packet has not yet reached its destination, it will be discarded.
(2) What is the purpose of TTL?
Consider a scenario where a packet passes through dozens of routers en route to its destination. If a router is misconfigured, it might send the packet to the wrong destination, potentially causing an infinite loop that could lead to a network crash. The decreasing TTL value helps prevent this issue.
(3) Analyzing TTL value changes in an IP packet
As mentioned before, if data is being transmitted within the same subnet, the TTL value remains unchanged. However, the TTL can change across different subnets.
1. Analyze the TTL value within the same subnet

I set up an environment using 192.168.0.1 pinging 192.168.0.2 (the above image shows the packet capture process).
You can see frame 74 is a request frame.

The corresponding frame 75 is the reply message.

You can see that if it is the same subnet, the TTL value is the same.
2. Analyze the TTL value across different subnets
Analyzing the TTL across different subnets, it is clear from the analysis in the previous section that the TTL value is different. Here, I ping the official website of Sina. It is obvious the Sina website address and my local one are in different subnets.

Frame 19 is the request message, while frame 20 is the reply message.
Analyze the detailed information of frame 19:

Analyze the detailed information of frame 20:
