ARP RARP ICMP Protocol

0
31
ARP RARP ICMP
ARP RARP ICMP Protocol

Address Mapping

The delivery of a packet to a host or a router requires two levels of addressing: logical and physical. We need to be able to map a logical address to its corresponding physical address and vice versa. These can be done using either static or dynamic mapping.

Position of ARP in TCP/IP protocol suite

Position of ARP in TCP IP protocol suite

ARP operation

ARP operation

ARP packet

ARP packet

Encapsulation of ARP packet

Encapsulation of ARP packet

Four cases using ARP

 Four cases using ARP

ATM-ARP

When IP packet is moving through an ATM WAN, a mechanism protocol is needed to find (map) the physical address of the exiting-point router in the ATM WAN given the IP address of the router. This is the same task performed by ARP on a LAN.

ATM-ARP PACKET

ATM-ARP PACKET

OPER field

Binding with PVC

Binding with PVC

Binding with ATMARP

Binding with ATMARP

The request and reply message can be used to bind a physical address to an IP address in an SVC situation.

The inverse request and inverse reply can also be used to build the server’s mapping table.

Building a table

Building a table

LIS

LIS

ARP Package Components

Cache Table
Queues
Output Module
Input Module
Cache-Control Module

ARP components

ARP components

The Cache Table

If ARP just resolved an IP address, chances are a few moments later someone is going to ask to resolve the same IP address
When ARP returns a MAC address, it is placed in a cache. When the next request comes in for the same IP address, look first in the cache

The Cache Table Contents

State: FREE, PENDING, RESOLVED
Hardware type: same as ARP field
Protocol type: same as ARP field
Hardware length: same as ARP field
Protocol length: same as ARP field
Interface number: port number (m0,m1, m2)

Queue number: which queue the ARP request is sitting in
Attempts: how many times have you tried to resolve this address?
Time-out: how long until this address is tossed out (need the room cache)
Hardware address: destination hardware address
Protocol address: destination IP address

 

How Does the Cache Work?

The output module waits for an IP packet with a request
Checks the cache for an existing entry
If entry found and state RESOLVED, we already have this MAC address
If entry found and state PENDING, packet waits until dest hard address found

If no entry found, output module places this request in the queue, and a new entry is placed in a cache with state PENDING and ATTEMPTS set to 1. An ARP request is then broadcast

The input module waits until an ARP request or reply arrives
Module checks the cache for this entry
If entry is found and state is PENDING, module updates entry’s target hardware address changes state to RESOLVED and sets the TIME-OUT value

If entry is found and state RESOLVED, module still updates the entry (target hardware address could have changed) and the TIME-OUT value reset
If entry not found, the module creates a new entry. State is set to RESOLVED and TIME-OUT is set

Now the module checks to see if arrived ARP packet is a Request. If it is, the module immediately creates an ARP Reply message and sends it back to the sender.

The cache-control module periodically checks each cache entry
If entry’s state is FREE, skips it
If entry’s state is PENDING, Attempts field is incremented by 1. This value greater than max? Toss this entry (and mark the entry as FREE). Less than max? Send another ARP request

If state of entry is RESOLVED, module decrements value of Time-out field accordingly
If Time-out field < 0, then remove entry and set state to FREE

RARP

RARP finds the logical address for a machine that only knows its physical address.

This is often encountered on thin-client workstations. No disk, so when
the machine is booted, it needs to know its IP address (don’t want to burn
the IP address into the ROM).

RARP requests are broadcast, RARP replies are unicast.

If a thin-client workstation needs to know its IP address, it probably also
needs to know its subnet mask, router address, DNS address, etc. So we need something more than RARP. BOOTP, and now DHCP have replaced RARP.

RARP Operation

RARP Operation

RARP packet

RARP packet

Encapsulation of RARP packet

Encapsulation of RARP packet

ICMP

The IP protocol has no error-reporting or error-correcting mechanism. The IP protocol also lacks a mechanism for host and management queries. The Internet Control Message Protocol (ICMP) has been designed to compensate for the above two deficiencies. It is a companion to the IP protocol.

General format of ICMP messages

General format of ICMP messages

ICMP always reports error messages to the original source.

Error-reporting messages

Error-reporting messages

Important points about ICMP error messages:

No ICMP error message will be generated in response to a datagram carrying 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.

Contents of data field for the error messages

Contents of data field for the error messages

Destination-unreachable format

Destination-unreachable format

Destination-unreachable messages with codes 2 or 3 can be created only by the
destination host.

Other destination-unreachable messages can be created only by routers.

Source-quench format

Source-quench format

Time-exceeded message format

Time-exceeded message format

Parameter-problem message format

Parameter-problem message format

A host usually starts with a small routing table that is gradually augmented and updated.

One of the tools to accomplish this is the redirection message.

Redirection concept

Redirection concept

Query messages

Query messages

Encapsulation of ICMP query messages

Encapsulation of ICMP query messages

Example of checksum calculation

Example of checksum calculation

 

LEAVE A REPLY

Please enter your comment!
Please enter your name here