0% found this document useful (0 votes)
8 views24 pages

Understanding ARP and RARP Protocols

The document explains the Address Resolution Protocol (ARP) and Reverse Address Resolution Protocol (RARP), detailing their functions in resolving IP addresses to MAC addresses and vice versa. ARP is used for communication within a local network, while RARP helps devices without IP addresses, like diskless workstations, to discover their IP addresses. It also highlights the operational processes of both protocols, their packet formats, and the limitations of RARP, which has largely been replaced by BOOTP and DHCP.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views24 pages

Understanding ARP and RARP Protocols

The document explains the Address Resolution Protocol (ARP) and Reverse Address Resolution Protocol (RARP), detailing their functions in resolving IP addresses to MAC addresses and vice versa. ARP is used for communication within a local network, while RARP helps devices without IP addresses, like diskless workstations, to discover their IP addresses. It also highlights the operational processes of both protocols, their packet formats, and the limitations of RARP, which has largely been replaced by BOOTP and DHCP.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

ARP & RARP

Address Resolution Protocol


(ARP)
Address Resolution Protocol (ARP)
• Address Resolution Protocol (ARP) is a communication protocol used
to find the MAC (Media Access Control) address of a device from its IP
address.
• This protocol is used when a device wants to communicate with
another device on a Local Area Network or Ethernet.
• Protocol that is used to resolve IP addresses to MAC addresses.
Address Resolution Protocol (ARP)
• The MAC address is a physical address of a device. It's a globally unique
number that is assigned to every network interface card.
• Whenever a device needs to communicate with another device on a local
area network, it needs the MAC address for that device and devices use
ARP to acquire the MAC address for that device.
• So as an example let's say that computer A wants to communicate with
computer B.
• Now computer A already knows the IP address for computer B. But in order
to communicate with computer B, it still needs its MAC address.
• IP address is used to locate a device on a network and the MAC address is
what identifies the actual device.
ARP
• The ARP’s main task is to convert the 32-bit IP address (for IPv4) to a
48-bit MAC address.
• This protocol is mostly used to determine the hardware (MAC)
address of a device from an IP address.
WORKING OF ARP
[Link] a host tries to interact with another host, an ARP request is
initiated. If the IP address is for the local network, the source host
checks its ARP cache to find out the hardware address of the
destination computer.
[Link] the correspondence hardware address is not found, ARP broadcasts
the request to all the local hosts.
[Link] hosts receive the broadcast and check their own IP address. If no
match is discovered, the request is ignored.
[Link] destination host that finds the matching IP address sends an ARP
reply to the source host along with its hardware address, thus
establishing the communication.
[Link] ARP cache is then updated with the hardware address of the
destination host.
Important ARP terms:

• ARP Cache: After resolving the MAC address, the ARP sends it to the
cache stored in a table for future reference. The subsequent
communications can use the MAC address from the table.
• ARP Cache Timeout: It is the time for which the MAC address in the
ARP cache can reside.
• ARP request: Broadcasting a packet over the network to validate
whether we came across the destination MAC address or not.
• ARP response/reply: The MAC address response that the source
receives from the destination aids in further communication of the
data.
ARP Packet Format
ARP Packet Format
ARP Packet Format

• Hardware Type:
• This is to specify the type of hardware used by the local network to transmit the
Address Resolution Protocols message. Once common hardware under this category
would be the ‘Ethernet’ with a value equal to 1, and field size would be 2.

• Protocol Type:
• This field is the complement of the Hardware Type field, specifying the type of layer
three addresses used in the message. For IPv4 addresses, this value is 2048

• Hardware length:
• This is the length in bytes for the MAC address;Ethernet has a MAC address of 6
bytes long.

• Protocol length:
• It represents the length of the IPV4 logical address, IPV4 address are generally 4
ARP Packet Format
• Operational request reply or OPER:
• it specifies the nature of the ARP message. An ARP Request has an assigned value of 1,
whereas the ARP reply holds the value of 2.
• Sender hardware address or MAC address:
• This field specifies the physical address of the sender.

• Sender IP address or sender protocol address:


• This field is used to determine the logical address of the sender

• Target hardware address or MAC address:


• specifies the physical address of the target.

• Target IP address or target protocol address:


• This field determines the logical address of the target.
Reverse Address Resolution
Protocol (RARP)
Reverse Address Resolution Protocol (RARP)
• RARP is a protocol that is responsible for the translation of Physical
Address (MAC address) to IP address.
• Hosts like diskless workstations only have their hardware interface
addresses or MAC address, but not their IP addresses.
• They must discover their IP addresses from an external source, usually
via RARP protocol.
• The reverse address resolution is performed the same way as the ARP
address resolution. The same packet format is used for the ARP.
• An exception is the operation code field that now takes the following
values−
• 3 for RARP request
• 4 for RARP reply
RARP server
• Some devices in the network are as configured to act as RARP servers
• A network administrator creates a table in a RARP server that maps
the physical interface or media access control (MAC) addresses to
corresponding IP addresses.
• This table can be referenced by devices seeking to dynamically learn
their IP address.
Steps to Achieve the IP Address from RARP
Server:
Working of RARP
1. Source Device Generates RARP Request Message and Broadcasts RARP
Request Message

2. Local Devices Process RARP Request Message

3. RARP Server Generates RARP Reply Message:

4. RARP Server Sends RARP Reply Message

5. Source Device Processes RARP Reply Message:


Working of RARP
• Source Device “Generates RARP Request Message” – The source device generates a RARP Request message.
The Source puts its own data link-layer address as both the Sender Hardware Address and also the Target
Hardware Address. It leaves both the Sender Protocol Address and the Target Protocol Address blank.
• Source Device “Broadcasts RARP Request Message” – The source broadcasts the ARP Request message on the
local network.
• Local Devices “Process RARP Request Message” – The message is received by each device on the local
network and processed. Devices that are not configured to act as RARP servers ignore the message.
• RARP Server Generates RARP Reply Message: Any device on the network that is a RARP server responds to the
broadcast from the source device. It generates a RARP Reply and sets the Sender Hardware Address and Sender
Protocol Address to its own hardware and IP address of course. It then sets the Target Hardware Address to the
hardware address of the original source device. It looks up in a table the hardware address of the source,
determines that device’s IP address assignment, and puts it into the Target Protocol Address field.
• RARP Server Sends RARP Reply Message: The RARP server sends the RARP Reply message unicast to the
device looking to be configured.
• Source Device Processes RARP Reply Message: The source device processes the reply from the RARP server. It
then configures itself using the IP address in the Target Protocol Address supplied by the RARP server.
RARP Request Broadcast
RARP Reply
Difference between ARP and RARP
Problems with RARP
• There is a serious problem with RARP:
• Broadcasting is done at the data link layer.
• RARP is a link layer protocol and the problem of RARP is that you can’t
route these packets. You need a RARP server on every subnet.
• The physical broadcast address, all is in the case of Ethernet, does not
pass the boundaries of a network.
• This means that if an administrator has several networks or several
subnets, it needs to assign a RARP server for each network or subnet.
This is the reason that RARP is almost obsolete.
• Two protocols, BOOTP and DHCP replaces RARP

You might also like