My Go To Cisco Troubleshooting Commands

Cisco

My Go To Cisco Troubleshooting Commands

Cisco troubleshooting is a skill that can be taught and learned. You just need to learn over time or learn from somebody who can show you how.

I’ve spent many years teaching Cisco networking and coached many thousands of students over the years. The biggest stumbling block they seem to hit while studying, taking exams, and in the real world is troubleshooting network problems. If it’s a network you have built, it’s much easier because you can backtrack to when it last worked and recall any changes you made. If it’s a new network (such as in the exam), you will find it harder.

There are many methods and models you can use, such as top-down or bottom-up, for the OSI model, and it can depend on what problem you are seeing. If one user can’t get network access, then it will require a different approach to the entire network being unavailable.

We’ll look at networking issues for routers and routing in this post. For switching, it’s a bit different because we may have to troubleshoot STP, which requires different commands and, sometimes, having to find which MAC address is connected to which port.

We’ll work on a simple network issue you may encounter in the CCNA exam and use the OSI model to troubleshoot it.

The Topology

I created a simple network using Cisco Packet Tracer. It’s a free network simulation tool you can download from Cisco Networking Academy when you create an account.

topology

The labels are indicated on the image, but PC1 on the far left connects to Switch0, which connects to Router0, which connects to Router1 to Switch1, and then PC0. I’m sure you already know that straight network cables connect PCs to Switches and Switches to routers. The routers are connected using a WAN cable, and R0 on the left has a clock rate to set the speed.

Note the network numbers. The left portion uses 192.168.1.0/24; the WAN uses 10.0.0.0./30, and the right-hand side LAN uses 172.16.0.0/16.

So we know a few things here already:

  • We need all the cables to be attached
  • We need the correct cable types
  • We need the IP addresses on the interfaces
  • The interfaces should be enabled (administratively up)
  • There should be some sort of routing, such as static or dynamic
  • The PCs should have a default gateway for traffic

If it’s all working correctly, PC1 should be able t ping PC0.

Where to Start?

The easiest place to start with this network is to see if you can ping from one end of the network to the other, so, as stated above, ping from PC1 to PC0. We’ll just assume the network address for .1 is always used on the router interface, and the next available one of .2 is on the PC interfaces. This would be shown in the network diagram usually, or you can check the PC settings by clicking on it.

 

So from the left-hand side PC, PC1, we should be able to ping to 172.16.1.2. If not, we can start troubleshooting.

can't ping

So we can’t ping across the network. The next logical step might be to start at the physical layer of the OSI, so is the cable attached to the interface? We can’t actually physically get to this network, but we can check on the switch interface to see if it can see traffic hitting the interface the PC is attached to or even if a cable is attached.

So, there are a number of approaches I’d take here; in this scenario, I’d check the PC configuration, and if that is okay, I’d check the switch and then the router. The switches have no configuration in this lab, so I won’t ask you to check them. I could do the OSI checks from Layer 1 up, so are cables attached, Layer 2 is the encapsulation correct, Layer 3 for IP address and subnet mask, and then Layer 4 for routing configuration.

Note that on this tiny network, you might just want to go from one end to the other, checking the OSI layers because you can see from the network diagram what should be where for cables, IP addresses, and routing. We’ll take this approach this time.

PC1

PC1 should have the correct IP address, it should have a straight cable attached to the FastEthernet interface, and it should have a default gateway to the router.

default gateway

This is clearly the incorrect default gateway because the facing router interface is 192.168.1.1. Change it, and then try the ping again.

ping

The ping failed again. If you are satisfied PC1 is configured correctly, then you need to move across to the router (we aren’t looking at the switches today).

Router0

The diagram tells us that the IP address should be 192.168.1.1, assigned to the G0/0 interface. The go to command is show ip interface brief for routers.

Router0>enable

Router0#show ip interface brief

Interface IP-Address OK? Method Status Protocol

GigabitEthernet0/0 unassigned YES manual up up

GigabitEthernet0/1 192.168.1.1 YES manual up down

