menu
close

What Does ARP Do and How Does It Work?

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?

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

  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?

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