What protocol is responsible for translating link layer addresses to network layer addresses?

Most of the computer programs/applications use logical address (IP address) to send/receive messages, however, the actual communication happens over the physical address (MAC address) i.e from layer 2 of the OSI model. So our mission is to get the destination MAC address which helps in communicating with other devices. This is where ARP comes into the picture, its functionality is to translate IP address to physical addresses. 
 

What protocol is responsible for translating link layer addresses to network layer addresses?

The acronym ARP stands for Address Resolution Protocol which is one of the most important protocols of the Network layer in the OSI model. 
Note: ARP finds the hardware address, also known as Media Access Control (MAC) address, of a host from its known IP address. 
 

What protocol is responsible for translating link layer addresses to network layer addresses?

Let’s look at how ARP works. 

Imagine a device that wants to communicate with the other over the internet. What ARP does? Does it broadcast a packet to all the devices of the source network. 
The devices of the network peel the header of the data link layer from the protocol data unit (PDU) called frame and transfer the packet to the network layer (layer 3 of OSI) where the network ID of the packet is validated with the destination IP’s network ID of the packet and if it’s equal then it responds to the source with the MAC address of the destination, else the packet reaches the gateway of the network and broadcasts packet to the devices it is connected with and validates their network ID 

The above process continues till the second last network device in the path reaches the destination where it gets validated and ARP, in turn, responds with the destination MAC address. 
 

ARP: ARP stands for(Address Resolution Protocol). It is responsible to find the hardware address of a host from a known IP address. There are three basic ARP terms.
The important terms associated with ARP are: 

(i) Reverse ARP

(ii) Proxy ARP

(iii) Inverse ARP
 

  1. ARP Cache: After resolving the MAC address, the ARP sends it to the source where it is stored in a table for future reference. The subsequent communications can use the MAC address from the table
  2. ARP Cache Timeout: It indicates the time for which the MAC address in the ARP cache can reside
  3. ARP request: This is nothing but broadcasting a packet over the network to validate whether we came across the destination MAC address or not. 
    1. The physical address of the sender.
    2. The IP address of the sender.
    3. The physical address of the receiver is FF:FF:FF:FF:FF:FF or 1’s.
    4. The IP address of the receiver
  4. ARP response/reply: It is the MAC address response that the source receives from the destination which aids in further communication of the data. 
     
  • CASE-1: The sender is a host and wants to send a packet to another host on the same network.
    • Use ARP to find another host’s physical address
  • CASE-2: The sender is a host and wants to send a packet to another host on another network. 
    • The sender looks at its routing table.
    • Find the IP address of the next-hop (router) for this destination.
    • Use ARP to find the router’s physical address
  • CASE-3: the sender is a router and received a datagram destined for a host on another network. 
    • The router checks its routing table.
    • Find the IP address of the next router.
    • Use ARP to find the next router’s physical address.
  • CASE-4: The sender is a router that has received a datagram destined for a host in the same network. 
    • Use ARP to find this host’s physical address.

NOTE: An ARP request is a broadcast, and an ARP response is a Unicast. 

Test Yourself : 

What protocol is responsible for translating link layer addresses to network layer addresses?

Connect two PC, say A and B with a cross cable. Now you can see the working of ARP by typing these commands: 
 

1. A > arp -a

There will be no entry at the table because they never communicated with each other. 
 

What protocol is responsible for translating link layer addresses to network layer addresses?

2. A > ping 192.168.1.2 IP address of destination is 192.168.1.2 Reply comes from destination but one packet is lost because of ARP processing.

What protocol is responsible for translating link layer addresses to network layer addresses?

Now, entries of the ARP table can be seen by typing the command. 
This is how ARP table looks like: 
 

What protocol is responsible for translating link layer addresses to network layer addresses?

This article is contributed by Vivek Reddy. If you like GeeksforGeeks and would like to contribute, you can also write an article using write.geeksforgeeks.org or mail your article to . See your article appearing on the GeeksforGeeks main page and help other Geeks. 

Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.
 

Address Resolution Protocol As previously mentioned, ARP is used to translate between Internet layer addresses (IP addresses) and Link layer addresses (MAC addresses).

Which protocol is network layer protocol?

The most significant protocol at layer 3 (also called the network layer) is the Internet Protocol, or IP. IP is the standard for routing packets across interconnected networks--hence, the name internet.
Point to Point Protocol (PPP) – PPP is a protocol that is basically used to provide same functionality as SLIP. It is most robust protocol that is used to transport other types of packets also along with IP Packets.

Which protocol helps IP to get the network layer address for host?

ARP Protocol The Address Resolution Protocol (ARP) conceptually exists between the data-link and Internet layers. ARP assists IP in directing datagrams to the appropriate receiving host by mapping Ethernet addresses (48 bits long) to known IP addresses (32 bits long).