Cisco Systems


 


 

Modules:  1  |  2  |  3  |  4  |  5  |  6  |  7  |  8  |  9  |  10  |  11  |  CS  |  All  |
Module 8: TCP/IP Suite Error and Control Messages
Module Overview  
8.1 Overview of TCP/IP Error Message
 
8.1.1 Internet Control Message Protocol (ICMP)
8.1.2 Error reporting and error correction
8.1.3 ICMP message delivery
8.1.4 Unreachable networks
8.1.5 Using ping to test destination reachability
8.1.6 Detecting excessively long routes
8.1.7 Echo messages
8.1.8 Destination unreachable message
8.1.9 Miscellaneous error reporting
 
8.2 TCP/IP Suite Control Messages
 
8.2.1 Introduction to control messages
8.2.2 ICMP redirect/change requests
8.2.3 Clock synchronization and transit time estimation
8.2.4 Information requests and reply message formats
8.2.5 Address mask requirements
8.2.6 Router discovery message
8.2.7 Router solicitation message
8.2.8 Congestion and flow control messages
 
Module Summary  
Module Quiz

 

 
Close Window
All contents copyright © 2003 Cisco Systems, Inc. All rights reserved.

 

Overview
 
IP is limited because it is a best effort delivery system. It has no mechanism to ensure that the data is delivered, regardless of the problems it may encounter on the network. Data may fail to reach its destination for a variety of reasons, such as hardware failure, improper configuration or incorrect routing information. To help identify these failures, IP uses the Internet Control Message Protocol (ICMP) to notify the sender of the data that there was an error in the delivery process. This module describes the various types of ICMP error messages and some of the ways they are used.

Because IP does not have a built-in mechanism for sending error and control messages, it uses the ICMP to send and receive error and control messages to hosts on a network. This module focuses on control messages, which are messages that provide information or configuration parameters to hosts. Knowledge of ICMP control messages is an essential part of network troubleshooting and is a key to a full understanding of IP networks.

Students completing this module should be able to:

  • Describe ICMP
  • Describe the ICMP message format
  • Identify ICMP error message types
  • Identify potential causes of specific ICMP error messages
  • Describe ICMP control messages
  • Identify a variety of ICMP control messages used in networks today
  • Determine the causes for ICMP control messages

    

8.1 Overview of TCP/IP Error Message  
  8.1.1 Internet Control Message Protocol (ICMP)  
  IP is an unreliable method for delivery of network data. It is known as a best effort delivery mechanism. It has no built-in processes to ensure that data is delivered in the event that problems exist with network communication. If an intermediary device such as a router fails, or if a destination device is disconnected from the network, data cannot be delivered. Additionally, nothing in its basic design allows IP to notify the sender that a data transmission has failed. Internet Control Message Protocol (ICMP) is the component of the TCP/IP protocol stack that addresses this basic limitation of IP. ICMP does not overcome the unreliability issues in IP. Reliability must be provided by upper layer protocols if it is needed.
  Web Links

Introduction to ICMP

http://www.cisco.com/en/US/tech/tk826/ tk364/tk344/tech_ protocol_home.html

                                                 

8.1 Overview of TCP/IP Error Message  
  8.1.2 Error reporting and error correction  
  ICMP is an error reporting protocol for IP. When datagram delivery errors occur, ICMP is used to report these errors back to the source of the datagram. For example, if Workstation 1 in Figure is sending a datagram to Workstation 6, but interface Fa0/0 on Router C goes down, Router C then utilizes ICMP to send a message back to Workstation 1 indicating that the datagram could not be delivered. ICMP does not correct the encountered network problem; it merely reports the problem.

When Router C receives the datagram from Workstation 1, it knows only the source and destination IP addresses of the datagram. It does not know about the exact path the datagram took on the way to Router C. Therefore, Router C can only notify Workstation 1 of the failure, and no ICMP messages are sent to Router A and Router B. ICMP reports on the status of the delivered packet only to the source device. It does not propagate information about network changes to routers.

  Web Links

Internet Protocol: Error and Control Messages (ICMP)

http://faculty.weber.edu/wclark/ch9a.pdf

                                                     

