page 19/13/2015 chapter 8 some conditions that must be met for host to host communication over an...
TRANSCRIPT
Page 104/21/23
Chapter 8
Some conditions that must be met for host to host communication over an internetwork:
• a default gateway must be properly configured on the hosts and local network
• intermediary devices, such as routers, must be present on the network and have knowledge of how to reach the destination network.
• the IP addresses of hosts must be in the same network or subnet as their respective gateway devices
TCP/IP Error Message
Page 204/21/23
Chapter 8
IP is an unreliable method for delivery of network data. It is a best effort delivery.
Nothing in IP basic design allows it to notify the sender that a data transmission has failed.
Internet Control Message Protocol (ICMP) is a component of TCP/IP that addresses this basic limitation.
NOTE:
• ICMP does not overcome the unreliability issues in IP
• reliability must be provided by upper layer protocols, if it is needed.
ICMP is an error reporting protocol for IP.
TCP/IP Error Message
Page 304/21/23
Chapter 8
If ICMP fails, it does not produce ICMP error messages.
If a route is down, such as a serial connection between routers so that the destination network is unreachable, the router will send ICMP host unreachable message to the source.
Hence when a router doesn’t have the information to a destination, it:
• sends ICMP message of designation unreachable to the source
• drops the datagram
• No further ICMP messages will be sent as a result of this transaction
TCP/IP Error Message
Page 404/21/23
Chapter 8ICMP Echo Request (PING)
Page 504/21/23
Chapter 8
Use the PING command to test reachability
PING sends echo request message to the destination
The destination responds with echo reply message
The messages are indicated in the type field (8 bits) of the ICMP message.
Test Reachability
Page 604/21/23
Chapter 8ICMP Echo Request (PING)
Page 704/21/23
Chapter 8
To keep ICMP from routing an infinite number of times it has a Time-To-Live (TTL) timer.
The TTL value is defined by the routing protocol – RIP, hop count 15.
As the ICMP goes through each router the TTL is decremented, and when it reaches zero, the datagram is discarded.
Excessively Long Routes
Page 804/21/23
Chapter 8ICMP Echo Request (PING)
Page 904/21/23
Chapter 8ICMP Echo Request (PING)
Page 1004/21/23
Chapter 8
All ICMP messages format start with these fields:
1. type
2. code
3. checksum
For ICMP echo request and echo reply, there are two unique fields:
1. identifier
2. sequence
These two fields are used to match the echo request with the echo reply.
Echo Message
Page 1104/21/23
Chapter 8
• ICMP messages have special formats.
• All ICMP message formats start with these same three fields: – Type - indicates the type of ICMP message being sent
– Code - indicates the reason the packet could not be delivered
– Checksum - used to verify the integrity of the data
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
Optional Data (variable length)
Type (8 bits) Code (8 bits) IMCP Header Checksum (16 bits)Identifier (16 bits) Sequence Number (16 bits)
Sequence Number
DataIdentifierChecksumType Code
ICMP Request/Reply Message
Page 1204/21/23
Chapter 8
If a packet can not reach it’s destination, then ICMP sends a destination unreachable message. The code value in the ICMP datagram is 0.
Other reasons for destination unreachable
• packet fragmentation from Token Ring to Ethernet• FTP or Web services are unavailable• non-existent IP address• default gateway may not be configured correctly• destination device may be disconnected from its network• router’s interface is down
Some examples of code values:
0 = network unreachable
1 = host unreachable
2 = protocol unreachable
3 = port unreachable
Unreachable Message
Page 1304/21/23
Chapter 8ICMP Codes
Page 1404/21/23
Chapter 8
If there is an error in the header of a datagram, to be delivered to it’s destination, ICMP has a type value of 12; code value of 0, and a pointer field indicating the octet of the datagram that produced the error.
Miscellaneous Error Reporting
Page 1504/21/23
Chapter 8
Since IP has no built-in method to provide information or control messages why a datagram can’t be delivered, ICMP performs these functions.
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.
Some examples of control messages are:
0 = echo reply
3 = destination unreachable
5 = redirect/change request
8 = echo request
11 = time exceeded
12 = parameter problem
ICMP Control Messages
Page 1604/21/23
Chapter 8
•Redirect/Change request can only be initiated by a gateway.
•The gateway is the ethernet port address that a host uses to get to the network.
•In some cases the host has a ‘hard’ coded gateway.
• 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. Host B
Host C
Router A Router B
(continued)
Control Messages / Redirect Change Request
Page 1704/21/23
Chapter 8
• It determines that the path to the network is back through the same interface that 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.
Host B
Host C
Router A Router B
Control Messages / Redirect Change Request
Page 1804/21/23
Chapter 8
To disable redirect messages on a router interface:
RouterA(config-if)# no ip redirects
Control Messages / Redirect Change Request
Page 1904/21/23
Chapter 8
The TCP/IP protocol suite allows systems to connect over vast distances. Each individual networks might provide it’s own synchronization.
ICMP timestamp request can be used. There is a timestamp request & reply.
This ICMP message contain the originate, receive and transmit timestamps to calculate the correct timing. This is used to request the current time of the remote host, and gather information needed to estimate the transit time across the network.
However, the Network Time Protocol (NTP) at the upper layers of the TCP/IP is a more reliable manner.
Control Messages ICMP Time Stamp
Page 2004/21/23
Chapter 8
ICMP request & reply messages are considered obsolete.
Protocols such as BOOTP and DHCP now provide the service of providing a network number.
Control MessageRequest and Reply
Page 2104/21/23
Chapter 8
This ICMP message is replied to a host by a router.
The reply contains the 32-bit mask for the subnet from which the request was received.
Control MessageAddress Mask Request
Page 2204/21/23
Chapter 8
If a host is missing a default gateway, it can generate an ICMP router solicitation message.
Message is sent via multicast. A local router will respond with the gateway address.
The router discovery process begins when a host requires a default gateway IP address.
The router advertisement & solicitation messages are used during the ICMP router discovery process.
Control MessageRouter Discovery Message
Page 2304/21/23
Chapter 8
If a host encounters congestion because of difference in bandwidth, an ICMP source-quench message can be sent to ask senders to reduce the rate at which they are transmitting traffic.
Hence, for the source-quench message
• a host can send the message
• a gateway may send the message
• message tells the sending device to slow down
Congestion and Flow Control Messages