www.howtonetwork.org

CCNA & CCNP Certifcation Training

  • About
  • Contact
  • FAQ
  • Join
  • Home
  • CCNA
    • ICND1
    • ICND2
    • 101 CCNA LABS
  • CCNP
    • ROUTE
    • SWITCH
    • TSHOOT
    • 101 CCNP LABS
  • CompTIA
    • Security+
    • Network+
  • Design
    • CCDA
    • CCDP
You are here: Home / TSHOOT / Module 2 / The Cisco IOS Generic Troubleshooting Toolkit – Part 1

The Cisco IOS Generic Troubleshooting Toolkit – Part 1

As we learned in the previous section, collecting information is a core component of the overall troubleshooting process. The information that is collected comes from both users and internetwork devices. As a network engineer, it is important to have an intimate understanding of the Cisco IOS commands that can be used to collect information that will assist in the troubleshooting process. This section describes generic commands and utilities used in the troubleshooting process. It does not delve into technology or protocol specific troubleshooting commands as those will be described in detail later in this guide. The following topics are included in this section:

  1. Troubleshooting Network Connectivity
  2. Troubleshooting Hardware
  3. Troubleshooting Cisco IOS Services
  4. Filtering Command Output
  5. Redirecting Output
  6. Monitoring and Capturing Packets
  7. Health Monitoring

Troubleshooting Network Connectivity

Two of the most commonly used utilities when troubleshooting connectivity issues are the Ping and Traceroute utilities. Cisco IOS supports both standard and extended ping and Traceroute options. The primary difference between the standard and extended versions is additional capabilities that are included in the extended options, which may include specifying Quality of Service parameters when executing the command for example.

In Cisco IOS software, a standard ping is initiated using the ping [hostname | address] exec command. Additional keywords can also be used in conjunction with this command. However, it should be noted that the available options will differ depending on the version of Cisco IOS software that is running on the platform. The following output shows additional options available with the standard ping command in Cisco IOS software version 12.4 mainline:

R2#ping 10.0.0.1 ?
data      specify data pattern
df-bit    enable do not fragment bit in IP header
repeat    specify repeat count
size      specify datagram size
source    specify source address or name
timeout   specify timeout interval
validate  validate reply data
<cr>

NOTE: These same options are also available and can be used when issuing an extended ping

The data keyword is used to specify the data pattern to use when executing the ping. Different data patterns are used to troubleshoot framing errors and clocking problems on serial lines. The default is 0xABCD (Hexadecimal). The current TSHOOT certification exam does not require you to go into specifics on the different available supported data patterns. The df-bit is used to enable the Don’t Fragment (DF) bit in outgoing ping packets.

If the DF bit is set, packets will not be fragmented when such packets must traverse segments with smaller MTU values. In such cases, the command will print an error message that is received from the device that wanted to fragment the packet. This error message is denoted by the value M in Cisco IOS software. Setting the DF bit in outgoing ping packets is used to determine the smallest MTU in the path to a destination. This can be used to troubleshoot connectivity issues between TCP-based applications across VPNs for example. By default, the DF bit is not set when using the Cisco IOS ping command.

The repeat keyword is used to specify the number of ping packets that the software will send to the destination address. The default is 5. The size keyword is used to specify the packet size, in bytes, of the ping packets. By default, the Cisco IOS ping command will send 100-byte packets. The source keyword allows you to specify a source interface for the ping packets. By default, the software will use the interface that is used to reach the specified destination.

The timeout keyword is used to specify the ping packet timeout value. A ping packet that is not received within the interval specified using this keyword is considered unsuccessful. By default, Cisco IOS software specifies a timeout value of 2 (two) seconds. And finally, the validate keyword is used to specifies whether or not to validate the reply data. The default is no, meaning that the router that originated the ICMP echo packet will not check the ICMP-Cyclic Redundancy Check (CRC) in the echo reply or response packet.

The following example illustrates the use of the df-bit and repeat keywords when issuing a standard ping. The DF bit is set to prevent the packet from being fragmented. The repeatkeyword is used to specify that 50 ping packets should be sent to the destination of 192.168.1.1:

R2#ping 192.168.1.1 df-bit repeat 50Type escape sequence to abort.
Sending 50, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:
Packet sent with the DF bit set
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Success rate is 100 percent (50/50), round-trip min/avg/max = 4/4/5 ms

The following example illustrates the use of the source and timeout keywords when sending a standard ping. The source keyword is used to specify a source IP address, although an interface can also be specified and the timeout keyword is used to specify a timeout value of one second, which will constitute a successful ping response:

R2#ping 1.1.1.1 source 2.2.2.2 timeout 1Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 1 seconds:
Packet sent with a source address of 2.2.2.2
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/13/56 ms