8.1 Overview of TCP/IP Error Message  
  8.1.3 ICMP message delivery  
  ICMP messages are encapsulated into datagrams in the same way any other data is delivered using IP. Figure displays the encapsulation of ICMP data within an IP datagram.

Since ICMP messages are transmitted in the same way as any other data, they are subject to the same delivery failures. This creates a scenario where error reports could generate more error reports, causing increased congestion on an already ailing network. For this reason, errors created by ICMP messages do not generate their own ICMP messages. It is thus possible to have a datagram delivery error that is never reported back to the sender of the data.

  Web Links

Best Effort Delivery

http://oucsace.cs.ohiou.edu/~osterman/ class/cs444.archive/ notes/icmp.pdf

                                                     

8.1 Overview of TCP/IP Error Message  
  8.1.4 Unreachable networks  
  Network communication depends upon certain basic conditions being met. First, the sending and receiving devices must have the TCP/IP protocol stack properly configured. This includes the installation of the TCP/IP protocol and proper configuration of IP address and subnet mask. A default gateway must also be configured if datagrams are to travel outside of the local network. Second, intermediary devices must be in place to route the datagram from the source device and its network to the destination network. Routers serve this function. A router also must have the TCP/IP protocol properly configured on its interfaces, and it must use an appropriate routing protocol.

If these conditions are not met, then network communication cannot take place. For instance, the sending device may address the datagram to a non-existent IP address or to a destination device that is disconnected from its network. Routers can also be points of failure if a connecting interface is down or if the router does not have the information necessary to find the destination network. If a destination network is not accessible, it is said to be an unreachable network.

Figures and show a router receiving a packet that it is unable to deliver to its ultimate destination. The packet is undeliverable because there is no known route to the destination. Because of this, the router sends an ICMP host unreachable message to the source.

 

8.1 Overview of TCP/IP Error Message  
  8.1.5 Using ping to test destination reachability  
  The ICMP protocol can be used to test the availability of a particular destination. Figure shows ICMP being used to issue an echo request message to the destination device. If the destination device receives the ICMP echo request, it formulates an echo reply message to send back to the source of the echo request. If the sender receives the echo reply, this confirms that the destination device can be reached via the IP protocol.

The echo request message is typically initiated using the ping command as shown in Figure . In this example, the command is used with the IP address of the destination device. The command can also be utilized as shown in Figure using the IP address of the destination device. In these examples, the ping command issues four echo requests and receives four echo replies, confirming IP connectivity between the two devices.

 

8.1 Overview of TCP/IP Error Message  
  8.1.6 Detecting excessively long routes  
  Situations can occur in network communication where a datagram travels in a circle, never reaching its destination. This might occur if two routers continually route a datagram back and forth between them, thinking the other should be the next hop to the destination. This is an example of faulty routing information.

The limitations of the routing protocol can result in destinations being unreachable. For example, RIP has a limit on the distance a certain routing information is allowed to travel. The hop limit of RIP is 15, which means that the packet will only be allowed to pass through 15 routers.

In either of these cases, an excessively long route exists. Whether the actual path includes a circular routing path or too many hops, the packet will eventually exceed the maximum hop count. This is also known as reaching its time-to-live (TTL), because the TTL value typically matches the maximum hop count defined by the routing protocol. A TTL value is defined in each datagram. As each router processes the datagram, it decreases the TTL value by one. When the TTL of the datagram value reaches zero, the packet is discarded. ICMP uses a time exceeded message to notify the source device that the TTL of the datagram has been exceeded.

 

8.1 Overview of TCP/IP Error Message  
  8.1.7 Echo messages  
  As with any type of packet, ICMP messages have special formats. Each ICMP message type shown in Figure has its own unique characteristics, but all ICMP message formats start with these same three fields:
  • Type
  • Code
  • Checksum

The type field indicates the type of ICMP message being sent. The code field includes further information specific to the message type. The checksum field, as in other types of packets, is used to verify the integrity of the data.

Figure shows the message format for the ICMP echo request and echo reply messages. The relevant type and code numbers are shown for each message type. The identifier and sequence number fields are unique to the echo request and echo reply messages. The identifier and sequence fields are used to match the echo replies to the corresponding echo request. The data field contains additional information that may be a part of the echo reply or echo request message.

   Interactive Media Activity

