MASINDE MULIRO UNIVERSITY OF SCIENCE & TECHNOLOGY
ECE 422- DATA COMMUNICATIONS & COMPUTER NETWORKS
INTRODUCTION TO THE ADDRESS RESOLUTION
PROTOCOL (ARP)
1.0
INTRODUCTION
Address Resolution Protocol (ARP) is one of the major protocol in the TCP/IP
suit. Its purpose to resolve an IPv4 address (32 bit Logical Address) to the
physical address (48 bit MAC Address).
Network Applications at the Application Layer use IPv4 Address to
communicate with another device.
But at the Datalink layer, the addressing is MAC address (48 bit
Physical Address), and this address is burned into the network card
permanently. You can view your network card’s hardware address by typing the
command "ipconfig /all" at the command prompt (Without double quotes using
Windows Operating Systems).
The purpose of Address Resolution Protocol (ARP) is therefore to find out
the MAC address of a device in your Local Area Network (LAN), for the
corresponding IPv4 address, which network application is trying to
communicate.
4.2 STEPS IN THE ARP
PROTOCOL
The ARP protocol can be broken down to seven steps as follows.
1.
When
a source device want to communicate with another device, it checks its
Address Resolution Protocol (ARP) cache to find it already has a resolved
MAC Address of the destination device.
If it is there, it will use that MAC Address
for communication. To view your Local Address Resolution Protocol (ARP)
cache, Open Command Prompt and type command "arp -a" (Without double quotes
using Windows Operating Systems).
2.
If
ARP resolution is not there in local cache, the source machine will generate
an Address Resolution Protocol (ARP) request message, it puts its own
MAC address as the Sender Hardware
Address and its own IPv4 Address as
the Sender Protocol Address. It fills the destination
IPv4 Address as the Target Protocol
Address. The Target Hardware Address is left blank, since the machine is
trying to find that.
3.
The source device broadcasts the Address Resolution Protocol (ARP) request
message to the local network.
4.
The message is received by each device on the
LAN since it is a
broadcast. Each device compare the
Target Protocol Address (IPv4
Address of the machine to which the source is trying to
communicate) with its own Protocol Address (IPv4
Address). Those who do not match will drop the packet without any
action.
5.
When the targeted device checks the Target Protocol Address, it will find a
match and will generate an Address Resolution Protocol (ARP) reply message.
It takes the Sender
Hardware Address and the Sender
Protocol Address fields from the Address
Resolution Protocol (ARP) request message and uses these values for the
Targeted Hardware Address and Targeted Protocol Address of the reply
message.
6.
The destination device will update its Address Resolution Protocol (ARP)
cache with the details of the sender, since it need to contact the sender
machine soon.
7.
Destination device send the Address Resolution Protocol (ARP) reply message
and it will NOT be a broadcast, but
is designated to the sender, i.e it is unicast.
8.
The source machine will process the Address Resolution Protocol (ARP) reply
from destination and update its Address Resolution Protocol (ARP) cache with
the Sender MAC Address and Sender Protocol Address it received from the
Address Resolution Protocol (ARP) reply message.
4.3 ARP PACKET FORMAT
The Address Resolution Protocol (ARP) packet is as shown below.

Details of the various components
of the packet are discussed below.
Hardware Type: Hardware Type field in the Address Resolution
Protocol (ARP) Message specifies the type of hardware used for the local
network transmitting the Address Resolution Protocol (ARP) message. The
value for
Ethernet is 1. The size of this field
is 2 bytes.
Protocol Type: Each protocol is
assigned a number used in this field.
IPv4
is assigned 2048 (0x0800 in Hexa).
Hardware Address Length:
Hardware Address Length in the Address Resolution Protocol (ARP) Message is
length in bytes of a
hardware (MAC) address.
Ethernet MAC addresses are 6 bytes
long.
Protocol Address Length:
Length in bytes of a
logical address (IPv4 Address).
IPv4 addresses are 4 bytes long.
Opcode: Opcode field
in the Address Resolution Protocol (ARP) Message specifies the nature of the
ARP message. 1 for ARP request and 2 for ARP reply.
Sender Hardware Address:
Layer 2 (MAC
Address) address of the device sending the message.
Sender Protocol Address:
The
protocol address (IPv4 address) of the
device sending the message
Target Hardware Address:
Layer 2 (MAC
Address) of the intended receiver. This field is ignored in
requests.
Target Protocol Address:
The
protocol address (IPv4 Address) of the
intended receiver.
Online References