TTL: In IPv4, the Time to Live (TTL) field in the IP header is used to prevent packets from circulating endlessly in case of routing loops. It specifies the maximum number of hops (routers) a packet can pass through before it is discarded. Each router that forwards the packet decrements the TTL by 1, and when the TTL reaches zero, the packet is dropped.
In IPv6, the equivalent field is known as the Hop Limit. The functionality of the Hop Limit field in IPv6 is similar to that of TTL in IPv4; it specifies the maximum number of hops a packet can traverse. Like TTL, each router decrements the Hop Limit by one before forwarding the packet, and the packet is discarded when it reaches zero.