While the exclamation mark (!) or the period (.) are the most commonly seen output characters from the ping utility, as a troubleshooter, you should be familiar with some additional characters that the ping utility may print. Table 2-1 lists and describes the characters that may be printed by the ping utility:

Character Description
! Each exclamation point indicates receipt of a reply
. Each period indicates the network server timed out while waiting for a reply
U A destination unreachable error PDU was received
Q Source quench (destination too busy)
M Could not fragment
? Unknown packet type
& Packet lifetime exceeded
Tab. 2-1. Cisco IOS Ping Utility Characters

The following example shows the output of the ping utility indicating that the destination address specified is unreachable:

R2#ping 1.1.1.1 repeat 10 size 500Type escape sequence to abort.
Sending 10, 500-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
U.U.U.U.U.
Success rate is 0 percent (0/10)

A common example of when you would see this error message is when ICMP packets are being blocked by an ACL or similar filter. The following example shows the output of the ping utility indicating that the ping was unsuccessful because fragmentation is required; however, the ping packets could not be fragmented because the Don’t Fragment (DF) it was set:

R1#ping 192.168.2.1 size 1500 df-bit
Sending 5, 1400-byte ICMP Echos to 192.168.2.1, timeout is 2 seconds:
Packet sent with the DF bit set
M.M.M
Success rate is 0 percent (0/5)

This error message is commonly seen when troubleshooting MTU issues across VPN tunnels, which have lower MTU values (due to the encapsulation overhead) than physical interfaces. Solutions to this error message include the following:

  1. Manually changing the MTU values on internetwork devices
  2. Changing the TCP Maximum Segment Size (MSS)
  3. Using or enable the Path MTU Discovery (PMTUD) Feature

These concepts will be described in additional detail when we discuss specific troubleshooting scenarios pertaining to Virtual Private Networks (VPNs) later in this guide.  The Cisco IOS extended ping utility includes the same options available with the standard ping utility, plus additional options. These additional options include the ability to perform a ping sweep, allowing you to vary the size of the echo packets that are sent. A ping sweep can be used to troubleshoot determine the minimum MTU size between source and destination. This concept will be illustrated in detail later in this guide.

An additional capability that is provides by extended pings is the ability to include IP header options in the ping packets. These options include the record, loose, strict, and timestamp options. The record option prints the addresses of up to 9 (nine) hops traversed by the packet. The loose option allows you to influence the path by specifying the address(es) of the hop(s) you want the packet to go through.

The strict option is used to specify the hop(s) that you want the packet to go through, but no other hop(s) are allowed to be visited. And finally, the timestamp option is used to measure roundtrip time to particular hosts. The following example illustrates the use of the extended ping utility, highlighting some of the options available with this command:

R2#ping ip
Target IP address: 200.1.1.1
Repeat count [5]:
Datagram size [100]:
Timeout in seconds [2]: 1
Extended commands [n]: y
Source address or interface: fastethernet0/0
Type of service [0]:
Set DF bit in IP header? [no]: y
Validate reply data? [no]: y
Data pattern [0xABCD]:
Loose, Strict, Record, Timestamp, Verbose[none]: r
Number of hops [ 9 ]: 4
Loose, Strict, Record, Timestamp, Verbose[RV]:
Sweep range of sizes [n]:
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 200.1.1.1, timeout is 1 seconds:
Packet sent with a source address of 150.1.1.2
Packet sent with the DF bit set
Reply data will be validated
Packet has IP options:  Total option bytes= 19, padded length=20
Record route: <*>
(0.0.0.0)
(0.0.0.0)
(0.0.0.0)
(0.0.0.0)Reply to request 0 (1 ms).  Received packet has options
Total option bytes= 20, padded length=20
Record route:
(200.1.1.2)
(200.1.1.1)
(10.0.0.1)
(150.1.1.2)
<*>
End of listReply to request 1 (1 ms).  Received packet has options
Total option bytes= 20, padded length=20
Record route:
(200.1.1.2)
(200.1.1.1)
(10.0.0.1)
(150.1.1.2)
<*>
End of list

Reply to request 2 (4 ms).  Received packet has options
Total option bytes= 20, padded length=20
Record route:
(200.1.1.2)
(200.1.1.1)
(10.0.0.1)
(150.1.1.2)
<*>
End of list

Reply to request 3 (4 ms).  Received packet has options
Total option bytes= 20, padded length=20
Record route:
(200.1.1.2)
(200.1.1.1)
(10.0.0.1)
(150.1.1.2)
<*>
End of list

Reply to request 4 (4 ms).  Received packet has options
Total option bytes= 20, padded length=20
Record route:
(200.1.1.2)
(200.1.1.1)
(10.0.0.1)
(150.1.1.2)
<*>
End of list

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

NOTE: By default, when any IP options are specified, the verbose keyword is automatically included by Cisco IOS software and does not need to be manually specified.

