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, UDLD, BPDU guard, root guard, loop guard, DTP-effective trunking, storm protection, err-disable recovery, and MACsec.

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 GuardSupportedIPv4 sources on guarded ports must match a static or DHCP-snooping binding.
802.1XBehaviour modelEach port is decided once, at settle, over the real path to RADIUS. It ends in its access VLAN (dot1x or MAB), the auth-fail VLAN, the guest VLAN, or unauthorized.
MABBehaviour modelWith mab, a device that answers no EAPOL is checked by its MAC. The RADIUS user name is the MAC as 12 lowercase hex digits.
UDLDBehaviour modelAggressive mode err-disables a port whose peer is missing; normal mode only reports. No UDLD frames.
DTP effective modeBehaviour modelDynamic desirable/auto ports can resolve to trunk mode. DTP frames are on the wire in a capture (Packet Lens), decoded by Wireshark.
BPDU/storm protectionBehaviour modelBlocks or error-disables ports according to config.
Err-disable recoverySupportedA real timer brings a port back after the interval; if the cause remains it goes down again.
MACsecBehaviour modelBoth ends need the same key; a mismatch drops frames. No MKA or SecTAG.
StandardCoverageNotes
IEEE 802.1XBehaviour modelPort authorization. No EAPOL exchange.
IEEE 802.1AEBehaviour modelMACsec key match, Must-Secure policy only.
DHCP snooping / port securityVendor featureCisco-style semantics for supported commands.
UDLDVendor featureCisco-style unidirectional link handling.
RFC 6105PartialIPv6 RA guard, stateless only: port roles are as configured.
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 IPv4 packets whose source has no binding. MAC+IP and IPv6 source guard are not modelled.
802.1X auth stateSupportedAuthorized, auth-failed, or RADIUS unreachable. An unauthorized port’s frames are dropped (dot1x.unauthorized). A RADIUS server that cannot be reached authorizes nothing.
802.1X guest/fail VLANSupportedA rejected supplicant lands in the auth-fail VLAN; a device that answers nothing and is not let in by MAB lands in the guest VLAN. The switch puts the port in that VLAN.
Open authenticationSupportedAn IBNS 2.0 port (access-session port-control auto) passes traffic before and without authentication unless it says access-session closed. A legacy port with authentication open is open too.
IBNS 2.0 control policyPartialpolicy-map type control subscriber bound with service-policy type control subscriber gives the port its method order and priority from authenticate using … priority N. The rest of the policy is carried and written back.
Method order and prioritySupportedauthentication order and authentication priority: a device MAB let in that also speaks 802.1X is taken over by 802.1X when 802.1X ranks higher.
SupplicantSupportedFrom the document port, or IOS dot1x credentials with dot1x pae supplicant.
Critical VLAN / re-authentication / CoANot modelledThe decision is made once.
DTP runtime-effective trunkSupportedA dynamically negotiated trunk forwards VLAN-tagged frames as trunk traffic.
UDLD aggressivePartialDetection comes from the topology, not UDLD echo frames.
Root guardSupportedSuperior BPDU moves the port to root-inconsistent; clear restores forwarding.
Loop guardSupportedA port that stops hearing BPDUs blocks.
MACsecBehaviour modelOne-sided or mismatched keys break the link.
Storm controlSupportedFrames are counted by the destination MAC they carry on the wire: broadcast (ARP requests, DHCP discovers), multicast (any group address, an IPv6 Neighbor Solicitation included), unicast (known and unknown). IEEE reserved 01:80:c2:00:00:0x and Cisco 01:00:0c:cc:cc:cc/cd frames are neither counted nor dropped. Junos storm control counts known unicast too, and EOS storm-control unknown-unicast is not read. Broadcast threshold violation can drop or errdisable depending on action. storm-control <kind> level <rising> <falling> (also decimal levels) caps the port at the rising level. The falling level is not modelled. Storm control, port security and a port ACL apply to every frame entering the port, also one the switch hands to its own SVI to be routed.
IPv6 RA guardSupportedA host-role port drops Router Advertisements, so no host behind it takes an address or default router from them. device-role router, switch or monitor and trusted-port pass them.
Junos EX DHCP securitySupportedDHCP snooping, trust by port mode with a group override, and ARP inspection.
CommandIOS-styleJunos-styleVyOS-styleNotes
switchport port-securitySupportedn/an/aEnables port security.
switchport port-security maximum 2Supportedn/an/aMAC limit.
ip dhcp snooping vlan 10SupportedSupportedn/aSnooping domain. Junos: set vlans V forwarding-options dhcp-security.
ip dhcp snooping trustSupportedSupportedn/aTrusted uplink. Junos: trunk ports are trusted, access ports not, unless dhcp-security group G overrides trusted|untrusted.
ip arp inspection vlan 10SupportedSupportedn/aDAI domain. Junos: dhcp-security arp-inspection.
ip verify sourceSupportedn/an/aIP Source Guard.
authentication port-control autoSupportedn/an/a802.1X. force-unauthorized is written back as itself.
mabSupportedn/an/aMAC Authentication Bypass. Written back.
authentication order dot1x mab / authentication priority dot1x mabSupportedn/an/aMethod order and priority. Written back.
authentication event fail action authorize vlan 30Supportedn/an/aAuth-fail VLAN. Also dot1x auth-fail vlan N.
authentication event no-response action authorize vlan 20Supportedn/an/aGuest VLAN. Also dot1x guest-vlan N.
show authentication sessionsSupportedn/an/aMethod, outcome and VLAN per port.
access-session closedSupportedn/an/aMakes an IBNS 2.0 port closed until authorized.
ipv6 nd raguard policy / ipv6 nd raguard attach-policySupportedn/an/aRA guard. show ipv6 nd raguard policy lists the guarded ports.
switchport mode dynamic desirableSupportedn/an/aDTP can resolve runtime trunking.
udld port aggressiveSupportedn/an/aUDLD.
errdisable recovery cause <cause>Supportedn/an/aRecovery timer per cause.
spanning-tree guard rootSupportedSupportedn/aRoot guard. Junos: protocols rstp interface X no-root-port.
storm-control broadcast level 1.00SupportedPartialn/aBroadcast storm threshold. A second (falling) level is read and not modelled.
show port-security interfaceSupportedn/an/aSecurity state.
show ip dhcp snooping bindingSupportedn/an/aBindings.

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 vlans users vlan-id 10
set vlans users forwarding-options dhcp-security arp-inspection
set vlans users forwarding-options dhcp-security group uplink overrides trusted
set vlans users forwarding-options dhcp-security group uplink interface ge-0/0/24.0
set forwarding-options storm-control-profiles sc all bandwidth-percentage 5

The EAPOL exchange, the critical VLAN, RADIUS CoA, downloadable ACLs, periodic re-authentication, device-sensor profiling, UDLD frames, MKA, MAC+IP source guard, and IPv6 source guard are not modelled. VyOS has no port security, DHCP snooping, 802.1X, UDLD or storm control here. On Junos, port security (mac-limit) and 802.1X (protocols dot1x) are not read. RA guard’s stateful mode (learning which ports face routers) is not modelled: roles are as configured.