what is ttl in ping

1 year ago 37
Nature

TTL stands for "time to live" and is a value on an ICMP packet that prevents that packet from propagating back and forth between hosts ad infinitum. Every bit of data on IP networks is sent using packets, and there are almost always one or more routers in between two computers speaking to each other on the internet. It is the router’s job to move these packets closer to their destination. However, sometimes routers can end up forwarding packets back and forth to one another forever. To prevent this, TTL is a bit of data kept with every packet, indicating how many more routers, or hops, it is allowed to pass between before expiring. For every router a packet passes through, this TTL value will be decreased by 1. When the value reaches zero, the router handling that packet will drop the packet and will trigger an Internet Control Message Protocol (ICMP) message thats sent back to the originating host. The TTL response tells you how many routes your Ethernet packet has taken to get to its destination, and it can be a great network troubleshooting tool.