TechKnowSurge
Cisco CCNA 5.1 Cisco CCNA 1.13 Cisco CCNA 5.7 Cisco CCNA 4.3
VideoNetworkFree

Dynamic ARP Inspection (DAI)

IPv4's reliance on ARP introduces serious network vulnerabilities, including ARP spoofing, ARP poisoning, and MAC address spoofing, all of which can be mitigated through Dynamic ARP Inspection (DAI).

Complete this video to capture a CTF flag worth 1 point.

About this video

ARP operates at the intersection of Layer 2 and Layer 3 networking, enabling devices to resolve known IP addresses into the MAC addresses required for frame delivery across a local network segment. When a device needs to communicate with another host, it broadcasts an ARP request to identify the correct MAC address, then caches the response for future use. Because ARP has no authentication mechanism, this process is inherently vulnerable to manipulation by any device on the same network segment. Attackers exploit this weakness through ARP spoofing, where falsified ARP replies are sent to redirect traffic through a malicious device, and ARP poisoning, where those false replies corrupt the ARP caches of multiple hosts simultaneously, often through unsolicited gratuitous ARP broadcasts. Both techniques can enable man-in-the-middle attacks or denial-of-service conditions. MAC address spoofing is closely related, involving the direct modification of a device's hardware address to impersonate another host, producing much the same result on the network. These attacks are technically straightforward to execute and highly effective against unprotected environments. Dynamic ARP Inspection (DAI) is the primary control mechanism for defending against these threats. DAI works in conjunction with DHCP snooping, using the DHCP snooping binding database, which records the IP address, MAC address, and switch port of each network device, to validate incoming ARP messages on untrusted ports. If an ARP reply's claimed IP-to-MAC mapping does not match the binding database, DAI drops the frame. For devices using statically assigned addresses, access control lists can be configured to supplement the binding table. Enabling DAI requires activating DHCP snooping globally, applying both DHCP snooping and DAI to the relevant VLANs, and designating trusted ports such as uplinks, providing a robust and manageable layer of protection against ARP-based attacks.

What you'll learn

What's covered

ARP & Dynamic ARP Inspection

Aligned to

Cisco CCNA
5.1 Define key security concepts
1.13 Describe switching concepts
5.7 Configure and verify Layer 2 security features
4.3 Explain the role of DHCP and DNS within the network

Key terms

Address Resolution Protocol
ARP
A protocol used to map an IP address to a physical MAC address on a local network.
Media Access Control
MAC
A sublayer of the Data Link layer that controls how devices on a network gain access to a medium and transmit data.
Man-in-the-Middle Attack
MitM
An attack where an adversary secretly intercepts and potentially alters communications between two parties.
Denial of Service
DoS
An attack that floods a system or network with traffic to make it unavailable to legitimate users.
Spoofing
An attack where an adversary impersonates a trusted entity by falsifying data such as an IP address or email address.
Dynamic Host Configuration Protocol
DHCP
A network protocol that automatically assigns IP addresses and other configuration parameters to devices on a network.
ARP Spoofing
An attack technique in which a threat actor sends forged ARP reply messages to associate their MAC address with a legitimate IP address, redirecting traffic to their device.
ARP Poisoning
The result of ARP spoofing in which the ARP caches of devices on a network are corrupted with false IP-to-MAC address mappings, causing traffic to be misdirected.
Dynamic ARP Inspection
DAI
A security feature on managed switches that validates ARP messages against the DHCP snooping binding database, dropping packets with invalid IP-to-MAC address mappings.
DHCP Snooping
A switch security feature that classifies ports as trusted (connected to legitimate DHCP servers) or untrusted (connected to end devices) and drops DHCP server responses received on untrusted ports. It builds a binding database of valid IP-to-MAC-to-port mappings used by other Layer 2 security features like Dynamic ARP Inspection.

Topics

Network Security Dynamic Arp Inspection Arp Spoofing Dhcp Snooping Layer 2 Security Man In The Middle Attacks

Transcript

The ARP Process

From a layer 2 perspective, IPv4 relies heavily on address resolution protocol, or ARP. ARP has some inherent flaws in it that allow an attacker to be able to launch an attack against the network.

When a machine is connecting to another resource on the network, it is probably connecting to, or knows of, the IP address that it's trying to connect to. Or you're trying to connect to some sort of name, in which case it does a DNS resolution to come up with an IP address. But in either case we're communicating via IP to another device on the network. The thing is, we're in a layer 2 network, and so now what we have to do is translate from that IP address and find out what the MAC address is.

When this demo laptop sends out a message on the network, it will ask, and it will do an address resolution protocol, to find out what that MAC address is for 10.1.10.21, and it will send this out. It'll be a broadcast that's sent out across the network, and then this device will reply back with the MAC address that is for that machine. And so that way the demo laptop can send that message out with the correct MAC address, and the switches will know how to forward that to get to its final destination.

The problem is that ARP is not secure in any way. So anyone can listen in on these conversations, or even worse yet, can insert a reply back that is not correct.

