Traceroute leverages TTL (time-to-live) to avoid network loops. Each time a packet hits a router,…