Layer 2 Security

Ethernet Security

A complete guide to the Data Link Layer defense mechanisms that protect modern Ethernet networks — from access control and authentication to encryption and traffic isolation.

The Security Wheel

This article catalogs the ten security mechanisms featured in a popular circular infographic by Dan Nanni (study-notes.org). Arranged as a "wheel of security," each wedge represents a distinct control that, together, forms a comprehensive defense-in-depth strategy for Ethernet networks.

MAC Filter Port Security 802.1X DHCP Snooping BPDU Guard Storm Control Private VLANs MACsec VLAN Seg. DAI
M

MAC Address Filtering

Blocks or permits traffic based on the source MAC address of the device. Operates on the principle of an allowlist or blocklist to restrict which endpoints can communicate through a switch port.

Layer 2Access ControlAllowlist
P

Port Security

Limits the number of MAC addresses allowed on a single switch port. Helps prevent MAC flooding attacks and unauthorized device connections by shutting down or restricting the port when the limit is exceeded.

Sticky MACViolation ModesCCNA
X

802.1X — Port-Based Authentication

An IEEE standard for network access control that requires devices to authenticate (via RADIUS) before being allowed onto the network. Uses three roles: supplicant (client), authenticator (switch), and authentication server.

RADIUSEAPDot1X
D

DHCP Snooping

Ensures that only DHCP messages from trusted ports (typically uplinks to the legitimate DHCP server) are forwarded. Frames from DHCP servers on untrusted ports are dropped, preventing rogue DHCP server attacks.

DHCP StarvationTrusted PortsRate Limiting
B

BPDU Guard

Protects Spanning Tree Protocol (STP) by disabling any port that receives a BPDU when configured for PortFast. Prevents rogue switches from being inadvertently introduced into the network topology.

STPPortFastLoop Prevention
S

Storm Control

Suppresses excessive broadcast, multicast, or unicast traffic by dropping frames once a configured threshold (as a percentage of bandwidth or packets per second) is exceeded. Prevents network storms from degrading performance.

Broadcast StormThresholdPPS
V

Private VLANs

Extends VLAN segmentation by creating isolated sub-domains within a single VLAN. Promiscuous ports can talk to all; isolated ports can only talk to promiscuous ports; community ports can talk within the group.

PVLANIsolated/CommunityGranularity
K

MACsec (IEEE 802.1AE)

Provides hop-by-hop encryption and authentication at Layer 2 using AES-GCM. Protects data integrity and confidentiality between directly connected switches or hosts without relying on higher-layer protocols.

802.1AEAES-GCMEncryption
L

VLAN Segmentation

Logically divides a physical switch network into multiple isolated broadcast domains using VLAN tags (IEEE 802.1Q). Traffic from one VLAN cannot directly reach another without a router, reducing attack surface.

802.1QBroadcast DomainTagging
A

Dynamic ARP Inspection (DAI)

Prevents ARP spoofing and man-in-the-middle attacks by validating ARP packets against the DHCP Snooping binding table. Invalid ARP replies are dropped before they poison the target's cache.

ARP SpoofingMITMDHCP Binding

Quick Reference

MechanismPrimary FunctionAttack Mitigated
MAC FilteringAllow/block by MACUnauthorized devices
Port SecurityLimit MACs per portMAC flooding
802.1XPort-based authUnauthorized access
DHCP SnoopingValidate DHCP msgsRogue DHCP server
BPDU GuardDisable on BPDU rxRogue STP / loops
Storm ControlRate-limit L2 floodsBroadcast storm
Private VLANsSub-VLAN isolationInter-host snooping
MACsecL2 encryptionEavesdropping
VLAN SegmentationLogical separationLateral movement
DAIARP packet validationARP spoofing / MITM