While the ping utility is a useful tool for verifying connectivity between devices, the Traceroute utility is a powerful tool for discovering the path packets take to a remote destination. While it is true that the ping command can also print the path the path packets take to a remote destination, up a maximum of nine hops, the Traceroute utility can provide information on where the routing, i.e. the path between the source and destination network, is broken.

Traceroute records the source of each ICMP Time Exceeded messages, which allows it this tool to provide a trace of the path packets take to reach the specified destination. When using Traceroute, the device on which this command is initiated will send out a sequence of UDP packets, each with incrementing TTL values, to UDP port 33434 at the remote host. It should be noted that this default port number can be changed in some applications.

When Traceroute is initiated, three packets with an IP TTL value of 1 are sent. This IP TTL value causes the packets to time out as soon as they are received by the first gateway device, which responds with an ICMP Time Exceeded message. Next, three more packets are sent out. This time, however, the packets have an IP TTL value of 2, which causes the second gateway in the path to return an ICMP Time Exceeded message.

This process is repeated until the packets reach the destination address and the initiating device has received an ICMP Time Exceeded message from all gateways in the path to the specified destination. Because the packets are sent to UDP port 33434, which is an invalid port number, the destination host responds with an ICMP Port Unreachable message when it receives these packets. Receipt of the Port Unreachable message tells the Traceroute to end.

NOTE: If the no ip unreachables command has been configured on the interfaces of any internetwork devices between the source and destination, Traceroute will not work.

As is the case with the ping utility, Cisco IOS supports both standard and extended Traceroute commands. Following are the options available with the standard Traceroute command:

R2#traceroute 10.1.1.1 ?
numeric  display numeric address
port     specify port number
probe    specify number of probes per hop
source   specify source address or name
timeout  specify time out
ttl      specify minimum and maximum ttl
<cr>

The numeric keyword is used to suppress the symbolic display, i.e. hostnames, in the output of the Traceroute. By default, Cisco IOS software defaults to a symbolic and numeric display. Including a symbolic display often results in the Traceroute running very slowly due to the fact that the software attempts to resolve the IP addresses to hostnames.

The port keyword is used to specify the destination port that will be used by the Traceroute UDP probe messages. As was stated in the previous section, this defaults to UDP port 33434. Theprobe keyword is used to specify the number of probes to be sent at each TTL level. By default, the software will send 3 (three) probes.

The source keyword is used to specify a source interface or IP address. By default, the router will use the interface that the route to the destination network is learned via. The timeoutkeyword is used to specify the number of seconds to wait for a response to a probe packet. The default is 3 seconds. And finally, the ttl keyword the IP TTL value of the probes. The following example illustrates typical Traceroute output:

R2#traceroute 192.168.1.1 source fastethernet0/0Type escape sequence to abort.
Tracing the route to 192.168.1.11 R2-Se0-Interface (10.0.2.2) 4 msec 4 msec 4 msec
2 R1-Fa0-Interface (10.0.0.1) 4 msec 4 msec 4 msec
3 R5-Se0-Interface (10.0.9.5) 0 msec *  4 msec

The following output shows the same output with the symbolic display suppressed:

R2#traceroute 192.168.1.1 numericType escape sequence to abort.
Tracing the route to 192.168.1.11 10.0.2.2 4 msec 4 msec 4 msec
2 10.0.0.1 4 msec 4 msec 4 msec
3 10.0.9.5 0 msec *  4 msec

The primary difference between standard and extended Traceroute execution is the extended Traceroute allows users to specify IP options, i.e. the Loose, Strict, and Record options, when performing the Traceroute. All other options that can be used with the standard Traceroute apply and can be used when performing an extended Traceroute.  Similar to the ping utility, the Traceroute utility also prints different characters, each indicating the result of the operation. Table 2-2 lists and describes the result characters that may be printed by the Traceroute utility:

Character Description
nn msec The round-trip time in milliseconds for the specified number of probes
* The probe timed out
A Administratively prohibited (example, access-list)
Q Source quench (destination too busy)
I User interrupted test
U Port unreachable
H Host unreachable
N Network unreachable
P Protocol Unreachable
T Timeout
? Unknown packet type
Tab. 2-2. Cisco IOS Traceroute Utility Characters

The following example shows the output of a Traceroute that is administratively prohibited, i.e. by an ACL or similar filter that has been applied to the gateway interface:

R2#traceroute 192.168.1.1 source fastethernet0/0Type escape sequence to abort.
Tracing the route to 192.168.1.11 R1-Tu0-Interface (200.1.1.1) !A  *  0 msec

Prev

Next

About Us

This is a free bonus site for members of www.howtonetwork.com

Copyright

The content on this copyright Reality Press Ltd.
Copyright Reality Press Ltd.