Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Linux basic command-tracepath trace route

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Tracepath

The tracepath instruction can track the routing information of the data to the target host, and can also find the MTU value. It tracks the path to the destination and discovers the MTU along that path. It uses UDP ports or some random ports. It is similar to Traceroute, except that it does not require superuser privileges and has no fancy options. Tracepath 6 is a good substitute for typical examples of tracerout 6 and Linux error queuing applications. The situation with tracepath is even worse because commercial IP routers do not return enough information in the ICMP error message. Most likely, when they are updated, it will change.

The scope of this command: RedHat, RHEL, Ubuntu, CentOS, SUSE, openSUSE, Fedora.

1. Grammar

Tracepath [- n] [- l pktlen] destination [port]

2. List of options

Option

Description

-n

Do not check the host name

-l

Set the initialization packet length. Default is 65535.

3. Output

Root@mops:~ # tracepath7 3ffe:2400:0:109::2

1?: [LOCALHOST] pmtu 1500

1: dust.inr.ac.ru 0.411ms

2: dust.inr.ac.ru asymm 1 0.390ms pmtu 1480

2: 3ffe:2400:0:109::2 463.514ms reached

Resume: pmtu 1480 hops 2 back 2

The first column shows the TTL of the probe, followed by a colon. Usually the value of TTL is obtained from the network, but sometimes the reply does not contain the necessary information, we have to guess it. In this case, the number is followed by?

The second column shows the network hop to respond to the probe. If the probe is not sent to the network, it is the router address or [localhost] address.

The rest of the line shows a variety of information about the path to the relevant work hop. As a rule, it contains the value of RTT. In addition, it can display the path MTU when it changes. If the path is asymmetric, or if the probe is completed before the specified hop is reached, the difference between the forward and backward hops is displayed. This information is unreliable. F.E. The third line shows the asymmetry of 1 because the probe with a TTL of 2 for the first time was rejected on the first hop due to the discovery of the path MTU.

The last line summarizes information about all paths to the destination, showing the detected path MTU, the number of hops arriving at the destination, and our guess on the number of hops from the destination to us, which may be different when the path is asymmetric.

4. Examples

Trace the route to www.qq.com

[root@localhost ~] # ping-c 2 www.qq.com / / ping destination address, you can see the destination ip

PING www.qq.com (111.30.132.101) 56 (84) bytes of data.

64 bytes from 111.30.132.101: icmp_seq=1 ttl=53 time=23.9 ms

64 bytes from 111.30.132.101: icmp_seq=2 ttl=53 time=33.0 ms

[root@localhost ~] # tracepath www.qq.com / / trace route

1: 192.168.1.9 (192.168.1.9) 0.067ms pmtu 1500

1: 192.168.1.1 (192.168.1.1) 3.569ms

1: 192.168.1.1 (192.168.1.1) 4.055ms

2: 192.168.1.1 (192.168.1.1) 17.651ms pmtu 1492

2: 10.46.80.1 (10.46.80.1) 13.434ms

3: 183.203.226.201 (183.203.226.201) 9.547ms

4: 211.138.99.57 (211.138.99.57) 70.194ms asymm 5

5: 221.183.14.5 (221.183.14.5) 17.023ms

6: 221.176.19.237 (221.176.19.237) 206.968ms

7: 221.183.8.149 (221.183.8.149) 29.488ms asymm 8

8: 221.183.27.106 (221.183.27.106) 57.434ms

9: 111.30.145.34 (111.30.145.34) 27.426ms

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report