What Does ARP Do and How Does It Work?

Published by: Alex George on December 31, 2024

CoreNetworkZ Tech Solutions has years of experience in configuring and troubleshooting computer networks. We also trained hundreds of network engineers and technicians. Today, I explain one of the critical network protocols, ARP.

Address Resolution Protocol (ARP) finds the Physical address(MAC Address) of a network host from the IP address of that host. Let me explain the workings of ARP in simple terms. Suppose we have two devices (A and B).

A must know B's IP and MAC addresses to send data. How will A get them?


Address Resolution Protocol (ARP) will find the MAC address of the destination device.


If the destination device does not have the MAC address of the destination device, it sends an ARP broadcast to find the MAC address of the network host that belongs to the IP address.



The device having the IP address(destination device) will respond to the source device with its MAC address. The source device will update the ARP cache with the newly found MAC address of the destination device.

ARP cache stores the MAC address of the other network devices for future use and periodically undergoes flushing to avoid obsolete entries.

You learned how ARP helps to get the physical addresses of remote devices. ARP stores all these MAC addresses in the ARP cache on your PC. We can print the ARP cache and check them. Let us check how to do it.




How to Display ARP cache On A Computer?

Abdul Shameem asked me in the comment section to explain the procedure for viewing the ARP cache.

Follow the steps below to view the MAC address entries stored in the ARP(Address Resolution Protocol) cache.


  1. Start Command Prompt (Type Command Prompt on Windows Search and open it).

  2. Type arp -a to display current ARP entries on your computer.

    Table of ARP Cache on My Computer

    Another command to print the ARP cache is arp -g.



You can find the Physical addresses of destination devices with IP addresses in the table.


Dynamic APR entries are automatic, but the static types are manual.


Static ARP entries remain on the ARP cache on your computer until you reboot the system. Now, we check some necessary ARP commands that will help you.


Important ARP Commands

Lakshmi Ajith, one of our readers, asked me for a list of ARP commands for her System Admin job interview preparation. I suggest Lakshmi study the following commands.

  1. arp -v -This APR command shows current ARP entries in verbose mode.

  2. arp -d - It deletes a particular ARP entry specified by the IP address from the ARP cache.

  3. arp -s - It adds a host to the APR cache with MAC address and IP address. ARP entries added to the ARP cache by this command are permanent( remain until you reboot your computer).



How to Add a Static Entry in ARP Cache?

Tijo C Mathew asked me if he can add a static entry. Yes, he can and let me explain how.

To add a static entry in the ARP cache, you can use the command arp -s. The format is:



arp -s 224.0.0.22 01-00-5e-00-00-16


Reference and Further Readings

I suggest you read the following tutorials to learn more about this protocol.

  1. Flushing ARP Cache To Fix Destination Host Unreachable Error
  2. https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/ipaddr_arp/configuration/xe-3s/arp-xe-3s-book/arp-config-arp.pdf

8 comments:

  1. Thanks. You explained ARP in very simple language.

    ReplyDelete
  2. Fahadh11:27 AM

    A good article. Thank you Alex George.

    ReplyDelete
  3. Abdul Shameem2:03 AM

    Hi Alex,

    It is a good article. I have a doubt how do I print ARP cache on Command Line?

    ReplyDelete
    Replies
    1. Welcome to CoreNetworkZ, Abdul Shammem,

      I have added the procedure for printing the ARP cache on DOS.

      Delete
  4. Lakshmi Ajith2:09 AM

    Hello Alex,

    Which are the important ARP commands to study for a system admin interview?

    ReplyDelete
    Replies
    1. Hello Lakshmi,

      I have added a list of ARP comments in the tutorial.

      Delete
  5. Tijo C Mathew2:15 AM

    Can I add a static entry in the ARP table?

    ReplyDelete

Newer Post Older Post Home