traceroute is a network diagnostic tool used to trace the path that packets take from one host to another. It helps identify routing issues and latency problems in a network.
Common Traceroute Options
- -m <hops>: Sets the maximum number of hops to search for the target (default is usually 30).
- -p <port>: Specifies the destination port to connect to (useful for UDP or TCP).
- -i <interface>: Specifies the network interface to use for the outgoing packets.
Examples of Traceroute Commands
- Trace the route to example.com with the default settings:
> traceroute example.com
- Trace the route to example.com with a maximum of 15 hops:
> traceroute -m 15 example.com
- Trace the route to example.com using port 80 (HTTP):
> traceroute -p 80 example.com
- Trace the route to example.com using a specific network interface (e.g., eth0):
> traceroute -i eth0 example.com