0% found this document useful (0 votes)
6 views30 pages

Understanding ARP and RARP Protocols

The document provides an overview of ARP (Address Resolution Protocol) and RARP (Reverse Address Resolution Protocol) within the TCP/IP protocol suite, detailing their operations and packet formats. It explains the structure of ARP and RARP packets, including fields such as hardware type, protocol type, and addresses. Additionally, it includes examples of ARP requests and replies, as well as the functioning of cache tables in managing address resolutions.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views30 pages

Understanding ARP and RARP Protocols

The document provides an overview of ARP (Address Resolution Protocol) and RARP (Reverse Address Resolution Protocol) within the TCP/IP protocol suite, detailing their operations and packet formats. It explains the structure of ARP and RARP packets, including fields such as hardware type, protocol type, and addresses. Additionally, it includes examples of ARP requests and replies, as well as the functioning of cache tables in managing address resolutions.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

ARP & RARP

ARP and RARP

2
Position of ARP and RARP in TCP/IP
protocol suite

3
ARP operation

4
ARP packet

5
Packet Format
• Hardware type.
– This is a 16-bit field defining the type of the network
on which ARP is running. Each LAN has been assigned
an integer based on its type. For example, Ethernet is
given the type 1. ARP can be used on any physical
network.
• Protocol type.
– This is a 16-bit field defining the protocol. For
example, the value of this field for the IPv4 protocol is
080016 . ARP can be used with any higher-level
protocol.
Packet Format
• Hardware length.
– This is an 8-bit field defining the length of the physical
address in bytes. For example, for Ethernet the value
is 6.
• Protocol length.
– This is an 8-bit field defining the length of the logical
address in bytes. For example, for the IPv4 protocol
the value is 4.
• Operation.
– This is a 16-bit field defining the type of packet. Two
packet types are defined: ARP request (1), ARP reply
(2).
Packet Format
• Sender hardware address.
– This is a variable-length field defining the physical address
of the sender. For example, for Ethernet this field is 6 bytes
long.
• Sender protocol address.
– This is a variable-length field defining the logical (for
example, IP) address of the sender. For the IP protocol, this
field is 4 bytes long.
• Target hardware address.
– This is a variable-length field defining the physical address
of the target. For example, for Ethernet this field is 6 bytes
long. For an ARP request message, this field is all 0s
because the sender does not know the physical address of
the target.
Packet Format
• Target protocol address.
– This is a variable-length field defining the logical
(for example, IP) address of the target. For the
IPv4 protocol, this field is 4 bytes long.
Encapsulation of ARP packet

10
Four cases using ARP

11
Note:

An ARP request is broadcast;


an ARP reply is unicast.

12
Example
A host with IP address [Link] and physical
address B2:34:55:10:22:10 has a packet to send to
another host with IP address [Link] and physical
address A4:6E:F4:59:83:AB (which is unknown to the
first host). The two hosts are on the same Ethernet
network. Show the ARP request and reply packets
encapsulated in Ethernet frames.

13
Solution

Figure shows the ARP request and reply packets. Note


that the ARP data field in this case is 28 bytes, and that
the individual addresses do not fit in the 4-byte
boundary. That is why we do not show the regular
4-byte boundaries for these addresses. Also note that
the IP addresses are shown in hexadecimal.

14
Example 1

15
Proxy ARP

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

17
Note:

The RARP request packets are broadcast;


the RARP reply packets are unicast.

18
RARP operation

19
RARP packet

20
Encapsulation of RARP packet

21
ARP components

22
Original cache table used for examples

23
Example 2

The ARP output module receives an IP datagram (from


the IP layer) with the destination address [Link]. It
checks the cache table and finds that an entry exists for
this destination with the RESOLVED state (R in the
table). It extracts the hardware address, which is
457342ACAE32, and sends the packet and the address
to the data link layer for transmission. The cache table
remains the same.

24
Example 3

Twenty seconds later, the ARP output module receives


an IP datagram (from the IP layer) with the destination
address [Link]. It checks the cache table and does
not find this destination in the table. The module adds
an entry to the table with the state PENDING and the
Attempt value 1. It creates a new queue for this
destination and enqueues the packet. It then sends an
ARP request to the data link layer for this destination.
The new cache table is shown in Table .

25
Updated cache table for Example 3

26
Example 4

Fifteen seconds later, the ARP input module receives


an ARP packet with target protocol (IP) address
[Link]. The module checks the table and finds this
address. It changes the state of the entry to RESOLVED
and sets the time-out value to 900. The module then
adds the target hardware address (E34573242ACA) to
the entry. Now it accesses queue 18 and sends all the
packets in this queue, one by one, to the data link layer.
The new cache table is shown in Table .

27
Updated cache table for Example 4

28
Example 5

Twenty-five seconds later, the cache-control module


updates every entry. The time-out values for the first
three resolved entries are decremented by 60. The
time-out value for the last resolved entry is
decremented by 25. The state of the next-to-the last
entry is changed to FREE because the time-out is zero.
For each of the three pending entries, the value of the
attempts

29
Updated cache table for Example 5

30

You might also like