Ping Failure Troubleshooting
Network Topology
Physical Network Topology
Figure 1-1 Network where a ping failure occurs
Fault Description
SwitchA and SwitchC could not ping each other.
Configuration Files
l SwitchA
interface Vlanif20
ip address 1.1.1.1 255.255.255.0
interface Ethernet0/0/0
ip address 10.220.7.128 255.255.254.0
interface GigabitEthernet1/1/23
port link-type access
port default vlan 20
ip route-static 0.0.0.0 0.0.0.0 10.220.6.1
l SwitchB
vlan batch 20 30 103 220
acl number 3000
rule 5 permit icmp source 2.1.1.1 0 destination 1.1.1.1 0
rule 10 permit icmp source 1.1.1.1 0 destination 2.1.1.1 0
interface Vlanif20
ip address 1.1.1.2 255.255.255.0
interface Vlanif30
ip address 2.1.1.2 255.255.255.0
interface Vlanif220
ip address 10.220.7.121 255.255.254.0
interface Ethernet0/0/2
port link-type access
port default vlan 103
interface Ethernet0/0/23
port link-type access
port default vlan 20
interface Ethernet0/0/24
port link-type access
port default vlan 30
interface GigabitEthernet0/0/2
port link-type trunk
port trunk pvid vlan 220
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 220
ip route-static 0.0.0.0 0.0.0.0 10.220.6.1
l SwitchC
vlan batch 30 10
interface Vlanif30
ip address 2.1.1.1 255.255.255.0
interface MEth0/0/1
ip address 10.220.7.122 255.255.254.0
interface GigabitEthernet0/0/2
port link-type access
port default vlan 103
interface GigabitEthernet0/0/24
port link-type access
port default vlan 30
ip route-static 0.0.0.0 0.0.0.0 10.220.6.1
ip route-static 1.1.1.0 255.255.255.0 2.1.1.2
Troubleshooting Location
If SwitchA cannot ping IP address 2.1.1.1, it is difficult to locate the fault cause. In this situation, reduce the fault range. Check the IP routing table and ping SwitchB, SwitchC from SwitchA, ping SwitchCfrom SwitchB, and so on. Then you can determine which network segment has the problem.
Step 1 Check IP routing table on each switch.
Run the display ip routing-table command in any view of the device to check whether the ip routing table is correct.
<SwitchA> display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 7 Routes : 7
Destination/Mask Proto Pre Cost Flags NextHop Interface
0.0.0.0/0 Static 60 0 RD 10.220.6.1 Ethernet0/0/0/0
1.1.1.0/24 Direct 0 0 D 1.1.1.1 Vlanif20
1.1.1.1/32 Direct 0 0 D 127.0.0.1 Vlanif20
10.220.6.0/23 Direct 0 0 D 10.220.7.128 Ethernet0/0/0/0
10.220.7.128/32 Direct 0 0 D 127.0.0.1 Ethernet0/0/0/0
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
<SwitchB> display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 9 Routes : 9
Destination/Mask Proto Pre Cost Flags NextHop Interface
0.0.0.0/0 Static 60 0 RD 10.220.6.1 Vlanif220
1.1.1.0/24 Direct 0 0 D 1.1.1.2 Vlanif20
1.1.1.2/32 Direct 0 0 D 127.0.0.1 InLoopBack0
2.1.1.0/24 Direct 0 0 D 2.1.1.2 Vlanif30
2.1.1.2/32 Direct 0 0 D 127.0.0.1 InLoopBack0
10.220.6.0/23 Direct 0 0 D 10.220.7.121 Vlanif220
10.220.7.121/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
<SwitchC> display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 6 Routes : 6
Destination/Mask Proto Pre Cost Flags NextHop Interface
0.0.0.0/0 Static 60 0 RD 10.220.6.1 MEth0/0/1
1.1.1.0/24 Static 60 0 RD 2.1.1.2 Vlanif30
2.1.1.0/24 Direct 0 0 D 2.1.1.1 Vlanif30
2.1.1.1/32 Direct 0 0 D 127.0.0.1 Vlanif30
10.220.6.0/23 Direct 0 0 D 10.220.7.122 MEth0/0/1
10.220.7.122/32 Direct 0 0 D 127.0.0.1 MEth0/0/1
127.0.0.0/8 direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
By checking the routing table for SwitchA, SwitchB, and SwitchC, you can find that the routing table on the SwitchA device does not have a table entry to the 2.1.1.0/24 network segment.
Solution:Configure a static route to SwitchC on teh SwitchA.On SwitchA, configure a static route to SwitchC.
[SwitchA] ip route-static 2.1.1.0 255.255.255.0 1.1.1.2
After the configuration modification, you can find that SwitchA still failed to ping the SwitchC, go to Step 2.
<SwitchA> ping 2.1.1.1
PING 2.1.1.1: 56 data bytes, press CTRL_C to break
Request time out
Request time out
Request time out
Request time out
Request time out
--- 2.1.1.1 ping statistics ---
5 packet(s) transmitted
0 packet(s) received
100.00% packet loss
Step 2 Check the ping test on per segment.
Run the ping command on the device to determine which network segment has the problem.
#Check whether the host at 2.1.1.2 is reachable on SwitchA.
<SwitchA> ping 2.1.1.2
PING 2.1.1.2: 56 data bytes, press CTRL_C to break
Reply from 2.1.1.2: bytes=56 Sequence=1 ttl=254 time=2 ms
Reply from 2.1.1.2: bytes=56 Sequence=2 ttl=254 time=2 ms
Reply from 2.1.1.2: bytes=56 Sequence=3 ttl=254 time=2 ms
Reply from 2.1.1.2: bytes=56 Sequence=4 ttl=254 time=2 ms
Reply from 2.1.1.2: bytes=56 Sequence=5 ttl=254 time=2 ms
--- 2.1.1.2 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 2/2/2 ms
#Check whether the host at 2.1.1.2 is reachable on SwitchC.
<Switchc> ping 2.1.1.2
PING 2.1.1.2: 56 data bytes, press CTRL_C to break
Request time out
Request time out
Request time out
Request time out
Request time out
--- 2.1.1.2 ping statistics ---
5 packet(s) transmitted
0 packet(s) received
100.00% packet loss
The fault exists between SwitchB and SwitchC,go to Step 3.
Step 3 Check the STP status.
Run the display stp brief command to view the STP status. In the STP State column, FORWARDING indicates forwarding and DISCARDING indicates blocked.
<SwitchC> display stp brief
MSTID Port Role STP State Protection
0 GigabitEthernet0/0/2 ROOT FORWARDING NONE
0 GigabitEthernet0/0/24 ALTE DISCARDING NONE
It is found that GE0/0/24 of SwitchC was blocked.
Solution: Shutdown the other interface connectd to the SwitchB OR Add the two interfaces connecting SwitchB and SwitchC to the same Eth-Trunk.
Root Cause
1. No static route to SwitchC is configured on the SwitchA.
2. The port is blocked by the STP protocol because of the loop.