Troubleshooting TCP - IP - Cisco Systems
Troubleshooting TCP - IP - Cisco Systems
Support
Troubleshooting TCP/IP
HOME
Table Of Contents Downloads
SUPPORT
Troubleshooting TCP/IP Troubleshooting TCP/IP
Troubleshooting TCP/IP TCP/IP Introduction
Internet Protocols Feedback
The Network Layer
Addressing
Internet Routing
ICMP
The Transport Layer
TCP
UDP
UpperLayer Protocols
Domain Name System
Tools for Troubleshooting IP Problems
ping
traceroute
Packet Debugging
General IP Troubleshooting Suggestions
Narrowing Down the Problem Domain
Troubleshooting Local Connectivity Problems
Check for Configuration Problems
Check for Local Connectivity
Ruling Out Duplicate IP Addresses
Troubleshooting Physical Connectivity Problems
Rule Out a Configuration Problem
Check Cable Connections
Check the Configuration
Check the Network Interface
Troubleshooting IP Connectivity and Routing Problems
Determining Where to Start
Check for Resources
Check for Connectivity
Check for ACLs
Check for Network Address Translation
Troubleshooting UpperLayer Problems
Generic
Hypertext Transport Protocol
FTP
MAIL (IMAP, POP, and SMTP)
Telnet
Troubleshooting Domain Name Server Problems
Before Calling Cisco Systems' Technical Assistance Center
For More Information
Troubleshooting TCP/IP
The sections in this chapter describe common features of TCP/IP
and provide solutions to some of the most common TCP/IP
problems. The following items will be covered:
• TCP/IP Introduction
• Tools for Troubleshooting IP Problems
• General IP Troubleshooting Theory and Suggestions
• Troubleshooting Basic IP Connectivity
• Troubleshooting Physical Connectivity Problems
• Troubleshooting Layer 3 Problems
• Troubleshooting Hot Standby Router Protocol (HSRP)
TCP/IP Introduction
In the mid1970s, the Defense Advanced Research Projects
Agency (DARPA) became interested in establishing a packet
switched network to provide communications between research
institutions in the United States. DARPA and other government
organizations understood the potential of packetswitched
technology and were just beginning to face the problem that
virtually all companies with networks now have—communication
between dissimilar computer systems.
With the goal of heterogeneous connectivity in mind, DARPA
funded research by Stanford University and Bolt, Beranek, and
Newman (BBN) to create a series of communication protocols.
The result of this development effort, completed in the late
1970s, was the Internet Protocol suite, of which the Transmission
Control Protocol (TCP) and the Internet Protocol (IP) are the two
http://www.cisco.com/en/US/docs/internetworking/troubleshooting/guide/tr1907.html 1/18
7/15/2015 Troubleshooting TCP/IP Cisco Systems
bestknown protocols.
The most widespread implementation of TCP/IP is IPv4 (or IP
version 4). In 1995, a new standard, RFC 1883—which
addressed some of the problems with IPv4, including address
space limitations—was proposed. This new version is called
IPv6. Although a lot of work has gone into developing IPv6, no
widescale deployment has occurred; because of this, IPv6 has
been excluded from this text.
Internet Protocols
Internet protocols can be used to communicate across any set of
interconnected networks. They are equally well suited for local
area network (LAN) and widearea network (WAN)
communications. The Internet suite includes not only lowerlayer
specifications (such as TCP and IP), but also specifications for
such common applications as email, terminal emulation, and
file transfer. Figure 71 shows some of the most important
Internet protocols and their relationships to the OSI reference
model.
As an interesting side note, the sevenlayer model actually came
about after TCP/IP. DARPA used a fourlayer model instead,
which the OSI later expanded to seven layers. This is why
TCP/IP doesn't generally fit all that well into the sevenlayer OSI
model.
Figure 71 The Internet Protocol Suite and the OSI Reference
Model
http://www.cisco.com/en/US/docs/internetworking/troubleshooting/guide/tr1907.html 2/18
7/15/2015 Troubleshooting TCP/IP Cisco Systems
• Version—Indicates the version of this IP datagram.
• IP Header Length (IHL)—Indicates the datagram header
length in 32bit words.
• TypeofService—Specifies how a particular upperlayer
protocol would like the current datagram to be handled.
Datagrams can be assigned various levels of importance
using this field.
Today this field is used primarily to provide quality of service
(QoS) capabilities to TCP/IP for applications requiring
predictable bandwidth or delay. RFC 2474 describes a
method by which the TOS field is replaced by a DS field that
is used to provide differentiated services (DiffServ) on
networks. This field is split into two parts. The first 6 bits are
used for the DSCP codepoint, which is used to differentiate
traffic. The last 2 bits, or CU, are ignored by DiffServ
compliant nodes.
• Total Length—Specifies the length of the entire IP packet,
including data and header, in bytes.
• Identification—Consists of an integer identifying this
datagram. This field is used to help piece together datagram
fragments.
• Flags—Consists of 3 bits, of which the loworder 2 bits
control fragmentation. One bit specifies whether the packet
can be fragmented; the second bit specifies whether the
packet is the last fragment in a series of fragmented packets.
• TimetoLive—Maintains a counter that gradually
decrements down to zero, at which point the datagram is
discarded. This keeps packets from looping endlessly.
• Protocol—Indicates which upperlayer protocol receives
incoming packets after IP processing is complete.
• Header Checksum—Helps ensure IP header integrity.
• Source Address—Specifies the sending node.
• Destination Address—Specifies the receiving node.
• Options—Allows IP to support various options, such as
security.
• Data—Contains upperlayer information.
Addressing
As with all network layer protocols, the addressing scheme is
integral to the process of routing IP datagrams through an
internetwork. An IP address is 32 bits in length, divided into
either two or three parts. The first part designates the network
address, the second part (if present) designates the subnet
address, and the final part designates the host address. Subnet
addresses are present only if the network administrator has
decided that the network should be divided into subnetworks.
The lengths of the network, subnet, and host fields are all
variable.
Today's Internet does not segment addresses along classful
bounds—it is almost entirely classless. The separation between
networks and subnets has been effectively eliminated. The
requirement to understand network classes and the difference
between a network and a subnet remains solely because of
configuration and behavioral issues with network devices.
IP addressing supports five different network classes, and the
highorder—farleft—bits indicate the network class:
• Class A networks provide 8 bits for the Network Address
field. The highorder bit (at far left) is 0.
• Class B networks allocate 16 bits for the Network Address
field and 16 bits for the Host Address field. This address
class offers a good compromise between network and host
address space. The first 2 highorder bits are 10.
• Class C networks allocate 24 bits for the Network Address
field. Class C networks provide only 8 bits for the Host field,
however, so the number of hosts per network may be a
limiting factor. The first 3 highorder bits are 110.
• Class D addresses are reserved for multicast groups, as
described formally in RFC 1112. The first 4 highorder bits
are 1110.
• Class E addresses are also defined by IP but are reserved
for future use. The first 4 highorder bits are 1111.
IP addresses are written in dotted decimal format (for example,
34.10.2.1). Figure 73 shows the address formats for Class A, B,
and C IP networks.
http://www.cisco.com/en/US/docs/internetworking/troubleshooting/guide/tr1907.html 3/18
7/15/2015 Troubleshooting TCP/IP Cisco Systems
Internet Routing
Routing devices in the Internet have traditionally been called
gateways—an unfortunate term because elsewhere in the
industry, the term gateway applies to a device with somewhat
different functionality. Gateways (which we will call routers from
this point on) within the Internet are organized hierarchically.
Dynamic routing protocols, such as RIP and OSPF, provide a
means by which routers can communicate and share information
http://www.cisco.com/en/US/docs/internetworking/troubleshooting/guide/tr1907.html 4/18
7/15/2015 Troubleshooting TCP/IP Cisco Systems
about routes that they have learned or are connected to. This
contrasts with static routing, in which routes are established by
the network administrator and do not change unless they are
manually altered. An IP routing table consists of destination
address/nexthop pairs. A sample entry, shown in Figure 75, is
interpreted as meaning, "To get to network 34.1.0.0 (subnet 1 on
network 34), the next stop is the node at address 54.34.23.12."
ICMP
ICMP performs a number of tasks within an IP internetwork, the
principal of which is reporting routing failures back to the source
of a datagram. In addition, ICMP provides helpful messages
such as the following:
• Echo and reply messages to test node reachability across
an internetwork
• Redirect messages to stimulate more efficient routing
• Time exceeded messages to inform sources that a datagram
has exceeded its allocated time to exist within the
internetwork
• Router advertisement and router solicitation messages to
determine the addresses of routers on directly attached
subnetworks
TCP
TCP provides fullduplex, acknowledged, and flowcontrolled
service to upperlayer protocols. It moves data in a continuous,
unstructured byte stream in which bytes are identified by
sequence numbers. TCP can support numerous simultaneous
upperlayer conversations. The TCP packet format is shown in
Figure 76.
UDP
UDP is a much simpler protocol than TCP and is useful in
situations in which the reliability mechanisms of TCP are not
necessary. The UDP header has only four fields: Source Port,
Destination Port, Length, and UDP Checksum. The Source and
Destination Port fields serve the same functions as they do in the
TCP header. The Length field specifies the length of the UDP
header and data, and the UDP Checksum field allows packet
integrity checking. The UDP checksum is optional.
UpperLayer Protocols
The Internet Protocol suite includes many upperlayer protocols
representing a wide variety of applications, including network
management, file transfer, distributed file services, terminal
emulation, and electronic mail. Table 71 maps the bestknown
Internet upperlayer protocols to the applications that they
support.
Application Protocols
WWW HTTP (TCP port 80)
browser
http://www.cisco.com/en/US/docs/internetworking/troubleshooting/guide/tr1907.html 6/18
7/15/2015 Troubleshooting TCP/IP Cisco Systems
file services Windows (UDP ports 60006063)
ping
The ping tool uses the IP ICMP echo request and echo reply
messages to test reachability to a remote system. In its simplest
form, ping simply confirms that an IP packet is capable of getting
to and getting back from a destination IP address (Figure 77).
This tool generally returns two pieces of information: whether the
source can reach the destination (and, by inference, vice versa),
and the roundtrip time (RTT, typically in milliseconds). The RTT
returned by ping should be used only as a comparative
reference because it can depend greatly on the software
implementation and hardware of the system on which ping is
run. If ping fails or returns an unusual RTT, traceroute can be
used to help narrow down the problem. It is also possible to vary
the size of the ICMP echo payload to test problems related to
maximum transmission unit (MTU).
http://www.cisco.com/en/US/docs/internetworking/troubleshooting/guide/tr1907.html 7/18
7/15/2015 Troubleshooting TCP/IP Cisco Systems
Example 72 shows ping returning three values separated with
the slash "/," the minimum, average, and maximum RTT. Large
differences in these values could indicate network congestion or
a network problem. In most cases, the average value accurately
portrays the network latency to the destination. By default, ping
uses small packets for connectivity testing; the packet size will
influence the RTT values. The packet size may be changed in
some implementations, including that of Cisco Systems's IOS.
CiscoRtr1>ping 10.3.1.6
!!!!!
traceroute
The traceroute utility sends out either ICMP echo request
(Windows) or UDP (most implementations) messages with
gradually increasing IP TTL values to probe the path by which a
packet traverses the network (see Example 73). The first packet
with the TTL set to 1 will be discarded by the first hop, and the
first hop will send back an ICMP TTL exceeded message
http://www.cisco.com/en/US/docs/internetworking/troubleshooting/guide/tr1907.html 8/18
7/15/2015 Troubleshooting TCP/IP Cisco Systems
sourced from its IP address facing the source of the packet.
When the machine running the traceroute receives the ICMP
TTL exceeded message, it can determine the hop via the source
IP address. This continues until the destination is reached. The
destination will return either an ICMP echo reply (Windows) or a
ICMP port unreachable, indicating that the destination had been
reached. Cisco's implementation of traceroute sends out three
packets at each TTL value, allowing traceroute to report routers
that have multiple equalcost paths to the destination.
Traceroute can return useful information about TCP/IP
connectivity across your network. Table 73 shows some of the
codes that can be returned by the Cisco traceroute utility, along
with their possible cause.
CiscoRtr1>traceroute 10.3.1.6
http://www.cisco.com/en/US/docs/internetworking/troubleshooting/guide/tr1907.html 9/18
7/15/2015 Troubleshooting TCP/IP Cisco Systems
1 CiscoRtr2 (10.1.1.2) 0 msec
CiscoRtr3 (10.1.1.3) 0 msec
CiscoRtr4 (10.1.1.4) 4 msec
2 CiscoRtr5 (10.2.1.6) 4 msec 4 msec 0 msec
3 * * *
4 * * *
Packet Debugging
The following example is applicable to Cisco 16xx, 25xx, 26xx,
36xx, 40xx, 45xx, 70xx, and 75xx series routers. Consult the
Cisco TAC web page www.cisco.com/tac for instructions on
using this command on other Cisco router platforms.
7. Create an access list that matches only the traffic that you
want to capture. In this example, we are using access list
101 to match all DHCP traffic. The number 101 should be
replaced with an available IP access list on your router.
CiscoRtr#configure terminal
CiscoRtr(config)# access‐list 101 permit udp any any eq bootpc
CiscoRtr(config)# access‐list 101 permit udp any any eq bootps
CiscoRtr(config)# access‐list 101 permit udp any eq bootpc any
CiscoRtr(config)# access‐list 101 permit udp any eq bootps any
CiscoRtr(config)# end
CiscoRtr#
http://www.cisco.com/en/US/docs/internetworking/troubleshooting/guide/tr1907.html 10/18
7/15/2015 Troubleshooting TCP/IP Cisco Systems
Extended IP access list 101
permit udp any any eq bootpc
permit udp any any eq bootps
permit udp any eq bootpc any
permit udp any eq bootps any
http://www.cisco.com/en/US/docs/internetworking/troubleshooting/guide/tr1907.html 11/18
7/15/2015 Troubleshooting TCP/IP Cisco Systems
in this chapter.
http://www.cisco.com/en/US/docs/internetworking/troubleshooting/guide/tr1907.html 12/18
7/15/2015 Troubleshooting TCP/IP Cisco Systems
Even though it may seem logical to first troubleshoot at the
physical layer, problems can generally be found more quickly by
first troubleshooting at Layer 3 and then working backward when
a physical problem is found or suspected.
Possible problems include these:
• Configuration is incorrect.
• Cable is faulty or improperly connected.
• Wiring closet crossconnect is faulty or improperly
connected.
• Hardware (interface or port) is faulty.
• Interface has too much traffic.
http://www.cisco.com/en/US/docs/internetworking/troubleshooting/guide/tr1907.html 13/18
7/15/2015 Troubleshooting TCP/IP Cisco Systems
traceroute from the source to the destination to determine the
first problematic hop. If the traceroute method does not provide
an answer, you will have to fall back to the longer method.
When you have found a starting point, connect to that router via
telnet or console, and verify that it is capable of pinging the
source and the destination. When doing this, keep in mind that
the router will source the ping packet from the interface closest to
the ping target. In some cases, you may want to use an extended
ping to specify a source interface because the ping target may
not know how to get to the default source address; this is
common on serial interfaces configured with private addressing.
http://www.cisco.com/en/US/docs/internetworking/troubleshooting/guide/tr1907.html 14/18
7/15/2015 Troubleshooting TCP/IP Cisco Systems
protocol? If you are unsure, see the section "Troubleshooting
UpperLayer Problems."
Generic
To troubleshoot an upperlayer protocol connectivity problem,
you must understand how it works. You can generally find this
information in the latest RFC for the protocol or on the
developer's web page. Questions that you should answer to
make certain that you understand the protocol include these:
• What IP protocols does the protocol use (TCP, UDP, ICMP,
IGMP, or other)?
• What TCP or UDP port numbers are used by the protocol?
• Does the protocol require any inbound TCP connections or
inbound UDP packets?
• Does the protocol embed IP addresses in the data portion of
the packet?
• Are you running a client or a server for the protocol?
If the protocol embeds IP addresses in the data portion of the
packet and you have NAT configured anywhere along the path
of the packet, the NAT gateway will need to know how to deal
with that particular protocol, or the connection will fail. NAT
gateways do not typically change information in the data portion
of a packet unless they have been specifically coded to do so.
Some examples of protocols that embed IP addresses in the
data portion of the packet are FTP, SQLNet, and Microsoft WINs.
If there is a question whether a firewall or router is interfering
with the flow of data for a particular application or protocol, you
can take several steps to see what exactly is happening. These
steps may not all be possible in all situations.
• Move the client outside the firewall or address translation
device.
• Verify whether the client can talk to a server on the same
subnet as the client.
• Capture a network trace at the client's LAN and on the LAN
closest to the server (or, preferably, on the server's LAN, if
possible).
• If the service is ASCIIbased, you can try Telnetting to the
service's port from the router closest to the server; then work
backward into the network toward the client.
http://www.cisco.com/en/US/docs/internetworking/troubleshooting/guide/tr1907.html 15/18
7/15/2015 Troubleshooting TCP/IP Cisco Systems
to the server.
FTP
FTP uses two or more TCP connections to accomplish data
transfers. To start a session, the FTP client opens a TCP
connection to port 21 on the FTP server. This connection is
called the control connection and is used to pass commands
and results between the client and the server. No data, such as
file transfers or directory listings, is passed over the control
connection; instead, data is transferred over a separate TCP
connection created specifically to fulfill that request. This data
connection can be opened in several different ways:
• Traditional (or active)—The FTP server opens a TCP
connection back to the client's port 20. This method will not
work on a multiuser system because many users may make
simultaneous FTP requests, and the system will not be
capable of matching incoming FTP data connections to the
appropriate user.
• Multiuser traditional (or active)—The FTP client instructs
the FTP server to open a connection on some random port
in the range 1024 through 65535. This method creates a
rather large security hole because it requires system
administrators to permit inbound TCP connections to all
ports greater than 1023. Although firewalls that monitor FTP
traffic and dynamically allow inbound connections help
close this security hole, many corporate networks do not
permit this type of traffic. Most commandline FTP clients
default to this method of transfer and offer a passive
command (or something similar) to switch to passive mode.
• Passive mode—The FTP client instructs the FTP server that
it wants a passive connection, and the server replies with an
IP address and port number to which the FTP client can
open a TCP data connection. This method is by far the most
secure because it requires no inbound TCP connections to
the FTP client. Many corporate networks permit only this
type of FTP transfer. Although most of the popular web
browsers default to this method of FTP transfer, you
shouldn't assume that they do.
You can test the FTP control connection using any Telnet
application that allows a port number to be specified. Telnet to
the IP address of the destination server using port 21, and you
should see a hello message indicating that you have FTP
connectivity to the server.
Generally, if a client has connectivity via the control connection
but cannot retrieve directory listings or transfer files, there is an
issue with opening the data connection. Try specifying passive
mode because this is permitted by most firewalls.
Another common problem with FTP is being able to transfer
small files but not large files, with the transfer generally failing at
the same place or time in every file. Remember that the data
connection (and the transfer) will be closed if the control
connection closes; because the control connection is typically
dormant during large file transfers, it is possible for the
connection to close in NAT/PAT environments in which there is a
timeout on TCP connections. Increasing the timeout on dormant
TCP connections may resolve this problem. If an FTP client is not
properly coded, you may also see this problem.
Because FTP file transfers generally create packets of maximum
size, an MTU mismatch problem will almost always cause file
transfers to fail in a single direction (gets may fail, but puts may
work). This can be caused by a server located on a LAN media
that support larger MTUs (such as Token Ring, which can have
an MTU of 4096 or larger). Normally this problem is resolved
automatically by fragmentation, but misconfigurations or having
the IP Don't Fragment option set in the IP datagrams can prevent
proper operation.
http://www.cisco.com/en/US/docs/internetworking/troubleshooting/guide/tr1907.html 16/18
7/15/2015 Troubleshooting TCP/IP Cisco Systems
mail separately.
When verifying the configuration of a mail client, both the mail
relay (SMTP) server and mail (POP or IMAP) servers should be
verified. The SMTP protocol does not offer much in the way of
security and does not require any sort of authentication, so to
prevent unauthorized users from bouncing mail messages off
their servers, administrators don't often allow hosts that are not
part of their network to use their SMTP server to send (or relay)
mail.
You can test SMTP, IMAP, and POP connectivity using any
Telnet application that allows a port number to be specified.
Telnet to the IP address of the destination server using ports 25,
143, and 110 respectively. You should see a hello message,
which indicates that you have connectivity to that server.
Telnet
If the Telnet to a particular server fails from one host, try
connecting from a router and several other devices. If when
Telnetting to a server you do not receive a login prompt, you will
want to check the following:
• Are you able to do a reverse DNS lookup on the client's
address? Many Telnet servers will not allow connections
from IP addresses that have no DNS entry. This is a
common problem for DHCPassigned addresses in which
the administrator has not added DNS entries for the DHCP
pools.
• It is possible that your Telnet application cannot negotiate
the appropriate options and therefore will not connect. On a
Cisco router, you can view this negotiation process using
debug telnet.
• It is possible that Telnet is disabled or has been moved to a
port other than 23 on the destination server.
Non‐authoritative answer:
Name: www.somedomain.com
Address: 10.1.1.1
http://www.cisco.com/en/US/docs/internetworking/troubleshooting/guide/tr1907.html 17/18
7/15/2015 Troubleshooting TCP/IP Cisco Systems
to resolve the names of other hosts in the test.com domain,
such as host2.test.com.)
4. Verify that you can resolve one or more domain names
outside your domain.
If you cannot resolve names from all domains except that of the
destination, there might be a problem with the DNS for the
destination host. Contact the administrator of the destination
device.
If you cannot resolve names within your domain or a large
number of external domains, contact your DNS administrator
because there may be a problem with the local DNS (or your
host could be using the wrong domain server).
Contacts | Feedback | Help | Site Map | Terms & Conditions | Privacy Statement | Cookie Policy | Trademarks
http://www.cisco.com/en/US/docs/internetworking/troubleshooting/guide/tr1907.html 18/18