Serial0/1/0 10.0.0.1 YES manual down down

Serial0/1/1 unassigned YES unset administratively down down

Vlan1 unassigned YES unset administratively down down

Router0#

The IP address is correct, but it’s been allocated to the G0/1 interface. You can use the no ip address command and then configure G0/0 with the IP address.

Router0#conf t

Enter configuration commands, one per line. End with CNTL/Z.

Router0(config)#int g0/1

Router0(config-if)#no ip address

Router0(config-if)#int g0/0

Router0(config-if)#ip address 192.168.1.1 255.255.255.0

Router0(config-if)#no shut

Router0(config-if)#end

Router0#

%SYS-5-CONFIG_I: Configured from console by console

Router0#ping 192.168.1.2

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 0/3/17 ms

To save time, I pinged the PC from the router, and it worked, so we need not return to PC1. We could go back to ping end-to-end again, but we have already fixed that portion of the network. The next logical step is to ping from Roouter0 to Router1. You may already know that this won’t work by looking at the output of the show ip interface brief command above.

Router0#ping 10.0.0.2

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 10.0.0.2, timeout is 2 seconds:

…..

Success rate is 0 percent (0/5)

There could be a number of reasons for the failure, but we already know that the IP address is correct from the earlier interface command and that it’s attached to the correct interface. The first down means physically and the second is for the encapsulation and keepalives. We can check this side with one more command, but it might be necessary to hop over to Router1 soon.

Router0#show interface s0/1/0

Serial0/1/0 is down, line protocol is down (disabled)

Hardware is HD64570

Internet address is 10.0.0.1/8

And one more command is useful. I prefer to use the show run interface s0/1/0, but Packet Tracer doesn’t support it. I’ve removed the irrelevant output and left only the interface.

Router0#show run

Building configuration…

interface Serial0/1/0

ip address 10.0.0.1 255.0.0.0

clock rate 64000

It all appears correct, so let’s check Router1.

Router1#show interface s0/1/0

Serial0/1/0 is administratively down, line protocol is down (disabled)

Hardware is HD64570

Internet address is 10.0.0.2/8

The interface is administratively shut down. This is an easy fix.

Router1#conf t

Enter configuration commands, one per line. End with CNTL/Z.

Router1(config)#int s0/1/0

Router1(config-if)#no shutdown

Router1(config-if)#

%LINK-5-CHANGED: Interface Serial0/1/0, changed state to up

Router1(config-if)#end

Router1#ping 10.0.0.1

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 10.0.0.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 1/9/25 ms

Router1#

So where to next? I’m happy that the left side of the network is working but we need to have it working end-to-end. I think the next step would be to ping from Router0 to the end of the network where PC0 sits. We know that all the cables need to be attached, and the correct IP addresses allocated, but also that routing needs to work (or static routes) so that the routers know the location of all networks not directly attached.

Router0#ping 172.16.1.2

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 172.16.1.2, timeout is 2 seconds:

…..

Success rate is 0 percent (0/5)

Zero success, but we don’t know if the ping packet is leaving Router1; we do know that we can ping between Router0 and Router1 though. We need to check the routing table.

Routing

Router0 needs to know about the existence of all networks. We’ll check the routing table, presuming that we are using dynamic routing for this lab.

Router0#show ip route

Codes: L – local, C – connected, S – static, R – RIP, M – mobile, B – BGP

D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area

N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2

E1 – OSPF external type 1, E2 – OSPF external type 2, E – EGP

i – IS-IS, L1 – IS-IS level-1, L2 – IS-IS level-2, ia – IS-IS inter area

* – candidate default, U – per-user static route, o – ODR

P – periodic downloaded static route

Gateway of last resort is not set

10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks

C 10.0.0.0/8 is directly connected, Serial0/1/0

L 10.0.0.1/32 is directly connected, Serial0/1/0

192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks

C 192.168.1.0/24 is directly connected, GigabitEthernet0/0

L 192.168.1.1/32 is directly connected, GigabitEthernet0/0