ARP Spoofing and ARP Poisoning

An attacker can use ARP spoofing and ARP poisoning in order to insert themselves in the middle of this conversation. So the attacker will conduct a denial of service attack or a man in the middle attack by sending ARP replies out to the different hosts.

I'm going to use a specific example to show you how this process works. So this demo laptop needs to get to the outside world. It needs to get to maybe a web server that's inside the cloud, so it knows that it's going to need to reach out to its default gateway. In this case the default gateway is this layer 3 switch right here. And so what it's going to do is, it knows the IP address of its default gateway, it's 10.1.10.1. So what it's going to do is send out an ARP request to find out what is the MAC address that belongs to 10.1.10.1. And of course, in a regular functioning network, this layer 3 switch will reply back with its own MAC address, and then this demo laptop would put that in its caching table.

But what an attacker can do on this network is it can reply to the same message and give its own MAC address — the attacker's machine can be given to this demo laptop. And so now it's got an incorrect MAC address set up in its cache, and so now this machine will send off this packet that's supposed to be destined to somewhere out in the internet, and it's going to send it to this attacker. And this attacker then has that information and can conduct a man in the middle attack.

So that's just one example, and there's many different examples, but this is where this attacker is spoofing an ARP reply. And so that's where ARP spoofing comes in: it's spoofing an ARP reply to send back to the machines on this network.

There are other ways to do the same thing. This attacker could actually broadcast out an ARP reply to all of the machines. This is called a gratuitous ARP, one that's not requested but is sent out to all the devices on the network. And then all of the devices on the network will poison their cache. That's what cache poisoning is: all of the cache on these devices on that network will have the wrong MAC address, and so they'll all send their frames to this attacker device, who's acting as the default gateway.

So really, when we talk about ARP spoofing and ARP poisoning, they're really very similar, or describing a couple different aspects of this type of attack. The ARP spoofing is the act of spoofing an ARP reply, versus the ARP poisoning is poisoning the cache that sits on every single machine on that network. So that's the difference between the two. They're just two different aspects to this type of attack.

Mitigations and MAC Address Spoofing

There are a lot of different tools that can be used to carry out this type of attack. It's a very simplistic attack really, but very effective.

So some ways to mitigate this. Number one, we've learned about port security, and we can limit the number of MAC addresses; that potentially could eliminate some of the risk that's involved with this. Or even if you have statically assigned MAC addresses on your switch, which could be very troublesome trying to work with, it could be very problematic from a management standpoint. So we also have dynamic ARP inspection, which really attacks the heart of this issue and is the real resolution for mitigating this issue.

Then we have MAC address spoofing. MAC address spoofing is when you change the MAC address on the computer, versus ARP spoofing is when you're mimicking an ARP reply from a different MAC address. But essentially they have the same effect on the network, and essentially they can be really the same thing. And so MAC address spoofing and ARP spoofing are very close if not the same thing. There's quite a bit of overlap between those two.

Dynamic ARP Inspection

So the resolution for these is dynamic ARP inspection. Dynamic ARP inspection takes a look at the ARP messages and makes sure that the ARP messages are legitimate messages. And it's very similar to DHCP snooping — in fact, you have to have DHCP snooping turned on in order to use dynamic ARP inspection. So let's take a look at dynamic ARP inspection and see what some of the rules are and how we can set this up on our devices.

Now a big part of this is it uses the DHCP snooping binding database. That's why you have to have the DHCP snooping turned on, because the DHCP snooping binding database records the IP address, the MAC address and the port numbers of devices on your network. And so it's going to use that information to make sure that the information coming across that specific port matches up with the MAC address and IP address that's inside that binding database.

Here's the process that dynamic ARP inspection does to know whether it's going to drop a frame or if it's going to forward the frame. And so first of all, what happens is when a frame comes into the switch on a particular port, it's going to first of all check that port to see if it's trusted. If it's trusted, then it's just going to send it — hey, it's a trusted port, so why not send it. If it's an untrusted port, then at that point in time it's going to look at that frame's source IP address and MAC address of that ARP reply, and then it's going to look it up to make sure it's legitimate. Is the IP address and MAC address that that machine is claiming inside the DHCP snooping binding table? And so if it is, then it can forward it, but if it isn't, then it could drop it.

It does check one more thing with it, and that is that not all devices on your network are necessarily going to get a DHCP address. So in those events we need some other way to be able to check that information. So we can actually manually configure what's called an ACL, an access control list, and apply it so that dynamic ARP inspection checks that as well. And then it will verify whether this is the legitimate ARP or is illegitimate, and it's going to drop it. So that's how dynamic ARP inspection works.

So when we go to enable dynamic ARP inspection, then what we're going to do is first of all we're going to enable DHCP from a global level. We have to enable DHCP snooping on the VLAN itself, and then we enable dynamic ARP inspection on the VLAN, and then we configure any trusted ports to it. So a fairly simple setup to set this up, and it will add quite a bit of protection to your network.

About TechKnowSurge

TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.

Explore free tools and programs →