Small commands are useful in troubleshooting vro faults through Ping

Source: Internet
Author: User

In router fault analysis, the Ping command is a common and practical network management tool. It can be used to test the end-to-end connectivity, that is, to check whether the source-to-target network is smooth. The Ping principle is very simple, that is, to send a certain number of network packets from the source end to the destination end, and then return the responses of these packets from the destination end. If the endogenous end receives the response within a certain period of time, the program returns the time interval from packet sending to receipt. The network latency can be counted based on the time interval. If the response of the network packet is not received within a certain period of time, the program considers the packet loss and returns the request timeout result. We often send a certain number of packets at a Ping time, and then check the number of packets received, we can calculate the packet loss rate of the end-to-end network, and the packet loss rate is an important parameter to test the network quality.

The meanings of the symbols returned by Ping on the vroping are as follows:
Symbol description
! Receives a response.
The network server timed out while waiting.
The U target cannot be reached and is affected by the incorrect PDU.
Q source disappears (the target device is too busy ).
M data cannot be separated.
? The package type is unknown.
& The validity period of the message has expired.
There are many reasons why a single IP address cannot be pinged on a vro. For example, if a line fails, the interfaces of the other vro do not exist, the router's routing table does not have the routing information of this address, and so on, will cause the network to fail to Ping.

Instance 1:

The network structure is shown in Figure 1.

 
Figure 1

Router1 # Ping 34.0.0.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 34.0.0.4, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
On Router1, you cannot Ping the Router4 interface. You can use the DEBUG command to obtain more information for further analysis:
Router1 # debug ip packet
IP packet debugging is on
Router1 # Ping 34.0.0.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 34.0.0.4, timeout is 2 seconds:
5d21h: IP: s = 12.0.0.1 (local), d = 34.0.0.4, Len 100, unroutable.
5d21h: IP: s = 12.0.0.1 (local), d = 34.0.0.4, Len 100, unroutable.
......
Success rate is 0 percent (0/5)
We can see the "unroutable" message, indicating that there is no route information for this address in the Router1 routing table, Router1 does not know where the address is forwarded, now add a default route to Router1:
Router1 # configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router1 (config) # ip route 0.0.0.0 0.0.0.0 Serial0/0
Then, use Ping on Router1:
Router1 # Ping 34.0.0.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 34.0.0.4, timeout is 2 seconds:
U. U. U
Success rate is 0 percent (0/5)
6d03h: IP: s = 12.0.0.1 (local), d = 34.0.0.4 (Serial0/0), Len 100, sending
6d03h: ICMP type = 8, code = 0
6d03h: IP: s = 12.0.0.2 (Serial0/0), d = 12.0.0.1 (Serial0/0), Len 56, rcvd 3
6d03h: ICMP type = 3, code = 1
......
Let's see what information is received on Router2:
Router2 #
21: 56: 04: IP: s = 12.0.0.1 (Serial1), d = 34.0.0.4, Len 100, unroutable
21: 56: 04: ICMP type = 8, code = 0
21: 56: 04: IP: s = 12.0.0.2 (local), d = 12.0.0.1 (Serial1), Len 56, sending
21: 56: 04: ICMP type = 3, code = 1
......
From the above information, we can see that Router1 can correctly send packets to Router2, but it seems that Router2 does not know how to forward the address 34.0.0.4, so Router2 sends an "unreachable" message to router1. Therefore, add the dynamic routing protocol RIP to Router2 and Router3 respectively:
Router2 #
Router rip
Network 12.0.0.0
Network 23.0.0.0
Router3 #
Router rip
Network 23.0.0.0
Network 34.0.0.0
Then, Ping the Router4 interface on Router1:
Router1 # Ping 34.0.0.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 34.0.0.4, timeout is 2 seconds:
5d21h: IP: s = 12.0.0.1 (local), d = 34.0.0.4 (Serial0/0), Len 100, sending.
5d21h: IP: s = 12.0.0.1 (local), d = 34.0.0.4 (Serial0/0), Len 100, sending.
......
Success rate is 0 percent (0/5)
Now the situation looks better. Router1 can send packets to Router4, but it cannot receive any information returned from router4. It seems that there are also problems with Router4:
Router4 #
6d23h: IP: s = 12.0.0.1 (Serial0/0), d = 34.0.0.4 (Serial0/0), Len 100, rcvd 3
6d23h: IP: s = 34.0.0.4 (local), d = 12.0.0.1, Len 100, unroutable
......
Router4 received the ICMP packet but failed to respond to the packet sent from 12.0.0.1 because it did not have the route information of 12.0.0.1. Add a default route on Router4:
Router4 (config) # ip route 0.0.0.0 0.0.0.0 Serial0/0
The problem is solved as follows:
Router1 # Ping 34.0.0.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 34.0.0.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 32/35/36 MS

[1] [2] Next page

Example 2:

The network structure is shown in Figure 2:

 
Figure 2
A lan interface is added to Router1:
Router1 (config) # interface e0/1
Router1 (config-if) # ip address
Router1 (config-if) # ip address 255.0.0.1 255.255.255.0
As a result, a PC on the LAN can Ping Router1, but cannot Ping Router2, but can Ping Router2 on Router1.
Router1 # Ping 12.0.0.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 12.0.0.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/7/9 MS
Router1 #
5d23h: IP: s = 12.0.0.1 (local), d = 12.0.0.2 (Serial0/0), Len 100, sending
5d23h: IP: s = 12.0.0.2 (Serial0/0), d = 12.0.0.1 (Serial0/0), Len 100, rcvd 3
When a common Ping is used on a vro。, the source IP address is the IP address of the interface sent out from the Ping packet on the vro. On the vro, you can use the extended Ping command to change the default source IP address. Now, on router1, use the extended Ping command to simulate packets from the LAN to Router2:
Router1 # Ping
Protocol [ip]:
Target IP address: 12.0.0.2
Repeat count [5]:
Datemedisize [100]:
Timeout in seconds [2]:
Extended commands [n]: y
Source address or interface: 255.0.0.1
Type of service [0]:
Set DF bit in IP header? [No]:

Validate reply data? [No]:
Data pattern [0 xABCD]:
Loose, Strict, Record, Timestamp, Verbose [none]:
Sweep range of sizes [n]:
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 12.0.0.2, timeout is 2 seconds:
5d23h: IP: s = 255.0.0.1 (local), d = 12.0.0.2 (Serial0/0), Len 100, sending.
......
Success rate is 0 percent (0/5)
From the above information, when the source IP address is ipv0.0.1, Router1 can send packets to Router2, but cannot receive the response packet from router2. The solution is simple. You only need to add a route entry to route 0.0.0 on Router2. The basic principle of successful Ping is that the Ping device must also know how to send the packet back to the source address that initiates the Ping. From Router1, You can Ping Router2 because the IP address of the packet egress interface is used as the source address by default. However, Router2 does not know the new LAN, so when the source address is a new LAN, it does not know how to send packets back to the new LAN.

From the above two instances, we can see that with the help of the Debug command, we can also use the Ping command to find and solve some complex faults in the network, instead of simply using it as a tool to test whether the network is accessible. In particular, the extended Ping command in the vro can set the source IP address at will. In actual use, it can bring us a lot of convenience in determining network faults.

Previous Page [1] [2]

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.