• सुखार्थी त्यजते विद्यं विध्यार्थी त्यजते सुखम्सु sखर्थीन: कुतॊ विद्या कुतॊ विध्यार्थीन: सुखम् ||
  • “Luxury people leave knowledge, but a student leaves Luxury No knowledge for one who seeks Luxury, No luxury for student”
  • न चोर हार्यं न च राज हार्यं न भात्रू भाज्यं न च भारकारि |व्ययं कृते वर्धत एव नित्यं विद्याधनं सर्वधनप्रधानम ||
  • Cannot be snatched away by thief, cannot be snatched away by king, Cannot be divided among brothers, Not heavy either If spent daily, it always keeps growing. The wealth of knowledge is the precious of wealth of all”

ARP Address Resolution Protocol




ADDRESS MAPPING


Every machine on the Internet has one (or more) IP addresses, these cannot actually be used for sending packets because the data link layer hardware does not understand Internet addresses.

Every Ethernet board (Network Interface Card) ever manufactured comes equipped with a 48-bit Ethernet address. Manufacturers of Ethernet boards request a block of addresses from a central authority to ensure that no two boards have the same address .The boards send and receive frames based on 48-bit Ethernet addresses. They know nothing  about 32-bit IP addresses.

 The hosts and routers are recognized at the network level by their logical (IP) addresses. However, packets pass through physical networks to reach these hosts and routers. At the physical level, the hosts and routers are recognized by their physical addresses.

 

 

The physical address and the logical address are two different identifiers. We need both because:

 

  •        a physical network such as Ethernet can have  different protocols at the network layer such as IPX (Novell)  and IP at the same time.
  •        Similarly a packet at network layer such as IP may pass through different physical networks such as LocalTalk (Apple) and Ethernet.
Thus delivery of packet requires two level of addressing : logical and physical. We should be able to map physical address to its corresponding logical address. There are two type of mapping

 

  •        Static Mapping
  •        Dynamic Mapping

 Static Mapping: It involves creation of a table that associates a logical address with a physical address. The table is stored in each machine on the network.

 

This has some limitations because physical addresses may change due to:


  1.         NIC  of the machine changed due to some technical problem.
  2.         In LAN like Local Talk the physical address changes every time we boot the system.
  3.         In mobile computer (laptop etc) whenever we move from one physical network to other address changes.

Dynamic Mapping:  In dynamic mapping if machine knows any one address (logical or physical) It uses a protocol to find the other address.



Address Resolution Protocol

Address Resolution Protocol (ARP) is a protocol for mapping an Internet Protocol address (IP address) to a physical machine address that is recognized in the local network. It works along with IP protocol.




Step 1:  Whenever a machine (host, or a router), needs to find the physical address of another machine on its network, it sends an ARP query packet. The packet includes the physical and IP addresses of the sender and the IP address of the receiver. The query is broadcasted over the network



Step 2:  Every machine on the network receives and processes the ARP query packet, but only the intended recipient recognizes its IP address and sends back an ARP response packet. The response packet contains the recipient’s IP and physical addresses. The packet is unicasted directly to the inquirer.


ARP Encapsulation




ARP Packet Format

Figure  shows the format of an ARP packet.

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 (0800)16. ARP can be used with any higher-level protocol.


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 bytes.

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 bytes.


Operation. This is a 16-bit field defining the type of packet. Two packet types are defined: ARP request (1), ARP reply (2).


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.


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.


Related Question:

Question 1: Why do we need mapping of Physical address with Logical address ? [5 marks]

Question 2 : With the help of an example explain how Address Resolution Protocol can be used for mapping Logical address with Physical Address. [10 marks]

Question 3: Explain various fields of ARP format. [10 marks]

Question 4 : A host with IP address "130.23.43.20"  and physical address  "B2:34:55:10:22:10"  has a packet to send to another host with IP address "130.23.43.25"   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. [10 marks]

Answer :