Sunteți pe pagina 1din 13

5/30/2010

Chapter 21
Network Layer
Address Mapping (ARP)
Error--reporting (ICMP)
Error

21.2

Based on
th
Data Communications and Networking, 4 Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007

Dr. Mznah Al-Rodhaan

Based on
th
Data Communications and Networking, 4 Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007

Dr. Mznah Al-Rodhaan

5/30/2010

21.3

ARP: Maps an IP address to a MAC address.


RARP : Maps a MAC address to an IP address
RARP has been replaced by DHCP.
ICMP: Handle unusual situations such as the
occurrence of an error.
IGMP :Handle multicast delivery.
Based on
th
Data Communications and Networking, 4 Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007

Dr. Mznah Al-Rodhaan

Address Mapping

21.4

The delivery of a packet to a host or a router


requires
i
ttwo levels
l
l off addressing:
dd
i
l i l and
logical
d
physical. We need to be able to map a
physical
logical address to its corresponding physical
address and vice versa. This can be done by
using either static or dynamic mapping.

Based on
th
Data Communications and Networking, 4 Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007

Dr. Mznah Al-Rodhaan

5/30/2010

Dynamic Mapping (ARP and RARP)

Based on
th
Data Communications and Networking, 4 Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007

21.5

Dr. Mznah Al-Rodhaan

ARP - The Address Resolution Protocol

An IP datagram must be encapsulated in a frame to


pass through the physical network. This requires the
physical address of the receiver
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

21.6

IP and physical addresses of the sender


IP address of the receiver

The intended recipient recognises its IP address and


send back an ARP response which contains the
needed physical address.
Based on
th
Data Communications and Networking, 4 Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007

Dr. Mznah Al-Rodhaan

5/30/2010

ARP operation

Based on
th
Data Communications and Networking, 4 Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007

21.7

Dr. Mznah Al-Rodhaan

ARP packet

21.8

Hardware Type: 16-bits; Defining the type of network;


Ethernet is 1.
Protocol Type: 16-bits;
16 bits; IPv4 is 0800
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.
Based on
th
Data Communications and Networking, 4 Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007

Dr. Mznah Al-Rodhaan

5/30/2010

ARP Request & Reply

21.9

Based on
th
Data Communications and Networking, 4 Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007

Dr. Mznah Al-Rodhaan

Encapsulation of ARP packet

21.10

Based on
th
Data Communications and Networking, 4 Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007

Dr. Mznah Al-Rodhaan

5/30/2010

21.11

Based on
th
Data Communications and Networking, 4 Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007

Dr. Mznah Al-Rodhaan

Four cases using ARP

21.12

Based on
th
Data Communications and Networking, 4 Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007

Dr. Mznah Al-Rodhaan

5/30/2010

Proxy ARP

Based on
th
Data Communications and Networking, 4 Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007

21.13

Dr. Mznah Al-Rodhaan

Cache Table

A sender usually has more than one IP


datagram to send to the same destination

It is inefficient to use ARP for each


datagram

A cache table is used

21.14

limited size

mappings retained only for a limited time

Based on
th
Data Communications and Networking, 4 Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007

Dr. Mznah Al-Rodhaan

5/30/2010

RARP

21.15

Finds the logical address for a host that only


knows its physical address
RARP request packets are broadcast; RARP
reply packets are unicast
Used by diskless machines to obtain their IP
addresses
DHCP is used now
now. It provides static and
dynamic address allocation that can be
manual or automatic.
Based on
th
Data Communications and Networking, 4 Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007

Dr. Mznah Al-Rodhaan

Operation

A request is broadcast; a reply is unicast.

21.16

Based on
th
Data Communications and Networking, 4 Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007

Dr. Mznah Al-Rodhaan

5/30/2010

21--2 ICMP
21
The IP protocol has no error
error--reporting or error
error-correcting
g mechanism
mechanism.. The IP protocol
p
also lacks a
mechanism for host and management queries.
queries. The
Internet Control Message Protocol (ICMP) has been
designed to compensate for the above two deficiencies
deficiencies..
It is a companion to the IP protocol
protocol..
Topics discussed in this section:
Types of Messages
Message Format
Error Reporting

21.17

Based on
th
Data Communications and Networking, 4 Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007

Dr. Mznah Al-Rodhaan

ICMP protocol

21.18

IP protocol is a best-effort delivery service, however it has


two deficiencies
Lack of error control
Lack 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
received within a time limit?
IP protocol also lacks a mechanism for host and
management queries.
ICMP was designed to compensate for these deficiencies.
Based on
th
Data Communications and Networking, 4 Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007

Dr. Mznah Al-Rodhaan

5/30/2010

ICMP always reports error messages to


the original source.

21.19

Based on
th
Data Communications and Networking, 4 Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007

Dr. Mznah Al-Rodhaan

Error-reporting messages

21.20

Based on
th
Data Communications and Networking, 4 Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007

Dr. Mznah Al-Rodhaan

10

5/30/2010

Error-reporting messages
1. 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


flow control to aavoid
flo
oid congestion
congestion. This message warn
arn 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 Parameter
4.
P
Problem:
P bl
If a router or the
h d
destination
i i host
h
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.
21.21

Based on
th
Data Communications and Networking, 4 Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007

Dr. Mznah Al-Rodhaan

Internet Control Message Protocol (ICMP)


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

21.22

Based on
th
Data Communications and Networking, 4 Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007

Dr. Mznah Al-Rodhaan

11

5/30/2010

Important points about ICMP error messages:


No ICMP error message will be generated in
response to a datagram carrying
carr ing an ICMP error
message.
No ICMP error message will be generated for a
fragmented datagram that is not the first fragment.
No ICMP error message will be generated for a
datagram having a multicast address.
No ICMP error message will be generated for a
datagram having a special address such as
127.0.0.0 or 0.0.0.0.

21.23

Based on
th
Data Communications and Networking, 4 Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007

Dr. Mznah Al-Rodhaan

Contents of data field for the error messages

21.24

Based on
th
Data Communications and Networking, 4 Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007

Dr. Mznah Al-Rodhaan

12

5/30/2010

Redirection concept

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

Based on
th
Data Communications and Networking, 4 Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007

21.25

Dr. Mznah Al-Rodhaan

Reading from the text book

21.26

Chapter 21 from 4th edition

Section 21.1 except BOOTP page 619

Section 21.2 until the first paragraph of page 625.

Based on
th
Data Communications and Networking, 4 Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007

Dr. Mznah Al-Rodhaan

13

S-ar putea să vă placă și