Traceroute: Difference between revisions
Line 6: | Line 6: | ||
traceroute implementation uses the IP [[IP#Time_To_Live|TTL field]]: each datagram contains a TTL field that carries the number of routers that datagram is allowed to traverse. When a router handles the datagram, decrements TTL counter. If the counter reaches zero, the router drops the datagram and sends an "ICMP Time Exceeded" message to the sender. traceroute uses this behavior as follows: it sets TTL to 1 on a datagram and sends it to the destination. The first router drops the packet and sends a rejection message that includes the router's address back to sender. traceroute then sets TTL 2 and sends the message to the final destination. The second router on the way will discard the package and reply with its name. The process is repeated until the package reaches the destination. | traceroute implementation uses the IP [[IP#Time_To_Live|TTL field]]: each datagram contains a TTL field that carries the number of routers that datagram is allowed to traverse. When a router handles the datagram, decrements TTL counter. If the counter reaches zero, the router drops the datagram and sends an "ICMP Time Exceeded" message to the sender. traceroute uses this behavior as follows: it sets TTL to 1 on a datagram and sends it to the destination. The first router drops the packet and sends a rejection message that includes the router's address back to sender. traceroute then sets TTL 2 and sends the message to the final destination. The second router on the way will discard the package and reply with its name. The process is repeated until the package reaches the destination. | ||
=Installation= | |||
==With yum== | |||
yum install -y traceroute | |||
==With apt== | |||
apt-get update | |||
apt-get install -y traceroute |
Latest revision as of 18:56, 27 September 2019
Internal
Overview
traceroute implementation uses the IP TTL field: each datagram contains a TTL field that carries the number of routers that datagram is allowed to traverse. When a router handles the datagram, decrements TTL counter. If the counter reaches zero, the router drops the datagram and sends an "ICMP Time Exceeded" message to the sender. traceroute uses this behavior as follows: it sets TTL to 1 on a datagram and sends it to the destination. The first router drops the packet and sends a rejection message that includes the router's address back to sender. traceroute then sets TTL 2 and sends the message to the final destination. The second router on the way will discard the package and reply with its name. The process is repeated until the package reaches the destination.
Installation
With yum
yum install -y traceroute
With apt
apt-get update apt-get install -y traceroute