Skip to content

Layer-2 Security

Layer-2 security features constrain who can use a switchport and how much damage a bad edge can cause. netverdict models the common training and review behaviours: port security, DHCP snooping, Dynamic ARP Inspection, IP Source Guard, 802.1X/MAB, UDLD, BPDU guard, root guard, DTP-effective trunking, and storm protection.

AreaLevelNotes
Port securitySupportedStatic/sticky MACs, maximum MACs, violation modes.
DHCP snoopingBehaviour modelTrusted ports and binding table from DHCP ACKs.
Dynamic ARP InspectionSupportedARP packets on untrusted ports are checked against snooping bindings.
IP Source GuardSupportedIP traffic on guarded ports must match binding state.
802.1X / MABBehaviour modelPort authorization state from configured identity outcomes.
UDLDBehaviour modelUnidirectional link detection and reset surface.
DTP effective modeBehaviour modelDynamic desirable/auto ports can resolve to trunk mode for runtime forwarding.
BPDU/storm protectionBehaviour modelBlocks or error-disables ports according to config.
StandardCoverageNotes
IEEE 802.1XBehaviour modelPort authorization concepts.
DHCP snooping / port securityVendor featureCisco-style semantics for supported commands.
UDLDVendor featureCisco-style unidirectional link handling.
FeatureStatusNotes
Secure MAC maximumSupportedViolation when limit is exceeded.
Static secure MACSupportedKnown MAC allowed on the port.
Sticky MACSupportedLearns allowed MACs deterministically.
Violation protect/restrict/shutdownSupportedMode changes forwarding and state outcome.
DHCP snooping trustSupportedServer replies allowed only on trusted ports.
Snooping binding tableSupportedLearns client/IP/MAC/port from modelled DHCP.
DAI validationSupportedSpoofed ARP from an untrusted port is dropped when it does not match a binding.
Pinned DAI bindingSupportedA spoofer cannot steal another port’s pinned DHCP-snooping binding.
IP Source GuardSupportedDrops packets with no matching port/IP/MAC binding.
802.1X auth stateSupportedAuthorized/guest/failure paths.
802.1X guest/fail VLANSupportedAuth failure and guest paths can move the effective access VLAN.
DTP runtime-effective trunkSupportedA dynamically negotiated trunk forwards VLAN-tagged frames as trunk traffic.
UDLD aggressivePartialOutcome modelled; packet detail simplified.
Root guardSupportedSuperior BPDU moves the port to root-inconsistent; clear restores forwarding.
Storm controlSupportedBroadcast threshold violation can drop or errdisable depending on action.
CommandIOS-styleJunos-styleVyOS-styleNotes
switchport port-securitySupportedn/aPartialEnables port security.
switchport port-security maximum 2Supportedn/aPartialMAC limit.
ip dhcp snooping vlan 10Supportedn/aPartialSnooping domain.
ip dhcp snooping trustSupportedn/aPartialTrusted uplink.
ip arp inspection vlan 10Supportedn/an/aDAI domain.
ip verify sourceSupportedn/an/aIP Source Guard.
authentication port-control autoSupportedn/aPartial802.1X.
switchport mode dynamic desirableSupportedn/an/aDTP can resolve runtime trunking.
udld port aggressiveSupportedn/aPartialUDLD.
spanning-tree guard rootSupportedPartialPartialRoot guard.
storm-control broadcast level 1.00SupportedPartialPartialBroadcast storm threshold.
show port-security interfaceSupportedn/aPartialSecurity state.
show ip dhcp snooping bindingSupportedn/aPartialBindings.

The model is designed to make failure reasons inspectable. A blocked DHCP ACK, a failed DAI lookup, an IP Source Guard drop, a port-security violation, or a failed 802.1X authorization is represented as a state change rather than hidden inside packet noise.

DTP affects the effective runtime switchport mode. A configured dynamic port can forward as a trunk once negotiation resolves that way, even if the configured mode is not literally trunk.

Canonical example
configure terminal
ip dhcp snooping
ip dhcp snooping vlan 10
interface GigabitEthernet0/1
switchport port-security
switchport port-security maximum 1
ip verify source
authentication port-control auto
interface GigabitEthernet0/24
ip dhcp snooping trust
end
show port-security interface GigabitEthernet0/1
show ip dhcp snooping binding

Vendor styles

IOS-style
ip dhcp snooping
ip dhcp snooping vlan 10
interface GigabitEthernet0/1
switchport port-security
switchport port-security maximum 1
ip verify source
authentication port-control auto
Junos-style
set ethernet-switching-options secure-access-port interface ge-0/0/1.0 mac-limit 1
set access radius-server 192.0.2.20 secret lab
set protocols dot1x authenticator interface ge-0/0/1.0
VyOS-style
set service dhcp-server global-parameters 'authoritative;'
set interfaces ethernet eth1 switch-port port-security maximum 1

Full RADIUS packet exchange, downloadable ACLs, DHCP option edge cases, device-sensor profiling, DTP packet byte fidelity, and vendor error-disable recovery timers are not modelled in depth.