Troubleshooting

This chapter provides information and commands concerning the following topics:

• Viewing the routing table

• Determining the gateway of last resort

• Determining the last routing update

• Interpreting the show interface command

• Clearing interface counters

• Using CDP to troubleshoot

• The traceroute command

• The show controllers command

• debug commands

• Using time stamps

• Operating system IP verification commands

• The ip http server command

• The netstat command

Viewing the Routing Table

Router#show ip route

Displays the entire routing table

Router#show ip route protocol

Displays a table about a specific protocol (for example, RIP or IGRP)

Router#show ip route w.x.y.z

Displays information about route w.x.y.z

Router#show ip route connected

Displays a table of connected routes

Router#show ip route static

Displays a table of static routes

Router#show ip route summary

Displays a summary of all routes

Determining the Gateway of Last Resort

Router(config)#ip default-network w. x. y. z

Sets network w.x.y.z to be the default route. All routes not in the routing table will be sent to this network.

Router(config)#ip route 0.0.0.0 0.0.0.0 172.16.20.1

Specifies that all routes not in the routing table will be sent to 172.16.20.1.

NOTE: The ip default-network command is for use with the deprecated Cisco proprietary Interior Gateway Routing Protocol (IGRP). Although you can use it with Enhanced Interior Gateway Routing Protocol (EIGRP) or RIP, it is not recommended. Use the ip route 0.0.0.0 0.0.0.0 command instead.

Routers that use the ip default-network command must have either a specific route to that network or a 0.0.0.0 /0 default route.

Determining the Last Routing Update

Router#show ip route

Displays the entire routing table

Router#show ip route w.x.y.z

Displays information about route w.x.y.z

Router#show ip protocols

Displays the IP routing protocol parameters and statistics

Router#show ip rip database

Displays the RIP database

OSI Layer 3 Testing

Router#ping w.x.y.z

Checks for Layer 3 connectivity with the device at address w.x.y.z

Router#ping

Enters extended ping mode, which provides more options

NOTE: See Chapter 20, "The ping and traceroute Commands," for all applicable ping commands.

OSI Layer 7 Testing

NOTE: See Chapter 19, "Telnet and SSH," for all applicable Telnet commands.

Router#debug telnet

Displays the Telnet negotiation process

Interpreting the show interface Command

Router#show interface serial 0/0/0

Displays the status and stats of the interface.

Serial 0/0/0 is up, line protocol is up

The first part refers to the physical status. The second part refers to the logical status.

...<output cut>...

Possible output results:

Serial 0/0/0 is up, line protocol is up

The interface is up and working.

Serial 0/0/0 is up, line protocol is down

Keepalive or connection problem (no clock rate, bad encapsulation).

Serial 0/0/0 is down, line protocol is down

Interface problem, or other end has not been configured.

Serial 0/0/0 is administratively down, line protocol is down

Interface is disabled—shut down.

Clearing Interface Counters

Router#clear counters

Resets all interface counters to 0

Router#clear counters interface type/slot

Resets specific interface counters to 0

Using CDP to Troubleshoot

NOTE: See Chapter 19 for all applicable CDP commands.

The traceroute Command

Router#traceroute w.x.y.z

Displays all routes used to reach the destination of w.x.y.z

NOTE: See Chapter 20 for all applicable traceroute commands.

The show controllers Command

Router#show controllers serial 0/0/0

Displays the type of cable plugged into the serial interface (DCE or DTE) and what the clock rate is, if it was set

debug Commands

Router#debug all

Turns on all possible debugging.

Router#u all

(short form of undebug all)

Turns off all possible debugging.

Router#show debug

Lists what debug commands are on.

Router#terminal monitor

Debug output will now be seen through a Telnet session (default is to only send output on the console screen)

CAUTION: Turning all possible debugging on is extremely CPU intensive and will probably cause your router to crash. Use extreme caution if you try this on a production device. Instead, be selective about which debug commands you turn on.

Do not leave debugging turned on. After you have gathered the necessary information from debugging, turn all debugging off. If you want to turn off only one specific debug command and leave others on, issue the no debug xcommand, where x is the specific debug command you want to disable.

The ip http server Command 217

Using Time Stamps

Router(config)#service timestamps

Adds a time stamp to all system logging messages

Router(config)#service timestamps debug

Adds a time stamp to all debugging messages

Router(config)#service timestamps debug uptime

Adds a time stamp along with the total uptime of the router to all debugging messages

Router(config)#service timestamps debug datetime localtime

Adds a time stamp displaying the local time and the date to all debugging messages

Router(config)#no service timestamps

Disables all time stamps

TIP: Make sure you have the date and time set with the clock command at privileged mode so that the time stamps are more meaningful.

Operating System IP Verification Commands

The following are commands that you should use to verify what your IP settings are. Different operating systems have different commands.

Click Start > Run > Command > ipconfig or ipconfig/all.

Click Start > Run > winipcfg.

#ifconfig

The ip http server Command

Router(config)#ip http server

Enables the HTTP server, including the Cisco web browser user interface

Router(config-if)#no ip http server

Disables the HTTP server

CAUTION: The HTTP server was introduced in Cisco IOS Software Release 11.0 to extend router management to the web. You have limited management capabilities to your router through a web browser if the ip http server command is turned on.

Do not turn on the ip http server command unless you plan to use the browser interface for the router. Having it on creates a potential security hole because another port is open.

The netstat Command

C\>netstat

Used in Windows and UNIX/Linux to

display TCP/IP connection and protocol

information; used at the command prompt

Was this article helpful?

0 0

Post a comment