Drag and Drop: ICMP ECHO Message Format

After completing this activity, the student will be able to ICMP ECHO message format.

    

8.1 Overview of TCP/IP Error Message  
  8.1.8 Destination unreachable message  
  Datagrams cannot always be forwarded to their destinations. Hardware failures, improper protocol configuration, down interfaces and incorrect routing information are some of the reasons successful delivery may not be possible. In these cases, ICMP delivers back to the sender a destination unreachable message indicating to the sender that the datagram could not be properly forwarded.

Figure shows an ICMP destination unreachable message header. The value of 3 in the type field indicates it is a destination unreachable message. The code value indicates the reason the packet could not be delivered. Figure has a code value of 0, indicating the network was unreachable. Figure shows the meaning for each possible code value in a destination unreachable message.

A destination unreachable message may also be sent when packet fragmentation is required in order to forward a packet. Fragmentation is usually necessary when a datagram is forwarded from a Token-Ring network to an Ethernet network. If the datagram does not allow fragmentation, the packet cannot be forwarded, so a destination unreachable message will be sent. Destination unreachable messages may also be generated if IP related services such as FTP or Web services are unavailable. To effectively troubleshoot an IP network, it is necessary to understand the various causes of ICMP destination unreachable messages.

8.1 Overview of TCP/IP Error Message  
  8.1.9 Miscellaneous error reporting  
  Devices that process datagrams may not be able to forward a datagram due to some type of error in the header. This error does not relate to the state of the destination host or network but still prevents the datagram from being processed and delivered. In this case, an ICMP type 12 parameter problem message is sent to the source of the datagram. Figure shows the parameter problem message header.

The parameter problem message includes the pointer field in the header. When the code value is 0, the pointer field indicates the octet of the datagram that produced the error.

8.2 TCP/IP Suite Control Messages  
  8.2.1 Introduction to control messages  
  The Internet Control Message Protocol (ICMP) is an integral part of the TCP/IP protocol suite. In fact, all IP implementations must include ICMP support. The reasons for this are simple. First, since IP does not guarantee delivery, it has no inherent method to inform hosts when errors occur. Also, IP has no built-in method to provide informational or control messages to hosts. ICMP performs these functions for IP.

Unlike error messages, control messages are not the results of lost packets or error conditions which occur during packet transmission. Instead, they are used to inform hosts of conditions such as network congestion or the existence of a better gateway to a remote network. Like all ICMP messages, ICMP control messages are encapsulated within an IP datagram. ICMP uses IP datagrams in order to traverse multiple networks.

Multiple types of control messages are used by ICMP. Some of the most common are shown in Figure . Many of these are discussed in this section.

8.2 TCP/IP Suite Control Messages  
  8.2.2 ICMP redirect/change requests  
  A common ICMP control message is the ICMP redirect/change request. This type of message can only be initiated by a gateway, which is a term commonly used to describe a router. All hosts that communicate with multiple IP networks must be configured with a default gateway. This default gateway is the address of a router port connected to the same network as the host. Figure displays a host connected to a router that has access to the Internet. Once configured with the IP address of Fa 0/0 as its default gateway, Host B uses that IP address to reach any network not directly connected to it. Normally, Host B is connected to a single gateway. However, in some circumstances, a host connects to a segment that has two or more directly connected routers. In this case, the default gateway of the host may need to use a redirect/change request to inform the host of the best path to a certain network. 

Figure shows a network where ICMP redirects would be used. Host B sends a packet to Host C on network 10.0.0.0/8. Since Host B is not directly connected to the same network, it forwards the packet to its default gateway, Router A. Router A finds the correct route to network 10.0.0.0/8 by looking into its route table. It determines that the path to the network is back out the same interface the request to forward the packet came from. It forwards the packet and sends an ICMP redirect/change request to Host B telling it to use Router B as the gateway to forward all future requests to network 10.0.0.0/8.

