Open In App

ARP Protocol

Last Updated : 06 Oct, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

ARP (Address Resolution Protocol) is an important protocol that plays an important role in the networking world. When working with your network systems, this protocol helps to identify specified network devices and find their addresses. Its main purpose is to duly transport data packets over the network, allowing them to move between devices connected to your heritage network.

In this article, we will give you with information about the introductory principles of ARP protocol, how it works, and its significance. We’ll also tell you why ARP is important and how it can be used in your networking systems. Through this article, you’ll gain deep knowledge of ARP protocol and make your place in the world of networking.

What is the ARP Protocol?

ARP stands for “Address Resolution Protocol”. It is a network protocol used to determine the MAC address (hardware address) from any IP address.

In other words, ARP is used to translate IP Address into MAC Address. When one device wants to communicate with another device in a LAN (local area network) network, the ARP protocol is used.

This protocol is used when a device wants to communicate with another device over a local area network or ethernet.

ARP is a network layer protocol. This is a very important protocol in the TCP/IP protocol suite. Although it was developed in the early 80s, it was defined in RFC 826 in 1982. ARP is implemented with important technologies like IPv4, X.25, frame relay, and ATM.

ARP protocol finds the MAC address based on IP address. IP address is used to communicate with any device at the application layer. But to communicate with a device at the data link layer or to send data to it, a MAC address is required.

When data is sent to a local host, the data travels between networks via IP address. But to reach that host in LAN, it needs the MAC address of that host. In this situation the address resolution protocol plays an important role.

Important ARP Terms

  • ARP Cache :- After receiving the MAC address, ARP passes it to the sender where it is stored in a table for future reference. And this is called ARP Cache which is later used to obtain the MAC address.
  • ARP Cache Timeout :- This is the time in which the MAC address can remain in the ARP Cache.
  • ARP request :- Broadcasting a packet over the network to verify whether we have arrived at the destination MAC address.
  • ARP response/reply :- It is a MAC address response that the sender receives from the receiver which helps in further communication of data.

Types of ARP

There are four types of ARP protocol they are as follows:-

  1. Proxy ARP
  2. Gratuitous ARP
  3. Reverse ARP
  4. Inverse ARP

1. Proxy ARP

This is a technique through which proxy ARP in a network can answer ARP queries of IP addresses that are not in that network. That is, if we understand it in simple language, the Proxy server can also respond to queries of IP-address of other networks.

Through this we can fool the other person because instead of the MAC address of the destination device, the MAC address of the proxy server is used and the other person does not even know.

2. Gratuitous ARP

This is an arp request of a host, which we use to check duplicate ip-address. And we can also use it to update the arp table of other devices. That is, through this we can check whether the host is using its original IP-address, or is using a duplicate IP-address.

This is a very important ARP. Which proves to be very helpful in protecting us from the wrong person, and by using it we can check the ip-address.

3. Reverse ARP

This is also a networking protocol, which we can use through client computer. That is, it is used to obtain information about one’s own network from the computer network. That is, if understood in simple language, it is a TCP/IP protocol which we use to obtain information about the IP address of the computer server.

That is, to know the IP address of our computer server, we use Reverse ARP, which works under a networking protocol.

4. Inverse ARP (InARP)

Inverse ARP, it is the opposite of ARP, that is, we use it to know the IP address of our device through MAC Address, that is, it is such a networking technology, through this we convert MAC Address into IP address. Can translate. It is mainly used in ATM machines.

How ARP Protocol Works?

Below is a Working flow diagram of ARP Protocol

How ARP Protocol Works?

ARP Protocol

Below is the working of address resolution protocol is being explained in some steps :-

  • When a sender wants to communicate with a receiver, the sender first checks its ARP cache. Sender checks whether the receiver’s MAC address is already present in the ARP cache or not?
  • If the receiver’s MAC address is already present in the ARP cache, the sender will communicate with the receiver using that MAC address.
  • If the MAC address of the receiver device is not already present in the ARP cache, then in such a situation an ARP request message is prepared by the sender device.This message contains the MAC address of the sender, IP address of the sender and IP address of the receiver. The field containing the MAC address of the receiver is left blank because it is being searched.
  • Sender device broadcasts this ARP request message in the LAN. Because this is a broadcast message, every device connected to the LAN receives this message.
  • All devices match the receiver IP address of this request message with their own IP address. Devices whose IP address does not match drop this request message.
  • The device whose IP address matches the receiver IP address of this request message receives this message and prepares an ARP reply message. This is a unicast message which is sent only to the sender.
  • In ARP reply message, the sender’s IP address and MAC address are used to send the reply message. Besides, in this message the receiver also sends its IP address and MAC address.
  • As soon as the sender device receives this ARP reply message, it updates its ARP cache with the new information (Receiver’s MAC address). Now the MAC address of the receiver is present in the ARP cache of the sender. The sender can send and receive data without any problem.

Message Format of ARP Protocol

Messages are sent to find the MAC address through ARP(address resolution protocol). These messages are broadcast to all the devices in the LAN. The format of this message is being shown in the diagram below :

ARP-Message-Format-GFG

Message format of ARP

All the fields given in ARP message format are being explained in detail below:-

  • Hardware Type: The size of this field is 2 bytes. This field defines what type of Hardware is used to transmit the message. The most common Hardware type is Ethernet. The value of Ethernet is 1.
  • Protocol Type: This field tells which protocol has been used to transmit the message. substantially the value of this field is 2048 which indicates IPv4.
  • Hardware Address Length: It shows the length of the tackle address in bytes. The size of Ethernet MAC address is 6 bytes.
  • Protocol Address Length: It shows the size of the IP address in bytes. The size of IP address is 4 bytes.
  • OP law: This field tells the type of message. If the value of this field is 1 also it’s a request message and if the value of this field is 2 also it’s a reply message.
  • Sender Hardware Address: This field contains the MAC address of the device transferring the message.
  • Sender Protocol Address: This field contains the IP address of the device transferring the message.
  • Target Hardware Address: This field is empty in the request message. This field contains the MAC address of the entering device.
  • Target Protocol Address: This field contains the IP address of the entering device.

Advantages of ARP Protocol

There are many Advantages of ARP protocol but below we have told you about some important advantages.

  • By using this protocol we can easily find out the MAC Address of the device.
  • There is no need to configure the end nodes at all to extract the MAC address through this protocol.
  • Through this protocol we can easily translate IP address into MAC Address.
  • There are four main types of this protocol. Which we can use in different ways, and they prove to be very helpful.

FAQs On ARP Protocol

Q.1: What’s ARP protocol?

Answer:

The ARP protocol is a network dispatches(communication) protocol that establishes a mapping between IP addresses and MAC addresses. This allows one device to know the MAC address of another device when it wants to communicate with the other device. The ARP protocol works on a Local area network( LAN).

Q.2: What’s ARP Cache?

Answer:

ARP Cache is a table in a device’s memory where the mapping of IP addresses and their corresponding MAC addresses is stored. This device can rapidly find out the MAC address for communication, without which ARP requests don’t have to be transferred every time. The entry in ARP Cache remains valid for a limited time and is refreshed from time to time.

Q.3: What’s ARP Poisoning and what are its consequences?

Answer:

ARP Poisoning is a cyber attack methodology where an attacker can change the MAC address mapping of other bias by transferring fake ARP packets in the network. With this the attacker can block network congestion and steal sensitive information. This affects network security and network head (directors) must remain watchful to help(prevent) similar damage.



Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads