What is ARP in Networking
What is ARP in Networking
by Matt McClure
Follow us
Published on November 13, 2023
Quick definition: ARP is a layer 2 network protocol that maps IP addresses to the
physical MAC addresses of devices on a network. It is essential for communication
within a local network, but security issues around vulnerabilities like ARP spoofing
must be addressed to maintain network security.
The internet is a big, complex place. So many technologies and protocols are
constantly firing off to move data across the globe. One of these essential protocols,
ARP, is critical to transport packets from source to destination and back. In this
article, we’ll delve into what ARP is, how it serves our networks, and some security
concerns to keep in mind.
What is ARP?
ARP (Address Resolution Protocol) maps IP addresses to the MAC addresses of
devices on your network. All network-connected devices have an IP address, either
assigned dynamically or set statically. IP addresses are essential to routing packets,
just like receiving mail at your street address.
However, data transmission on a local network relies on MAC addresses. These are
the unique, hard-coded addresses every ethernet and WiFi adapter gets at the
factory.
ARP bridges the gap between IP addresses and MAC addresses. ARP helps
devices look up the MAC address of a given IP address, ensuring packets have a
physical destination in the real world. We’ll continue to clarify this as we move on to
how ARP works.
Keep in mind that ARP is only relevant before packets are routed. For example,
suppose you need to connect to another computer on your local network within the
same subnet. In that case, ARP comes into play because the traffic isn’t routed to
another network.
If you go to a website online, you don’t need ARP to find the server’s MAC address
because the server isn’t on your local network. You do, however, need ARP to find
the MAC of your router to get out of your network and route your packets to the
internet. Check this article for a refresher on routing vs. switching.
The next step is the ARP reply, which goes like this:
1. Assuming the device with the IP in your broadcast is live, that device replies
to your device with its MAC address.
2. Your device caches the reply in its ARP cache.
3. Your device can then communicate with the device, sending the traffic as a
request to the newly acquired MAC address.
The ARP cache that each device maintains is an essential part of keeping the
network humming along efficiently. It lets devices store previously requested MAC
addresses, reducing the need to send a request and await a reply whenever they
need to communicate.
It is important to note that ARP cache entries do expire over time. The cache timeout
default varies by device and OS, typically between 1 and 20 minutes. After an entry
expires, the request and reply process must repeat.
This kind of exploit can be used for a number of different attacks, the most common
being a man-in-the-middle. In this attack, traffic bound for one destination goes to the
attacker instead. The attacker can then inspect the packets and steal any
unencrypted contents, including sensitive data, HTTP session info, or credentials.
Even without packet forwarding, an ARP spoof can cause chaos. An attacker can
simply return a non-existent MAC address to an ARP request, causing a denial-of-
service where the traffic goes nowhere.
ARP spoofing can be a huge problem with considerable consequences. There are a
few things you can do, though, to protect your networks:
Static ARP entries: Creating static ARP table entries for gateways and
essential servers will prevent the caching of spoofed ARP replies.
ARP spoofing detection tools: Network monitoring tools can monitor for and
alert on ARP spoofing on your network.
ARP security protocols: Some switches, like Dynamic ARP Inspection and
ARP Guard, support security protocols that can prevent ARP spoofing traffic.