Traceroute command usage instance traceroute is the routing tool used to track data packets arriving at the network host. traceroute is the gateway tool used to send data packets between the host and the target host. The principle of traceroute is to try to send a test packet with the smallest TTL to track the gateway
Traceroute command, tracerouteWith traceroute, we can know the path from your computer to the host on the other end of the Internet. Of course, the path for each packet to arrive at the same destination from a certain source may be different, however, most of the time the routes are the same. In linux, traceroute is called tracert in MS Windows.
Mtr (My traceroute) is a Network Diagnostics tool that incorporates ping and traceroute into a program. The MTR provides two interfaces: a ncurses interface that is useful for using MTR from a Telnet session, and a GTK + interface for X (provided in the MTR-GTK software package).MTR use1, MTR command line toolsMTR use is relatively simple, please refer to MTR's man page for detailed usage.[root@ts3-142 ~]#
~]# traceroute-m www.baidu.comTraceroute to Www.baidu.com (61.135.169.105), hops max, byte packets1 192.168.74.2 (192.168.74.2) 1.534 ms 1.775 ms 1.961 ms2 211.151.56.1 (211.151.56.1) 0.508 ms 0.514 ms 0.507 ms3 211.151.227.206 (211.151.227.206) 0.571 ms 0.558 ms 0.550 ms4 210.77.139.145 (210.77.139.145) 0.708 ms 0.729 ms 0.785 ms5 202.106.42.101 (202.106.42.101) 7.978 ms 8.155 ms 8.311 ms6 bt-228-037.bta.net.cn (202.106.228.37) 772.460 Ms Bt-228-025
Ping Command details
Ping can be used to test the computer name and computer ip address, verify the connection with the remote computer, verify the connection to one or more remote computers by sending icmp echo data packets to the computer and listening for echo response data packets. This command can only be used after the TCP/IP protocol is installed. Open your ms-dos(open the Startup Program ms-dos.pdf, and use win2000's example to open cmd.exe (t
Command for viewing Ubuntu running status
1. route to view and set the route information for Linux 2. ping: network connectivity check example: Ping 192.168.0.1 parameter:-C is used to specify the number of Ping responses. Example: Ping-C 4 192.168.0.1 the specified number of responses is 4 3. traceroute is used to analyze the network topology format:
Ping, tracert, traceroute, and netstat command to view the ubuntu running status command 1. route to view and set the route information for Linux 2. ping: network connectivity check example: ping 192.168.0.1 parameter:-c is used to specify the number of ping responses. Example: ping-c 4 192.168.0.1 the specified number of responses is 4 3.
"ICMP timeout" message in sequence. If the-d option is used, the Tracert utility does not query DNS on each IP address.
In the following example, data packets must pass through two routers (10.0.0.1 and 192.168.0.1) to reach host 172.16.0.99. The default gateway of the host is 10.0.0.1, and the IP address of the router on the 192.168.0.0 network is 192.168.0.1.
C: \> tracert 172.16.0.99-d
Tracing route to 172.16.0.99 over a maximum of 30 hops
1 2 s 3
The difference between traceroute and tracert
Recently in the view of TCP/IP detailed Volume 1 o'clock was traceroute and tracert command to a small hole, the original two is a difference.
I grabbed the bag under windows, and I couldn't catch the UDP packet ....
Also give yourself a wake up reading to move brain Ah!!!
Both are used to probe packets from the source to the destination routed IP, but the two
-hop detection parameter in the Command). If you are patient, you can specify the-m 128 parameter, and the traceroute will never end automatically, each time, all detection times need to be exhausted.
2. Why * is returned during the 8-9 10 hop? Let's reasonably guess:
In my network, it takes at least 7 hops to access the Baidu website. After Article 7, the UDP packet with TTL = 8 may have arrived at the Baidu host, so why is
number of traceroute is 33433. Generally, this port is not used by applications, so the target host will return ICMP.
Traceroute also supports sending TCP and ICMP:
-I -- icmp Use ICMP ECHO for tracerouting-T -- tcp Use tcp syn for tracerouting-P port -- port = port
Generally, the traceroute tool is installed in Linux by default. If not, install the
by applications, so the target host will return ICMP.
Traceroute also supports sending TCP and ICMP:
-I --icmp Use ICMP ECHO for tracerouting -T --tcp Use TCP SYN for tracerouting -p port --port=port
Generally, the traceroute tool is installed in Linux by default. If not, install the traceroute tool in yum.
The simplest ba
Difference between traceroute and tracertRecently, when reading the TCP/IP details Volume 1, the traceroute and tracert commands gave me a small pitfall. The two were originally different.I captured packets under windows, but I still cannot catch udp packets ....I also reminded myself that it was time to read a book !!!Both are used to detect the IP addresses that route data packets from the source to the d
device itself. Of course, if a DNS problem, can not resolve host name, domain name, there will be a long delay phenomenon; You can add the-n parameter to avoid DNS resolution and output data in IP format.If there are different network segments in the LAN, we can use Traceroute to troubleshoot the problem, whether it is the host problem or the gateway problem. If we encounter a problem through remote access to a server, we use the gateway that the
exhausted.
2. Why * is returned during the 8-9 10 hop? Let's reasonably guess:
In my network, it takes at least 7 hops to access the Baidu website. After Article 7, the UDP packet with TTL = 8 may have arrived at the Baidu host, so why is traceroute not over?
A reasonable assumption is that the host of Baidu 14.215.177.38 directly discards our UDP packet and refuses to return the ICMP-destination inaccessible packet;
Because
Traceroute transmits packets with small TTL (time to Live) values.The TTL is an IP header field , which is used to prevent packets from running into endless loops. When a router this handles the packet subtracts one from the packet ' s TTL. The packet expires and it ' s discarded when the TTL reaches zero.Traceroute sends ICMP time Exceeded messages, (RFC 792), when the sender is this occurs. By using small TTL values, the packets would quickly expire
the TTL is changed to 0, the router discards the packet and generates an ICMP datagram that is inaccessible to the host. After receiving the datagram, the host sends a UDP datagram with TTL = 2 to the target host, and then stimulates the second router to send an ICMP data report to the host. Until the target host is reached. In this way, traceroute obtains all the router IP addresses. This avoids the problem that the IP header can only record limited
such problems at home, that is, we found the problem, IDC service providers will not be able to help us solve.Example 2: Hop count settingCommand:Traceroute-m www.baidu.comOutput:[Email protected] ~]# traceroute-m www.baidu.comTraceroute to Www.baidu.com (61.135.169.105), hops max, + byte packets1 192.168.74.2 (192.168.74.2) 1.534 ms 1.775 ms 1.961 ms2 211.151.56.1 (211.151.56.1) 0.508 ms 0.514 ms 0.507 ms3 211.151.227.206 (211.151.227.206) 0.571 ms
The traceroute is probing, with a TTL of 1 and then ICMP sent to the first route. After a TTL minus 1TTL is 0. Returns information. Again ttl=2 hair. Click How to know is to reach the destination. Because UDP data was sent.That is to say ping, ping is using ICMP, Traceroute is also. However, UDP is used in the back. The other end may have ACLs filtering UDPA common one-way ping or a lot of this is an ACL is
host (Do you still remember what TTL is ?) After the first router receives the packet, the TTL is automatically reduced by 1 and the TTL is changed to 0, the router discards the packet and generates an ICMP datagram that is inaccessible to the host. After receiving the datagram, the host sends a UDP datagram with TTL = 2 to the target host, and then stimulates the second router to send an ICMP data report to the host. Until the target host is reached. In this way,
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.