Default gateways only send ICMP redirect/change request messages if the following conditions are met: 

  • The interface on which the packet comes into the router is the same interface on which the packet gets routed out.
  • The subnet/network of the source IP address is the same subnet/network of the next-hop IP address of the routed packet.
  • The datagram is not source-routed.
  • The route for the redirect is not another ICMP redirect or a default route.
  • The router is configured to send redirects. (By default, Cisco routers send ICMP redirects. The interface subcommand no ip redirects will disable ICMP redirects.)

The ICMP redirect/change request uses the format shown in Figure . It has an ICMP type code of 5. In addition, it has a code value of 0, 1, 2, or 3.

The Router Internet Address field in the ICMP redirect is the IP address that should be used as the default gateway for a particular network. In the example in Figure , the ICMP redirect sent from Router A to Host B would have a Router Internet Address field value of 172.16.1.200, which is the IP address of E0 on Router B.

  Web Links

Internet Protocol

http://www.cs.panam.edu/~meng/ Course/CS6175.Protocol/ Note/ip/ip.html

                                                      

8.2 TCP/IP Suite Control Messages  
  8.2.3 Clock synchronization and transit time estimation  
  The TCP/IP protocol suite allows systems to connect to one another over vast distances through multiple networks. Each of these individual networks provides clock synchronization in its own way. As a result, hosts on different networks who are trying to communicate using software that requires time synchronization can sometimes encounter problems. The ICMP timestamp message type is designed to help alleviate this problem.

The ICMP timestamp request message allows a host to ask for the current time according to the remote host. The remote host uses an ICMP timestamp reply message to respond to the request.

The type field on an ICMP timestamp message can be either 13 (timestamp request) or 14 (timestamp reply). The code field value is always set to 0 because there are no additional parameters available. The ICMP timestamp request contains an originate timestamp, which is the time on the requesting host just before the timestamp request is sent. The receive timestamp is the time that the destination host receives the ICMP timestamp request. The transmit timestamp is filled in just before the ICMP timestamp reply is returned. Originate, receive and transmit timestamps are computed in numbers milliseconds elapsed since midnight Universal Time (UT).

All ICMP timestamp reply messages contain the originate, receive and transmit timestamps. Using these three timestamps, the host can estimate transit time across the network by subtracting the originate time from the transit time. It is only an estimate however, as true transit time can vary widely based on traffic and congestion on the network. The host that originated the timestamp request can also estimate the local time on the remote computer.

While ICMP timestamp messages provide a simple way to estimate time on a remote host and total network transit time, this is not the best way to obtain this information. Instead, more robust protocols such as Network Time Protocol (NTP) at the upper layers of the TCP/IP protocol stack perform clock synchronization in a more reliable manner. 

  Web Links

Clock Synchronization Algorithms for Network Measurements

http://www.ieee-infocom.org/2002/ papers/329.pdf

                                                      

8.2 TCP/IP Suite Control Messages  
  8.2.4 Information requests and reply message formats  
  The ICMP information requests and reply messages were originally intended to allow a host to determine its network number. Figure shows the format for an ICMP information request and reply message.

Two type codes are available in this message. Type 15 signifies an information request message, and type 16 identifies an information reply message. This particular ICMP message type is considered obsolete. Other protocols such as BOOTP and Dynamic Host Configuration Protocol (DHCP) are now used to allow hosts to obtain their network numbers. 

8.2 TCP/IP Suite Control Messages  
  8.2.5 Address mask requirements  
  When a network administrator uses the process of subnetting to divide a major IP address into multiple subnets, a new subnet mask is created. This new subnet mask is crucial in identifying network, subnet, and host bits in an IP address. If a host does not know the subnet mask, it may send an address mask request to the local router. If the address of the router is known, this request may be sent directly to the router. Otherwise, the request will be broadcast. When the router receives the request, it will respond with an address mask reply. This address mask reply will identify the correct subnet mask. For example, assume that a host is located within a Class B network and has an IP address of 172.16.5.2. This host does not know the subnet mask, thus it broadcasts an address mask request:
 
Source address: 172.16.5.2
Destination address: 255.255.255.255
Protocol: ICMP = 1
Type: Address Mask Request = AM1
Code: 0
Mask: 255.255.255.0

This broadcast is received by 172.16.5.1, the local router. The router responds with the address mask reply:

Source address: 172.16.5.1
Destination address: 172.16.5.2
Protocol: ICMP = 1
Type: Address Mask Reply = AM2
Code: 0
Mask: 255.255.255.0

