5/30/2010 1 Chapter 21 Network Layer Address Mapping (ARP) Error Error--reporting reporting (ICMP)...

13
5/30/2010 1 Chapter 21 Network Layer Address Mapping (ARP) Based on Data Communications and Networking, 4 th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007 Dr. Mznah Al-Rodhaan Error Error-reporting reporting (ICMP) (ICMP) Based on Data Communications and Networking, 4 th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007 Dr. Mznah Al-Rodhaan 21.2

Transcript of 5/30/2010 1 Chapter 21 Network Layer Address Mapping (ARP) Error Error--reporting reporting (ICMP)...

5/30/2010

1

Chapter 21

Network Layer

Address Mapping (ARP)

Based onData Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007 Dr. Mznah Al-Rodhaan

ErrorError--reportingreporting (ICMP)(ICMP)

Based onData Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007 Dr. Mznah Al-Rodhaan21.2

5/30/2010

2

ARP: Maps an IP address to a MAC address.RARP : Maps a MAC address to an IP addressRARP has been replaced by DHCP.

Based onData Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007 Dr. Mznah Al-Rodhaan21.3

ICMP: Handle unusual situations such as theoccurrence of an error.IGMP :Handle multicast delivery.

Address Mapping

The delivery of a packet to a host or a router i t l l f dd i l i ll i l drequires two levels of addressing: logical logical and

physicalphysical. We need to be able to map a logical address to its corresponding physical address and vice versa. This can be done by using either static or dynamic mapping.

Based onData Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007 Dr. Mznah Al-Rodhaan21.4

5/30/2010

3

Dynamic Mapping (ARP and RARP)

Based onData Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007 Dr. Mznah Al-Rodhaan21.5

ARP - The Address Resolution ProtocolAn IP datagram must be encapsulated in a frame to pass through the physical network. This requires the physical address of the receiverphysical address of the receiver.ARP associates an IP address with its physical address.When the physical address of another host is required an ARP query packet is sent which includes

IP and physical addresses of the sender

Based onData Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007 Dr. Mznah Al-Rodhaan

IP address of the receiver

The intended recipient recognises its IP address and send back an ARP response which contains the needed physical address.

21.6

5/30/2010

4

ARP operation

Based onData Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007 Dr. Mznah Al-Rodhaan21.7

ARP packet

Hardware Type: 16-bits; Defining the type of network; Ethernet is 1.Protocol Type: 16 bits; IPv4 is 0800

Based onData Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007 Dr. Mznah Al-Rodhaan21.8

Protocol Type: 16-bits; IPv4 is 0800.Hardware length: 8-bits; Ethernet is 6.Protocol length: 8-bits; IPv4 is 4.Operation: 16-bits; 1 for request or 2 for reply.

5/30/2010

5

ARP Request & Reply

Based onData Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007 Dr. Mznah Al-Rodhaan21.9

Encapsulation of ARP packet

Based onData Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007 Dr. Mznah Al-Rodhaan21.10

5/30/2010

6

Based onData Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007 Dr. Mznah Al-Rodhaan21.11

Four cases using ARP

Based onData Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007 Dr. Mznah Al-Rodhaan21.12

5/30/2010

7

Proxy ARP

Based onData Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007 Dr. Mznah Al-Rodhaan21.13

Cache Table

A sender usually has more than one IP datagram to send to the same destinationdatagram to send to the same destinationIt is inefficient to use ARP for each datagramA cache table is used

limited size

Based onData Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007 Dr. Mznah Al-Rodhaan

limited sizemappings retained only for a limited time

21.14

5/30/2010

8

RARPFinds the logical address for a host that only knows its physical addressRARP request packets are broadcast; RARP reply packets are unicastUsed by diskless machines to obtain their IP addressesDHCP is used now It provides static and

Based onData Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007 Dr. Mznah Al-Rodhaan

DHCP is used now. It provides static and dynamic address allocation that can bemanual or automatic.

21.15

Operation

