Troubleshooting Hardware
The Cisco IOS diagnostic toolset include Cisco Generic Online Diagnostics (GOLD) and Cisco IOS Service Diagnostics. Running diagnostics is an inherent part of maintenance as well as troubleshooting. For example, diagnostics may be run on newly purchased hardware to ensure and validate functionality before it is integrated into the existing network. Additionally, diagnostics could also be run on hardware while troubleshooting a problem report, in an attempt to isolate issues.
Cisco GOLD defines a common framework for diagnostics operations across different platforms running Cisco IOS Software. The GOLD framework specifies the platform-independent fault-detection architecture for centralized and distributed systems. This includes the common diagnostics CLI and the platform-independent fault-detection procedures for boot-up and runtime diagnostics. When boot-up diagnostics detects a failure on a Cisco Catalyst 6500 Series switch, for example, the failing modules are shut down.
Should diagnostics fail, you can open up a trouble report or ticket with the Technical Assistance Center (TAC) to perform additional troubleshooting for the specified module(s) or initiate the process of replacing the faulty hardware. By default, Catalyst 6500 series switches run minimal diagnostics at boot-up; however, this default diagnostics behavior can be changed using thediagnostic bootup level [minimal | complete] global configuration command to allow the switch to run complete (full) diagnostics at boot-up instead.
Once the switch has completed running boot-up diagnostic, you can use the show modulecommand to verify the status of the diagnostic testing as shown in the following output:
| Catalyst-6500-Core-Switch#show module Mod Ports Card Type Model Serial No. — —– ——————————- —————— ————– 5 2 Supervisor Engine 720 (Active) WS-SUP720-BASE SAD18140BKZMod MAC addresses Hw Fw Sw Status — ———————————- —— ——– ———— ——- 5 000d.bda3.eaa8 to 000d.bda3.eaab 3.1 8.5(1) 12.2(18)SXF1 OkMod Sub-Module Model Serial Hw Status —- ————————— ————– ———– ——- ——- 5 Policy Feature Card 3 WS-F6K-PFC3A SAD08150810 2.2 Ok 5 MSFC3 Daughterboard WS-SUP720 SAD0815048A 2.2 Ok Mod Online Diag Status |
The show diagnostic result command can be used to view detailed testing information about the boot-up diagnostics for all modules as shown in the following output:
| Catalyst-6500-Core-Switch#show diagnostic resultCurrent bootup diagnostic level: completeModule 5: Supervisor Engine 720 (Active) SerialNo : SAD18140BKZ
Overall Diagnostic Result for Module 5 : PASS Test results: (. = Pass, F = Fail, U = Untested) 1) TestScratchRegister ————-> . Port 1 2
4) TestActiveToStandbyLoopback: Port 1 2
5) TestLoopback: Port 1 2
6) TestNewIndexLearn —————> . Port 1 2
24) TestFabricSnakeForward ———-> . |
NOTE: You are not required to configure GOLD for the current TSHOOT certification exam.
In addition to boot-up diagnostics, you can also run on-demand diagnostics or even schedule diagnostic testing to be run at a specific time. These configurations, however, are beyond the scope of the current TSHOOT certification exam and are not described any further in this guide.
Troubleshooting Cisco IOS Services
In addition to GOLD, Cisco IOS Service Diagnostics allows for diagnostic testing and tools for common problems in Border Gateway Protocol (BGP), Open Shortest Path First (OSPF) Protocol, and Quality of Service (QoS), as well as tools to monitor and detect abnormal system resource utilization using scenario-specific troubleshooting scripts.
Unlike GOLD, Cisco IOS Service Diagnostics is a programmable diagnostics service that also leverages other Cisco IOS Software capabilities, specifically the Embedded Event Manager (EEM), Embedded Syslog Manager (ESM) and Tool Command Language (Tcl). As is the case with GOLD, the configuration of Cisco IOS Service Diagnostics is beyond the scope of the current TSHOOT certification exam and will not be described in further detail in this guide.
Filtering Command Output
While most engineers are familiar with the show command suite that is available in Cisco IOS software, not all of them are aware of the filtering capabilities integrated into the software. Filtering or restricting command output to only the information you will need to troubleshoot a particular problem not only demonstrates your level of knowledge about the capabilities of Cisco IOS software, it also saves time, which can result in a speedier resolution of the problem.
In Cisco IOS software, output filtering is performed by appending the pipe (|) symbol which then allows the output to be acted on according to the specified logic, which includes the begin,exclude, include, and section keywords. Following these keywords, the desired output can be matched against regular expressions. Table 2-3 lists and describes some of the commonly used regular expressions when filtering command output:
| Character | Description |
|---|---|
| ^ (caret) | Indicates the beginning of a string |
| $ (dollar sign) | Indicates the end of a string |
| . (period) | Indicates any character |
| | (pipe) | Specifies an either or operation |
| _ (underscore) | Matches a comma, braces, parenthesis, the beginning of the string, the end of the string, or a space |
| + (plus) | + Matches 1 or more sequences of the pattern |
| * (asterisk) | * Matches 0 or more sequences of the pattern |
| ? (question mark) | ? Matches 0 or 1 occurrences of the pattern |
The begin keyword filters the output beginning at the specified phrase. The following example illustrates how to filter the output of the current (running) configuration such that the output begins at the Border Gateway Protocol (BGP) configuration that is implemented on the router:
| R2#show running-config | begin router bgp router bgp 1 no synchronization bgp router-id 1.1.1.1 bgp log-neighbor-changes network 150.1.1.0 mask 255.255.255.0 network 150.2.2.0 mask 255.255.255.0 network 150.3.3.0 mask 255.255.255.0 neighbor 10.0.0.1 remote-as 2 default-information originate no auto-summary ! ip forward-protocol nd ip route 1.1.1.1 255.255.255.255 Serial0/0 ip route 192.168.1.0 255.255.255.0 Tunnel0 ! ! ip http server no ip http secure-server ! logging 192.168.1.254 logging 150.1.1.254 snmp-server community public RW snmp-server community readonlypassword RO[Truncated Output] |
The exclude keyword is used to exclude the specified phrases or regular expressions from the command output. The following example illustrates how the exclude keyword can be used to filter the output of the show ip interfaces brief command so that only interfaces that only interfaces that are not administratively shut down are displayed in the output of the command:
| R2#show ip interface brief | exclude administratively down Interface IP-Address OK? Method Status Protocol FastEthernet0/0 150.1.1.2 YES NVRAM up up Serial0/0 10.0.0.2 YES NVRAM up up Loopback0 2.2.2.2 YES NVRAM up up Tunnel0 200.1.1.2 YES manual up up |
The include keyword includes the specified phrase or regular expression in the output of the command. If the specified phrase is part of a line, the entire line is displayed. The following example illustrates how to shown on information on errors for a WAN interface. Notice in the output that because the specified keyword is part of a line, the entire line is printed:
| R2#show interfaces serial 0/0 | include error 1 input errors, 0 CRC, 1 frame, 0 overrun, 0 ignored, 0 abort 0 output errors, 0 collisions, 4 interface resets |
The section keyword prints only information that matches the specified section and no more. For example, if the show running-configuration | begin router bgp command was specified, the router would parse the configuration and begin at the statement router bgp. However, the router would also display all other configuration following this. So not only is the BGP configuration displayed, all other configuration after the BGP configuration is included. Using thesection keyword prevents this behavior as is illustrated in the following example:
| R2#show running-config | section router bgp router bgp 1 no synchronization bgp router-id 1.1.1.1 bgp log-neighbor-changes network 150.1.1.0 mask 255.255.255.0 network 150.2.2.0 mask 255.255.255.0 network 150.3.3.0 mask 255.255.255.0 neighbor 10.0.0.1 remote-as 2 default-information originate no auto-summary R2# |
As seen in the output above, only the relevant matched section of the configuration is printed. As stated earlier, regular expressions can also be used when filtering command output. The following example illustrates how to filter the running configuration on a router such that only lines that end with the number 0 (zero) are displayed:
| R2#show running-config | include 0$ ip sla monitor responder type tcpConnect ipaddress 10.0.0.2 port 80 ip sla monitor responder type tcpConnect ipaddress 2.2.2.2 port 80 frequency 30 time-period 10080 ip ftp password 7 1311041A040310 interface Loopback0 interface Tunnel0 ip mtu 1500 tunnel source Serial0/0 interface FastEthernet0/0 ip address 150.1.1.2 255.255.255.0 interface Serial0/0 clock rate 2000000 network 150.1.1.0 mask 255.255.255.0 network 150.2.2.0 mask 255.255.255.0 network 150.3.3.0 mask 255.255.255.0 ip route 1.1.1.1 255.255.255.255 Serial0/0 ip route 192.168.1.0 255.255.255.0 Tunnel0 voice-port 1/0/0 voice-port 1/1/0 port 1/0/0 line con 0 line aux 0 |
And as a final example, the following illustrates how to filter the router output such that only lines that include 0/0 or 0/1 are printed:
| R2#show running-config | include 0/0|0/1 tunnel source Serial0/0 interface FastEthernet0/0 interface Serial0/0 interface Serial0/1 ip route 1.1.1.1 255.255.255.255 Serial0/0 voice-port 1/0/0 voice-port 1/0/1 port 1/0/0 port 1/0/1 |
NOTE: If you include a space between the second pipe and the 0/0 and 0/1 keywords, nothing will be matched by the command.
Redirecting Output
In addition to filtering command output, Cisco IOS software also allows output to be redirected to an external location or Flash memory. This is useful when executing commands that print a lot of information, such as the show tech-support command, for example. Output redirection can be performed using the append, redirect or tee keywords after the pipe.
The append keyword allows you to redirect and add the output of any show command to an existing file. You can use the show <command> | append ? command to view valid locations for the platform on which you are working. The following example shows the use of this command to view valid locations for a Cisco 2600XM series router:
| R2# show ip interface fastethernet 0/0 | append ? ftp: Uniform Resource Locator nvram: Uniform Resource Locator |
In the output above, valid options for the router include appending to a file stored in NVRAM or on an FTP server. The following example shows how to append the output of the running configuration file to an existing file named r2-config that is located on FTP server 150.1.1.254:
| R2#show running-config | append ftp://150.1.1.254/r2-config Writing r2-config R2# |
Keep in mind that the example above assumes that both the router and FTP server have been configured correctly in the event that authentication is required. If credentials are required, include these in the command as shown in the example below which specifies an FTP username of NETADMIN with an FTP password of TSHOOT when connecting to the FTP server:
| R2#show running-config | append ftp://netadmin:tshoot@150.1.1.254/r2-config Writing r2-config R2# |
As previously stated, the redirect keyword is used to redirect the output of a command to a local or remote file location. Again, the options available will depend on the platform on which the command is executed. The following example illustrates the options that are available on a Cisco 2600XM series router running Cisco IOS version 12.4 Mainline:
| R2#show tech-support ospf detail | redirect ? flash: Uniform Resource Locator ftp: Uniform Resource Locator http: Uniform Resource Locator https: Uniform Resource Locator nvram: Uniform Resource Locator pram: Uniform Resource Locator rcp: Uniform Resource Locator scp: Uniform Resource Locator tftp: Uniform Resource Locator |
The following example shows how to redirect the output of the show tech-support ospf detailcommand to a TFTP server with the IP address 150.1.1.254. The file will be saved on the TFTP server with the name r2-ospf-tshoot:
| R2#show tech-support ospf detail | redirect tftp://150.1.1.254/r2-ospf-tshoot ! R2# |
The following example illustrates how to save the same file to the local router Flash memory:
| R2#show tech-support ospf detail | redirect flash:r2-ospf-tshootR2#show flash:System flash directory: File Length Name/status 1 29965496 c2600-adventerprisek9-mz.124-25c.bin 2 1691 r1-confg 3 3142 r2-confg 4 595 interface-statistics 5 38015 r2-ospf-tshoot [30009264 bytes used, 3020876 available, 33030140 total] 32768K bytes of processor board System flash (Read/Write) |
To view the contents of the file (if saved to Flash) you can use the more command as follows:
| R2#more flash:r2-ospf-tshoot —————— show version ——————Cisco IOS Software, C2600 Software (C2600-ADVENTERPRISEK9-M), Version 12.4(25c), RELEASE SOFTWARE (fc2) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2010 by Cisco Systems, Inc. Compiled Thu 11-Feb-10 23:02 by prod_rel_teamROM: System Bootstrap, Version 12.2(7r) [cmong 7r], RELEASE SOFTWARE (fc1) R2 uptime is 22 hours, 47 minutes |
And finally, the tee keyword copies the output of any show command to a file and displays the same content on the terminal at the same time. The following output shows the available locations for copying the file while using the tee keyword on a Cisco 2600XM series router:
| R2#show ip ospf neighbor detail | tee ? /append Copy and append output to URL (URLs supporting append operation only) flash: Uniform Resource Locator ftp: Uniform Resource Locator http: Uniform Resource Locator https: Uniform Resource Locator nvram: Uniform Resource Locator pram: Uniform Resource Locator rcp: Uniform Resource Locator scp: Uniform Resource Locator tftp: Uniform Resource Locator |
The following example illustrates how to view the contents of the show ip ospf neighbor detail command while simultaneously copying the same output to a TFTP server with the IP address 150.1.1.254. The file will be saved on the TFTP server as r2-ospf-output:
| R2#show ip ospf neighbor detail | tee tftp://150.1.1.254/r2-ospf-output ! Neighbor 1.1.1.1, interface address 10.0.0.1 In the area 0 via interface Serial0/0 Neighbor priority is 0, State is FULL, 6 state changes DR is 0.0.0.0 BDR is 0.0.0.0 Options is 0x12 in Hello (E-bit L-bit ) Options is 0x52 in DBD (E-bit L-bit O-bit) LLS Options is 0x1 (LR) Dead timer due in 00:00:31 Neighbor is up for 00:10:07 Index 1/1, retransmission queue length 0, number of retransmission 0 First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0) Last retransmission scan length is 0, maximum is 0 Last retransmission scan time is 0 msec, maximum is 0 msec |
The following example illustrates how to save the same output to Flash while viewing it:
| R2#show ip ospf neighbor detail | tee flash:r2-ospf-output Neighbor 1.1.1.1, interface address 10.0.0.1 In the area 0 via interface Serial0/0 Neighbor priority is 0, State is FULL, 6 state changes DR is 0.0.0.0 BDR is 0.0.0.0 Options is 0x12 in Hello (E-bit L-bit ) Options is 0x52 in DBD (E-bit L-bit O-bit) LLS Options is 0x1 (LR) Dead timer due in 00:00:38 Neighbor is up for 00:19:50 Index 1/1, retransmission queue length 0, number of retransmission 0 First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0) Last retransmission scan length is 0, maximum is 0 Last retransmission scan time is 0 msec, maximum is 0 msec |
The more command can then be used to view the file that has been stored in Flash as follows:
| R2#more flash:r2-ospf-output Neighbor 1.1.1.1, interface address 10.0.0.1 In the area 0 via interface Serial0/0 Neighbor priority is 0, State is FULL, 6 state changes DR is 0.0.0.0 BDR is 0.0.0.0 Options is 0x12 in Hello (E-bit L-bit ) Options is 0x52 in DBD (E-bit L-bit O-bit) LLS Options is 0x1 (LR) Dead timer due in 00:00:38 Neighbor is up for 00:19:50 Index 1/1, retransmission queue length 0, number of retransmission 0 First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0) Last retransmission scan length is 0, maximum is 0 Last retransmission scan time is 0 msec, maximum is 0 msec |