The frame format for the address mask request and reply is shown in Figure . Figure shows the descriptions for each field in the address mask request message. Note that the same frame format is used for both the address mask request and the reply. However, an ICMP type number of 17 is assigned to the request and 18 is assigned to the reply.

  Web Links

IP Routing Tech Notes

http://www.cisco.com/en/US/tech/ tk826/tk365/ tech_tech_notes_ list.html

                                                      

8.2 TCP/IP Suite Control Messages  
  8.2.6 Router discovery message  
  When a host on the network boots, and the host has not been manually configured with a default gateway, it can learn of available routers through the process of router discovery. This process begins with the host sending a router solicitation message to all routers, using the multicast address 224.0.0.2 as the destination address. Figure shows the ICMP router discovery message. The router discovery message may also be broadcast to include routers that may not be configured for multicasting. If a router discovery message is sent to a router that does not support the discovery process, the solicitation will go unanswered. 

When a router that supports the discovery process receives the router discovery message , a router advertisement is sent in return. The router advertisement frame format is shown in Figure and an explanation of each field is shown in Figure .

  Web Links

ICMP Router Discovery Messages

http://www.cis.ohio-state.edu/cgi-bin/ rfc/rfc1256.html

                                                    

8.2 TCP/IP Suite Control Messages  
  8.2.7 Router solicitation message  
  A host generates an ICMP router solicitation message in response to a missing default gateway. This message is sent via multicast and it is the first step in the router discovery process. A local router will respond with a router advertisement identifying the default gateway for the local host. Figure identifies the frame format and Figures gives an explanation of each field.
  Web Links

ICMP Router-Discovery Protocol (IDRP)

http://www.cisco.com/en/US/products/sw/ iosswrel/ps1831/ products_configuration_guide_ chapter09186a00800d97f7.html#xtocid15

                                                      

8.2 TCP/IP Suite Control Messages  
  8.2.8 Congestion and flow control messages  
  If multiple computers try to access the same destination at the same time, the destination computer can be overwhelmed with traffic. Congestion can also occur when traffic from a high speed LAN reaches a slower WAN connection. Dropped packets occur when there is too much congestion on a network. ICMP source-quench messages are used to reduce the amount of data lost. The source-quench message asks senders to reduce the rate at which they are transmitting packets. In most cases, congestion will subside after a short period of time, and the source will slowly increase the transmission rate as long as no other source-quench messages are received. Most Cisco routers do not send source-quench messages by default, because the source-quench message may itself add to the network congestion.

A small office home office (SOHO) is a scenario where ICMP source-quench messages might be used effectively. One such SOHO could consist of four computers networked together using CAT-5 cable and Internet connection sharing (ICS) over a 56K modem. It is easy to see that the 10Mbps bandwidth of the SOHO LAN could quickly overwhelm the available 56K bandwidth of the WAN link, resulting in data loss and retransmissions. With ICMP messaging, the host acting as the gateway in the ICS can request that the other hosts reduce their transmission rates to a manageable level, thus preventing continued data loss. A network where congestion on the WAN link could cause communication problems is shown in Figure .

  Web Links

BECN for Congestion Control in TCP/IP Networks: Study and Comparative Evaluation

http://www.sce.carleton.ca/faculty/lambadaris/ recent-papers/ globecom2002.pdf

                                                 

 

    

Summary
  An understanding of the following key points should have been achieved:
  • IP is a best-effort delivery method that uses ICMP messages to alert the sender that the data did not reach its destination.
  • ICMP echo request and echo reply messages allow the network administrator to test IP connectivity to aid in the troubleshooting process.
  • ICMP messages are transmitted using the IP protocol so their delivery is unreliable.
  • ICMP packets have their own special header information starting with a type field and a code field.
  • Identify potential causes of specific ICMP error messages
  • The functions of ICMP control messages
  • ICMP redirect/change request messages
  • ICMP clock synchronization and transit time estimation messages
  • ICMP information request and reply messages
  • ICMP address mask request and reply messages
  • ICMP router discovery message
  • ICMP router solicitation message
  • ICMP congestion and flow control messages