CCNA Layer 2 Security: DHCP Snooping, Dynamic ARP Inspection, Storm Control, RA Guard and Port Security
<p>Layer 2 security features are switch-port controls that stop attacks launched from inside a VLAN: DHCP snooping blocks rogue DHCP servers and starvation, dynamic ARP inspection blocks ARP spoofing, storm control limits traffic floods, IPv6 RA guard blocks rogue router advertisements, and port security limits which MAC addresses may use a port. This lesson covers the CCNA 200-301 v2.0 exam topic on configuring Layer 2 security features: how each one decides what to drop, the commands that enable and tune it, the defaults that catch people out, how to read its show output, and how to recover the err-disabled ports these features create.</p>
On this page10 sections
- Which Layer 2 attack does each feature stop?
- DHCP snooping: trusted and untrusted ports
- DHCP snooping rate limits, starvation and option 82
- Dynamic ARP inspection: validating ARP against bindings
- ARP ACLs and extra DAI validation for static-IP hosts
- Storm control: thresholds, rising and falling levels, actions
- IPv6 RA guard and DHCPv6 guard
- Port security: limits, defaults and violation modes
- Sticky learning, aging and secure-address moves
- Err-disabled ports and recovery
- Match each Layer 2 attack (rogue DHCP server, starvation, ARP spoofing, storms, rogue IPv6 router, MAC flooding) to the feature that stops it
- Configure DHCP snooping with global and per-VLAN enablement, trusted ports, rate limits and the right option 82 behaviour
- Configure dynamic ARP inspection, including trust between switches, ARP ACLs for static hosts and the rate limit
- Configure storm control thresholds and actions, and RA guard policies with the correct device role per port
- Configure port security maximums, violation modes, sticky learning and aging, and predict what happens on a violation
- Diagnose err-disabled ports from show output and recover them manually or with errdisable recovery
Which Layer 2 attack does each feature stop?
Each CCNA Layer 2 security feature answers one specific attack that happens inside a VLAN, before traffic ever reaches a router or firewall: DHCP snooping stops rogue DHCP servers and DHCP starvation, dynamic ARP inspection (DAI) stops ARP spoofing, storm control stops traffic floods, RA guard stops rogue IPv6 routers, and port security stops MAC flooding and unauthorised devices. Matching the attack to the control is the first skill; a feature that inspects the wrong protocol does nothing for the attack, however strict it is.
| Attack or fault | What happens | Control | What the control inspects |
|---|---|---|---|
| Rogue DHCP server (often a home router plugged into a desk port) | Clients take a wrong address, gateway or DNS server | DHCP snooping | DHCP server messages arriving on untrusted ports |
| DHCP starvation | Forged DISCOVERs with random client hardware addresses empty the pool | DHCP snooping MAC verification and rate limiting | The chaddr field against the source MAC; DHCP packets per second |
| ARP spoofing / ARP poisoning | An attacker claims the gateway's IP address and intercepts traffic | Dynamic ARP inspection | The sender IP and MAC pair in ARP requests and replies |
| Broadcast, multicast or unicast storm | A loop or faulty NIC floods frames and slows the whole VLAN | Storm control | Traffic level per type against a threshold |
| Rogue IPv6 router | A host sends router advertisements and becomes the SLAAC gateway | IPv6 RA guard | ICMPv6 router advertisements and redirects on host ports |
| MAC flooding (CAM table overflow) | The MAC table fills, so the switch floods unicast frames everywhere and the attacker captures them | Port security | The number and identity of source MAC addresses on a port |
| Unauthorised device on a desk port | An unknown PC or switch is connected | Port security | Source MAC addresses against the secure set |
The features are built to work together. DHCP snooping builds the binding table that DAI relies on, and all of them are applied on access-layer switches, where hosts connect. They are configured with Cisco IOS commands on Catalyst switches; the command forms in this lesson follow Catalyst IOS and IOS XE.
DHCP snooping: trusted and untrusted ports
DHCP snooping classifies every switch port as trusted or untrusted and drops DHCP server messages that arrive on untrusted ports, so only the port that leads to the real DHCP server (an uplink, or the server's own port) can deliver offers and acknowledgements. Once snooping is active for a VLAN, every port in it is untrusted by default; you trust only the ports toward legitimate servers.
| Message direction | Examples | On an untrusted port |
|---|---|---|
| Client to server | DHCPDISCOVER, DHCPREQUEST, DHCPINFORM, DHCPRELEASE, DHCPDECLINE | Allowed (after the checks below), because clients belong on untrusted ports |
| Server to client | DHCPOFFER, DHCPACK, DHCPNAK | Dropped: a server should never sit behind a host port |
Trusting the wrong ports reverses the protection: if every desk port is trusted, a home router on any of them can answer clients again. Snooping also runs these checks on untrusted ports:
- MAC address verification (on by default): the Ethernet source MAC must match the client hardware address (chaddr) inside the DHCP packet.
- A DHCPRELEASE or DHCPDECLINE must arrive on the same port as the binding it refers to, so one host cannot release another host's lease.
- A packet that already carries relay-agent information (option 82), or a non-zero relay agent address (giaddr), is dropped, since a client should never send either.
Enabling it takes two commands
DHCP snooping needs both a global switch and a per-VLAN list. ip dhcp snooping turns the feature on; ip dhcp snooping vlan 10 names the VLANs it inspects. With only one of them, nothing is filtered and the trust settings have no effect.
ip dhcp snooping
ip dhcp snooping vlan 10,20
!
interface GigabitEthernet1/0/48
description Uplink toward the DHCP server
ip dhcp snooping trust
show ip dhcp snooping separates the two conditions. It prints whether "Switch DHCP snooping is enabled" or disabled, then the VLANs on which snooping is configured and the VLANs on which it is operational. A VLAN that is configured but not operational usually means the global command is missing (or the VLAN does not exist or is not active on the switch); a VLAN that is missing from both lists needs ip dhcp snooping vlan. The same output lists trusted interfaces and their rate limits.
DHCP snooping rate limits, starvation and option 82
Beyond trust, DHCP snooping protects the DHCP pool with MAC verification and a per-port rate limit, and it inserts option 82 into client requests, which sometimes needs adjusting so a DHCP server accepts them.
Starvation and the two controls that stop it
A DHCP starvation tool sends thousands of DHCPDISCOVERs, each with a different client hardware address (chaddr), until the server has no addresses left. If the tool keeps one real Ethernet source MAC and only changes chaddr, port security never triggers, because port security counts source MAC addresses in the Ethernet header. Two DHCP snooping capabilities each stop the attack:
- MAC address verification (
ip dhcp snooping verify mac-address, enabled by default) drops every packet whose chaddr differs from the source MAC. - Rate limiting:
ip dhcp snooping limit rate 10on an untrusted interface sets how many DHCP packets per second it accepts. Exceeding the limit error-disables the port with causedhcp-rate-limit; it does not merely drop the excess. There is no limit by default.
Size the limit for what the port carries. A desk port needs only a few packets per second, but an untrusted trunk to a downstream switch carries the combined burst of every client behind it, for example when every client on the floor renews at the same moment. A limit that suits one host error-disables such a trunk and cuts off everyone; raise the value on that interface rather than remove the limit. Trusted ports are normally left without a limit.
Option 82 insertion
When snooping is enabled, a Catalyst switch by default inserts DHCP option 82 (relay agent information: which switch and port the request came from) into client requests. Because it is a Layer 2 switch and not a relay, it leaves the relay agent address (giaddr) as 0.0.0.0. Two consequences appear in practice:
| Situation | Symptom | Fix |
|---|---|---|
| A Cisco IOS router is the DHCP server on the same subnet, with no relay between | The server sees option 82 with a zero giaddr, treats it as inconsistent and drops the request; clients get no address | On the switch, no ip dhcp snooping information option stops insertion and keeps all other snooping checks. Alternatively, on the router, ip dhcp relay information trusted on the interface (or ip dhcp relay information trust-all) accepts it, if the router may be changed. |
| Access switches insert option 82 and forward requests to an aggregation switch that also runs snooping, with its downlinks untrusted | The aggregation switch drops the requests, because option 82 arriving on an untrusted port looks forged | On the aggregation switch, ip dhcp snooping information option allow-untrusted accepts those packets while the downlinks stay untrusted and still drop server messages. Trusting the downlinks also works but gives up that filtering. |
If the DHCP server assigns addresses based on option 82, keep insertion on at the access layer and fix the receiving device instead.
The binding table
For every DHCP exchange it sees complete on an untrusted port, DHCP snooping records a binding: MAC address, leased IP address, lease time, VLAN and interface. show ip dhcp snooping binding lists them. The table is held in memory; ip dhcp snooping database (a database agent, such as a flash file or TFTP server) saves it so bindings survive a reload. The agent only preserves bindings; it never creates them. A binding is removed when the lease expires or the client releases it.
Dynamic ARP inspection: validating ARP against bindings
Dynamic ARP inspection intercepts ARP requests and replies on untrusted ports and forwards them only if the sender IP address and sender MAC address match a valid IP-to-MAC binding for that port and VLAN; anything else is dropped and logged. That stops ARP spoofing, where an attacker announces that the gateway's IP address belongs to the attacker's MAC.
ip dhcp snooping
ip dhcp snooping vlan 10
ip arp inspection vlan 10
!
interface GigabitEthernet1/0/48
ip dhcp snooping trust
ip arp inspection trust
Where the bindings come from
DAI takes its bindings from the DHCP snooping binding table (and from ARP ACLs, covered next). Several behaviours follow from that:
- Bindings exist only for DHCP exchanges the switch observed. Turning on DAI in a VLAN whose hosts got their leases before snooping was enabled leaves those hosts with no binding, so DAI drops their ARP and they lose the gateway; any host that completes a fresh DHCP exchange gets a binding and is unaffected. Making the hosts renew (for example
ipconfig /renew, or bouncing their ports) creates the bindings. Enable snooping first and let bindings build before enabling DAI. - A matching MAC alone is not enough. If a user changes a DHCP-leased PC to a static address, its ARP now carries a pair (new IP, same MAC) that matches no binding, and it is dropped even though the old lease has not expired.
- An invalid ARP packet is dropped and logged; validation failures do not error-disable the port. Only the rate limit does that.
Trust for DAI is separate from trust for DHCP snooping
ip arp inspection trust and ip dhcp snooping trust are independent settings; trusting a port for one does nothing for the other. Every port is untrusted for DAI by default. Trust the ports toward the router or the next switch, never host ports.
Between two switches that both run DAI, trust the inter-switch link. Each switch holds bindings only for hosts on its own access ports, so a switch that treats the link as untrusted checks the neighbour's hosts against its own table, finds nothing, and drops their ARP. Because both switches validate ARP where it enters the network, trusting the link loses nothing. If the neighbour does not run DAI, leave the link untrusted (and use ARP ACLs for any hosts behind it).
Rate limit
DAI applies a rate limit to protect the switch CPU: 15 ARP packets per second by default on untrusted ports, and no limit on trusted ports. Exceeding it error-disables the port with cause arp-inspection, logged as %SW_DAI-4-PACKET_RATE_EXCEEDED followed by an err-disable message. A legitimate host that sends a lot of ARP, such as a network scanner, needs a higher limit on its port, for example ip arp inspection limit rate 40, which keeps the port untrusted and still validated. Trusting the port also stops the shutdowns but removes validation.
ARP ACLs and extra DAI validation for static-IP hosts
A host with a statically configured address never runs DHCP, so it has no binding and DAI drops its ARP; an ARP ACL gives DAI an explicit permitted IP-to-MAC pair for such hosts while their ports stay untrusted and validated.
arp access-list STATIC-HOSTS
permit ip host 192.168.30.20 mac host 00aa.bb01.0c22
!
ip arp inspection filter STATIC-HOSTS vlan 30
DAI checks ARP ACLs first. A packet permitted by the ACL is forwarded; a packet that matches no entry falls through to the DHCP snooping binding check, which is why an ACL for one printer does not affect DHCP clients in the VLAN.
| Applied as | Packet matching no ACL entry | Effect on DHCP clients |
|---|---|---|
ip arp inspection filter NAME vlan 10 | Checked against the DHCP snooping bindings | Unchanged: they keep working |
ip arp inspection filter NAME vlan 10 static | Denied: the ACL's implicit deny becomes an explicit deny and bindings are not consulted | Their ARP is dropped unless the ACL lists every host |
Use static only for a VLAN whose hosts are all listed in the ACL. Trusting the static host's port is the alternative to an ACL, but it removes ARP validation on that port.
Optional extra checks
ip arp inspection validate {src-mac | dst-mac | ip} adds checks beyond the binding match: src-mac compares the Ethernet source MAC with the ARP sender MAC, dst-mac compares the Ethernet destination MAC with the ARP target MAC in replies, and ip rejects invalid or unexpected addresses such as 0.0.0.0, 255.255.255.255 and multicast addresses. They make DAI stricter; they never cause a packet that failed the binding check to pass. Use show ip arp inspection (per-VLAN statistics and drops) and show ip arp inspection interfaces (trust state and rate limit) to verify.
Storm control: thresholds, rising and falling levels, actions
Storm control measures broadcast, multicast or unicast traffic arriving on a port over one-second intervals and, when a traffic type exceeds its configured threshold, blocks that type of traffic until it falls back below the threshold. It limits the damage of a loop or a faulty NIC; it does not look at addresses or protocols.
interface GigabitEthernet1/0/15
storm-control broadcast level 10.00 5.00
storm-control multicast level 20.00
- Each traffic type has its own counter. Frames to
FFFF.FFFF.FFFFcount as broadcast, so a broadcast storm needsstorm-control broadcast; a multicast threshold would not see it. - The level is a percentage of the port's bandwidth (it can also be given in bits or packets per second with
level bpsorlevel pps). - The first value is the rising threshold and the optional second value the falling threshold. Once traffic exceeds the rising level, the port blocks that type until traffic drops below the falling level, not merely below the rising one. With no falling value, it equals the rising value.
| Action | When the threshold is exceeded | Port state |
|---|---|---|
| None configured (default: filter) | Drops the excess traffic of that type; other traffic keeps flowing | Stays up |
storm-control action shutdown | Stops all traffic on the port | Error-disabled (cause storm-control) |
storm-control action trap | Sends an SNMP trap; traffic is filtered as by default | Stays up |
A port shut down by storm control stays error-disabled until someone bounces it, unless errdisable recovery cause storm-control is configured. Storm control limits traffic volume; it does not cap how many MAC addresses a port learns, which is port security's job. Verify with show storm-control.
IPv6 RA guard and DHCPv6 guard
IPv6 RA guard drops ICMPv6 router advertisements (and redirects) that arrive on ports facing hosts, so a device that is not a router cannot announce itself as the default gateway. With SLAAC, hosts take their default router, and often their prefix, from router advertisements, so a laptop running router-advertisement software can otherwise become the gateway for the whole VLAN and intercept its traffic.
ipv6 nd raguard policy HOSTS
device-role host
!
ipv6 nd raguard policy UPLINK
device-role router
!
interface range GigabitEthernet1/0/1 - 47
ipv6 nd raguard attach-policy HOSTS
interface GigabitEthernet1/0/48
ipv6 nd raguard attach-policy UPLINK
The policy's device-role decides what the port may send. A host role (the default) blocks inbound router advertisements and redirects; a router role allows them. Attach the host policy only to host ports. Attaching it to the port that faces the legitimate router as well (an easy mistake with interface range) drops the real router's advertisements, and hosts lose their IPv6 default gateway. Changing the policy to router on every port removes the protection instead.
RA guard does not cover DHCPv6
RA guard inspects router advertisements only. Addresses or options that hosts get from DHCPv6, such as a DNS server from stateless DHCPv6 (signalled by the RA's O flag), come in DHCPv6 server messages that RA guard never examines. DHCPv6 guard is the matching control: a policy with device-role client (the default) attached to access ports drops DHCPv6 server replies arriving there, and the port toward the real server gets device-role server.
ipv6 dhcp guard policy CLIENTS
device-role client
!
interface GigabitEthernet1/0/14
ipv6 dhcp guard attach-policy CLIENTS
| Feature | Protocol inspected | Stops |
|---|---|---|
| IPv4 DHCP snooping | DHCPv4 | Rogue IPv4 DHCP servers, starvation |
| Dynamic ARP inspection | ARP (IPv4) | ARP spoofing |
| IPv6 RA guard | ICMPv6 router advertisements and redirects | Rogue IPv6 routers and SLAAC prefixes |
| DHCPv6 guard | DHCPv6 server messages | Rogue DHCPv6 servers (addresses, DNS servers) |
The IPv4 features do nothing for IPv6: DHCP snooping does not filter DHCPv6, and DAI does not inspect IPv6 neighbor discovery.
Port security: limits, defaults and violation modes
Port security limits which and how many source MAC addresses may send frames into a switch port and acts when a frame from any other address arrives; it is the defence against MAC flooding and against unauthorised devices on desk ports.
Prerequisite: a static port mode
Port security works only on a port in static access or static trunk mode. A Catalyst port left in its default dynamic (DTP) mode rejects the command with a message such as "Command rejected: ... is a dynamic port". Enter switchport mode access first; assigning an access VLAN or enabling PortFast does not change the mode.
interface GigabitEthernet1/0/6
switchport mode access
switchport access vlan 10
switchport port-security
switchport port-security maximum 2
switchport port-security violation restrict
switchport port-security mac-address sticky
Defaults
switchport port-security with nothing else enables the feature with its defaults: a maximum of one secure MAC address, violation mode shutdown, and no aging (aging time 0). The first address heard is learned dynamically as the secure address. A second device, for example behind a small unmanaged switch on a desk port, then error-disables the whole port, so the first device loses connectivity too.
Violation modes
| Mode | Frames from violating address | Syslog and SNMP trap | Violation counter | Port |
|---|---|---|---|---|
protect | Dropped | No | Not incremented | Stays up; secure addresses keep working |
restrict | Dropped | Yes | Incremented | Stays up; secure addresses keep working |
shutdown (default) | Dropped | Yes | Incremented | Error-disabled: all traffic stops |
shutdown vlan (platform-dependent) | Dropped | Yes | Incremented | Only the violating VLAN is error-disabled on that port |
Protect is the silent mode: a device is blocked but nothing is logged and show port-security interface shows a violation count of 0, which is why protect mode is hard to troubleshoot: the device simply gets no service and there is no trace of why. Choose restrict when the port must stay up and violations must be visible.
Phones and the maximum
With a Cisco IP phone and a PC on one port (access VLAN plus voice VLAN), the phone's MAC address, learned in the voice VLAN, counts toward the port-security maximum. The default maximum of one is therefore used up by the phone, and the PC triggers a violation. Size the maximum to the phone plus the devices allowed behind it: with the phone learned only in the voice VLAN and one PC, switchport port-security maximum 2 admits both and still treats a third device as a violation. (Some platforms also allow a per-VLAN maximum, such as maximum 1 vlan voice.)
Sticky learning, aging and secure-address moves
Secure MAC addresses can be static (typed with switchport port-security mac-address H.H.H), dynamic (learned and kept only in the MAC table) or sticky; how they are stored decides what survives a reload, and the aging settings decide when a learned address is released for the next device.
Sticky addresses
switchport port-security mac-address sticky converts dynamically learned secure addresses into switchport port-security mac-address sticky H.H.H lines in the running configuration. They are not written to NVRAM until the configuration is saved (copy running-config startup-config). If the switch reloads before that, it boots without them and each port learns, and makes sticky, whichever device sends first; the original device can then cause a violation on its own port. Sticky learning changes how addresses are stored, not how many are allowed.
Aging
Secure addresses do not age out by default. Two interface commands control aging:
switchport port-security aging time Nsets the timer in minutes (0 disables aging), so a two-hour timer isaging time 120, not 7200.switchport port-security aging type {absolute | inactivity}. Absolute (the default) deletes the address a fixed time after it was learned, even if the device is still sending. Inactivity deletes it only after no traffic has come from it for the whole period, which suits hot desks.
The global mac address-table aging-time (in seconds) applies to ordinary dynamic MAC entries, not to secure addresses.
The second violation trigger: a secure address on another port
Port security raises a violation in two cases: when a port would exceed its maximum, and when a MAC address that is secure on one secure port appears on another secure port in the same VLAN. The address is not moved. Suppose a workstation's MAC is secure on Gi1/0/9 and Gi1/0/9 is still up. When that MAC appears on Gi1/0/12 in the same VLAN, the violation is raised on Gi1/0/12, the port where the address arrived, and it follows Gi1/0/12's own violation mode regardless of how many free secure slots that port has. Clear the old entry (for example clear port-security sticky interface gi1/0/9, or remove the sticky line) before moving the device.
Verifying
show port-security interface gi1/0/6 shows Port Status (Secure-up or Secure-shutdown), violation mode, aging time and type, maximum and total MAC addresses, sticky count and the security violation count. show port-security address lists secure addresses and their type, and show port-security summarises every port.
Err-disabled ports and recovery
Several Layer 2 security features protect the network by putting a port into the err-disabled state, which stops all traffic on it until the port is reset manually or by automatic error-disable recovery. Recognising the cause tells you which feature tripped.
| Cause name | Feature and trigger |
|---|---|
psecure-violation | Port security violation in shutdown mode |
dhcp-rate-limit | DHCP snooping rate limit exceeded |
arp-inspection | DAI rate limit exceeded |
storm-control | Storm-control threshold exceeded with action shutdown |
show interfaces status err-disabled lists err-disabled ports with their reason.
Manual recovery
Err-disabled is an operational state, not a configuration line. After removing the cause, enter shutdown then no shutdown on the interface; the port comes back at once and the configuration does not change. Removing port security or clearing sticky addresses changes the configuration and does not, by itself, lift the err-disabled state.
Automatic recovery
errdisable recovery cause psecure-violation
errdisable recovery cause arp-inspection
errdisable recovery interval 120
- Recovery is enabled per cause with
errdisable recovery cause; each cause above has its own keyword, and enabling one does nothing for the others. - One global timer applies to all causes:
errdisable recovery interval, in seconds, default 300 (5 minutes), accepted range 30 to 86400. A value below 30 is rejected. show errdisable recoverylists each cause as Enabled or Disabled and the timer interval.errdisable detect causeis a different command: it controls whether a cause shuts ports down at all (enabled by default), not whether they come back.
Automatic recovery only brings the port back; if the cause persists (a second device behind a phone, a rate limit set too low), the port fails again on the next violation. Fix the cause, for example by raising a maximum or a rate limit, rather than relying on recovery.
Tip. Questions on this topic are mostly scenarios, many with evidence in the stem: a configuration snippet, show ip dhcp snooping or show ip dhcp snooping binding output, show port-security interface output, show errdisable recovery output, or a syslog message about a rate limit or an err-disabled port. You are asked which feature stops a described attack, which command completes or fixes a configuration, what the switch does with a given frame or packet, why legitimate hosts broke after a feature was enabled, or which change meets a requirement such as keeping the port up, keeping validation, logging violations, not changing a device you do not manage, or recovering automatically after a set time. Wrong options are usually real commands from a neighbouring feature (a DAI command for a DHCP problem, DHCP snooping trust where DAI trust is needed), the right command with the wrong unit or value, or a change that works but breaks a stated constraint. Some items ask you to select two answers.
- DHCP snooping drops DHCP server messages (OFFER, ACK, NAK) on untrusted ports; every port is untrusted by default, so trust only the path to the real server.
- DHCP snooping needs both ip dhcp snooping (global) and ip dhcp snooping vlan; show ip dhcp snooping separates configured from operational VLANs.
- Starvation with forged chaddr values is stopped by DHCP snooping MAC verification and its rate limit, not by port security; exceeding the rate limit error-disables the port.
- Snooping inserts option 82 with giaddr 0.0.0.0: an IOS DHCP server drops it (fix with no ip dhcp snooping information option), and a downstream snooping switch drops it on untrusted ports (fix with allow-untrusted).
- DAI drops ARP whose sender IP and MAC pair matches no binding; bindings exist only for DHCP exchanges the switch saw, and static hosts need an ARP ACL (the static keyword makes its implicit deny final).
- DAI trust is separate from DHCP snooping trust; trust links between DAI switches. Untrusted ports allow 15 ARP packets per second by default before error-disabling.
- Storm control filters by default and stays up; the first level is rising and the second falling; action shutdown error-disables and action trap only notifies.
- RA guard with device-role host blocks RAs and redirects on host ports; the router-facing port needs a router role; DHCPv6 server messages need DHCPv6 guard.
- Port security needs a static mode; defaults are maximum 1, violation shutdown and no aging. Protect is silent, restrict logs and counts, shutdown error-disables.
- Sticky addresses live in the running config until saved; aging time is in minutes; a secure MAC seen on another secure port in the same VLAN is a violation; shutdown/no shutdown or errdisable recovery cause brings a port back.
Frequently asked questions
What is the difference between a trusted and an untrusted port in DHCP snooping?
A trusted port is one that leads to a legitimate DHCP server, such as an uplink, and DHCP snooping forwards all DHCP messages on it. An untrusted port is where clients connect: DHCP snooping lets client messages such as DHCPDISCOVER and DHCPREQUEST through, but drops server messages such as DHCPOFFER, DHCPACK and DHCPNAK, so a rogue server on a desk port cannot answer clients. All ports are untrusted by default once snooping is enabled for a VLAN.
Why does dynamic ARP inspection need DHCP snooping?
Dynamic ARP inspection validates each ARP packet on an untrusted port by checking that its sender IP and MAC address pair matches a known binding, and those bindings come from the DHCP snooping binding table, which records the MAC, IP, VLAN and port of every DHCP lease the switch observes. Without DHCP snooping, DAI has no bindings for DHCP clients and drops their ARP. Hosts with static addresses need an ARP ACL instead.
Why do hosts lose connectivity right after dynamic ARP inspection is enabled?
The most common reason is that the hosts obtained their DHCP leases before DHCP snooping was enabled, so the switch never saw their DHCP exchanges and has no bindings for them; DAI then drops their ARP packets. Renewing the leases (or bouncing the ports so the hosts run DHCP again) creates the bindings. Other causes are static-IP hosts without an ARP ACL and links between DAI switches left untrusted for DAI.
What are the port security violation modes on a Cisco switch?
Cisco port security has three main violation modes. Protect drops frames from unauthorised MAC addresses silently, without a log message or counter increase, and keeps the port up. Restrict drops those frames, sends syslog and SNMP notifications and increments the violation counter, and keeps the port up. Shutdown, the default, error-disables the whole port so all traffic stops until it is recovered. Some platforms add shutdown vlan, which disables only the violating VLAN on the port.
Do sticky MAC addresses survive a switch reload?
Only if the configuration is saved. Port security sticky learning writes each learned address into the running configuration as a switchport port-security mac-address sticky line, but those lines reach the startup configuration only when the configuration is saved, for example with copy running-config startup-config. After an unsaved reload, the ports learn whichever devices send first.
What does storm control do when the threshold is exceeded?
By default, storm control drops the traffic type that exceeded its threshold (broadcast, multicast or unicast) while the port stays up and other traffic keeps flowing; it blocks that type until traffic falls below the falling threshold. With storm-control action shutdown the port is error-disabled instead, and with storm-control action trap the switch also sends an SNMP trap.
What is the difference between RA guard and DHCPv6 guard?
IPv6 RA guard drops ICMPv6 router advertisements and redirects arriving on ports whose policy has the host device role, which stops a rogue device from becoming the hosts' SLAAC default gateway. DHCPv6 guard drops DHCPv6 server messages arriving on ports whose policy has the client role, which stops a rogue DHCPv6 server from handing out addresses or DNS servers. Each inspects a different protocol, so a network using SLAAC with stateless DHCPv6 needs both.
How do you recover an err-disabled port on a Cisco switch?
First remove the cause, then either enter shutdown followed by no shutdown on the interface, which restores it at once without changing the configuration, or configure automatic recovery with errdisable recovery cause and the cause keyword (such as psecure-violation, arp-inspection, dhcp-rate-limit or storm-control). Automatic recovery uses one global timer, errdisable recovery interval, in seconds with a default of 300.
Source
This lesson covers the "Network Services and Security" domain of the official CCNA exam guide. Vendors revise their guides — check the source for the current version.
Sign up free to mark lessons complete, bookmark topics and track your exam readiness.