Based onData Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007 Dr. Mznah Al-Rodhaan21.16

A request is broadcast; a reply is unicast.

5/30/2010

9

2121--2 ICMP2 ICMP

TheThe IPIP protocolprotocol hashas nono errorerror--reportingreporting oror errorerror--correctingcorrecting mechanismmechanism.. TheThe IPIP protocolprotocol alsoalso lackslacks aagg ppmechanismmechanism forfor hosthost andand managementmanagement queriesqueries.. TheTheInternetInternet ControlControl MessageMessage ProtocolProtocol (ICMP)(ICMP) hashas beenbeendesigneddesigned toto compensatecompensate forfor thethe aboveabove twotwo deficienciesdeficiencies..ItIt isis aa companioncompanion toto thethe IPIP protocolprotocol..

Topics discussed in this section:Topics discussed in this section:

Based onData Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007 Dr. Mznah Al-Rodhaan21.17

Types of MessagesMessage FormatError Reporting

Topics discussed in this section:Topics discussed in this section:

ICMP protocolIP protocol is a best-effort delivery service, however it has two deficiencies

Lack of error controlLack of assistance mechanismsLack of assistance mechanisms

IP protocol has no error-reporting or error-correction mechanism

What happens when something goes wrong?What happens if a router must discard a datagram because it cannot find a route to the final destination?What if the time-to-live field has a zero value?What if it has to discard all fragments because not all were

Based onData Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007 Dr. Mznah Al-Rodhaan

What if it has to discard all fragments because not all were received within a time limit?

IP protocol also lacks a mechanism for host and management queries.ICMP was designed to compensate for these deficiencies.

21.18

5/30/2010

10

ICMP always reports error messages to the original source.

Based onData Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007 Dr. Mznah Al-Rodhaan21.19

Error-reporting messages

Based onData Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007 Dr. Mznah Al-Rodhaan21.20

5/30/2010

11

Error-reporting messages1. Destination unreachable: Router can not route a datagram

or a host cannot deliver a datagram.

2. Source Quench: IP is connectionless protocol and has no flo control to a oid congestion This message arn theflow control to avoid congestion. This message warn the source that there is congestion in the path and ask the source to slow down.

3. Time-exceeded: When TTL as 0 or when all fragments that make up a message do not arrive at the destination host within a certain time limit.

4 P P bl If h d i i h

Based onData Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007 Dr. Mznah Al-Rodhaan21.21

4. Parameter Problem: If a router or the destination host discovers an ambiguous or missing value in any field of the datagram.

5. Redirection: If router cannot deliver or forward a packet, it sends an ICMP message to the source for table update.

Internet Control Message Protocol (ICMP)

ICMP is used by routers for exchanging error information and for testing. The principal ICMP message types are shown belowmessage types are shown below.

Based onData Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007 Dr. Mznah Al-Rodhaan21.22

5/30/2010

12

Important points about ICMP error messages:❏ No ICMP error message will be generated in

response to a datagram carr ing an ICMP errorresponse to a datagram carrying an ICMP errormessage.

❏ No ICMP error message will be generated for afragmented datagram that is not the first fragment.

❏ No ICMP error message will be generated for adatagram having a multicast address.

❏ No ICMP error message will be generated for a

Based onData Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007 Dr. Mznah Al-Rodhaan21.23

❏ No ICMP error message will be generated for adatagram having a special address such as127.0.0.0 or 0.0.0.0.

Contents of data field for the error messages

Based onData Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007 Dr. Mznah Al-Rodhaan21.24

5/30/2010

13

Redirection concept

If router receives packet that should have been sent to

Based onData Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007 Dr. Mznah Al-Rodhaan21.25

If router receives packet that should have been sent to another router, it sends an ICMP “redirect” message to the sender; Sender modifies its routing table

Reading from the text book

Chapter 21 from 4th edition

Section 21.1 except BOOTP page 619

Section 21.2 until the first paragraph of page 625.

Based onData Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007 Dr. Mznah Al-Rodhaan21.26