I can’t see the 172 network. The next command is:

Router0#show ip protocols

Routing Protocol is “rip”

Sending updates every 30 seconds, next due in 27 seconds

Invalid after 180 seconds, hold down 180, flushed after 240

Outgoing update filter list for all interfaces is not set

Incoming update filter list for all interfaces is not set

Redistributing: rip

Default version control: send version 1, receive any version

Interface Send Recv Triggered RIP Key-chain

GigabitEthernet0/0 12 1

Automatic network summarization is in effect

Maximum path: 4

Routing for Networks:

11.0.0.0

192.168.1.0

Passive Interface(s):

Routing Information Sources:

Gateway Distance Last Update

Distance: (default is 120)

Router0#

We are advertising the 11 network instead of the 10 network. We need to fix that and then hop over to Router1.

Router0#conf t

Enter configuration commands, one per line. End with CNTL/Z.

Router0(config)#router rip

Router0(config-router)#no network 11.0.0.0

Router0(config-router)#network 10.0.0.0

Router1

Router1 should have all interfaces up, correct IP addresses and correct routes. You know the commands I’m sure.

Router1#show ip interface brief

Interface IP-Address OK? Method Status Protocol

GigabitEthernet0/0 172.16.1.1 YES manual up up

GigabitEthernet0/1 unassigned YES unset administratively down down

Serial0/1/0 10.0.0.2 YES manual up up

Serial0/1/1 unassigned YES unset administratively down down

Vlan1 unassigned YES unset administratively down down

Router1#

Router1#show ip route

Codes: L – local, C – connected, S – static, R – RIP, M – mobile, B – BGP

D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area

N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2

E1 – OSPF external type 1, E2 – OSPF external type 2, E – EGP

i – IS-IS, L1 – IS-IS level-1, L2 – IS-IS level-2, ia – IS-IS inter area

* – candidate default, U – per-user static route, o – ODR

P – periodic downloaded static route

Gateway of last resort is not set

10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks

C 10.0.0.0/8 is directly connected, Serial0/1/0

L 10.0.0.2/32 is directly connected, Serial0/1/0

172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks

C 172.16.0.0/16 is directly connected, GigabitEthernet0/0

L 172.16.1.1/32 is directly connected, GigabitEthernet0/0

R 192.168.1.0/24 [120/1] via 10.0.0.1, 00:00:25, Serial0/1/0

Router1#show ip protocols

Routing Protocol is “rip”

Sending updates every 30 seconds, next due in 6 seconds

Invalid after 180 seconds, hold down 180, flushed after 240

Outgoing update filter list for all interfaces is not set

Incoming update filter list for all interfaces is not set

Redistributing: rip

Default version control: send version 1, receive any version

Interface Send Recv Triggered RIP Key-chain

GigabitEthernet0/0 12 1

Serial0/1/0 12 1

Automatic network summarization is in effect

Maximum path: 4

Routing for Networks:

10.0.0.0

172.16.0.0

Passive Interface(s):

Routing Information Sources:

Gateway Distance Last Update

10.0.0.1 120 00:00:03

Distance: (default is 120)

Router1#

Everything appears in order. All the interfaces are up with the correct IP addresses; the routing table can see the 192 network, and the correct routes are advertised. While you are on Router1 you might as well sign off on everything to the left by pinging PC1.

Router1#ping 192.168.1.2

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 1/9/15 ms

Router1#

There is no need to worry about anything to the left of Router1, but can we ping PC0?

Router1#ping 192.168.1.2

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 1/9/15 ms

Router1#

It worked. I actually swapped out the crossover cable from the switch to the PC, but the switch auto-detected the issue, and it started working again.

Conclusion

You may have taken a different approach to me which is fine. Just don’t start randomly clicking on devices or trying to check the entire show run on the routers, or doing random pings.

Check from one end to the other across the OSI layers or choose one router as the base and check the same.

We cover troubleshooting in great detail in our lab courses and the 101 Labs book on Amazon.

 

Paul102

101 Labs Newsletter

Exam