The traceroute command allows you to track the route of network data packets. The default data packet size is 40 Bytes, which can be set separately.
Syntax
Traceroute [-dFlnrvx] [-f <survival value>] [-g <Gateway>...] [-I <network interface>] [-m <survival value>] [-p <communication Port>]
[-S <source address>] [-t <Service Type>] [-w <timeout seconds>] [host name or IP address] [packet size]
Parameter description:
- -D uses the Socket-level troubleshooting function.
- -F <survival value> sets the TTL value of the first detected data packet.
- -F: Do not disconnect the bits.
- -G <Gateway> You can set up to eight source route gateways.
- -I <network interface> use the specified network interface to send data packets.
- -I replace UDP data with ICMP response.
- -M <survival value> sets the TTL value of the maximum survival value of the detection data packet.
- -N directly uses the IP address rather than the host name.
- -P <communication Port> sets the communication port of UDP transmission protocol.
- -R ignores common Routing tables and directly sends data packets to the remote host.
- -S <source address> sets the IP address of the data packet sent from the local host.
- -T <Service Type> sets the TOS value of the detection data packet.
- -V displays the instruction execution process in detail.
- -W <timeout seconds> sets the time to wait for the return of the remote host.
- -X enables or disables the packet correctness test.
Instance
Display the route entries to the destination
# Traceroute www.google.com
Traceroute: Warning: www.google.com has multiple addresses; using 66.249.89.99
Traceroute to www.l.google.com (66.249.89.99), 30 hops max, 38 byte packets
1 192.168.0.1 (192.168.0.1) 0.653 MS 0.846 MS 0.200 MS
2 118.250.4.1 (118.250.4.1) 36.610 MS 58.438 MS 55.146 MS
3 222.247.28.177 (222.247.28.177) 54.809 MS 39.879 MS 19.186 MS
4 61.187.116253 (61.187.0000253) 18.033 MS 49.699 MS 72.147 MS
5 61.137.2.177 (61.137.2.177) 32.912 MS 72.947 MS 41.809 MS
6 202.97.46.5 (202.97.46.5) 60.436 MS 25.527 MS 40.023 MS
7 202.97.35.69 (202.97.35.69) 40.049 MS 66.091 MS 44.358 MS
8 202.97.35.110 (202.97.35.110) 42.140 MS 70.913 MS 41.144 MS
9 202.97.35.14 (202.97.35.14) 116.929 MS 57.081 MS 60.336 MS
10 202.97.60.34 (202.97.60.34) 54.871 MS 69.302 MS 64.353 MS
11 ***
12 209.85.20.80 (209.85.20.80) 95.954 MS 79.844 MS 76.052 MS
MPLS Label = 385825 CoS = 5 TTL = 1 S = 0
13 209.85.249.195 (209.85.249.195) 118.687 MS 120.905 MS 113.936 MS
14 72.14.236.126 (72.14.236.126) 115.843 MS 137.109 MS 186.491 MS
15 nrt04s01-in-f99.1e100.net (66.249.89.99) 168.024 MS 140.551 MS 161.127 MS