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.
Support level
Section titled “Support level”| Area | Level | Notes |
|---|---|---|
| Port security | Supported | Static/sticky MACs, maximum MACs, violation modes. |
| DHCP snooping | Behaviour model | Trusted ports and binding table from DHCP ACKs. |
| Dynamic ARP Inspection | Supported | ARP packets on untrusted ports are checked against snooping bindings. |
| IP Source Guard | Supported | IPv4 sources on guarded ports must match a static or DHCP-snooping binding. |
| 802.1X | Behaviour model | Each 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. |
| MAB | Behaviour model | With mab, a device that answers no EAPOL is checked by its MAC. The RADIUS user name is the MAC as 12 lowercase hex digits. |
| UDLD | Behaviour model | Aggressive mode err-disables a port whose peer is missing; normal mode only reports. No UDLD frames. |
| DTP effective mode | Behaviour model | Dynamic desirable/auto ports can resolve to trunk mode. DTP frames are on the wire in a capture (Packet Lens), decoded by Wireshark. |
| BPDU/storm protection | Behaviour model | Blocks or error-disables ports according to config. |
| Err-disable recovery | Supported | A real timer brings a port back after the interval; if the cause remains it goes down again. |
| MACsec | Behaviour model | Both ends need the same key; a mismatch drops frames. No MKA or SecTAG. |
Standards coverage
Section titled “Standards coverage”| Standard | Coverage | Notes |
|---|---|---|
| IEEE 802.1X | Behaviour model | Port authorization. No EAPOL exchange. |
| IEEE 802.1AE | Behaviour model | MACsec key match, Must-Secure policy only. |
| DHCP snooping / port security | Vendor feature | Cisco-style semantics for supported commands. |
| UDLD | Vendor feature | Cisco-style unidirectional link handling. |
| RFC 6105 | Partial | IPv6 RA guard, stateless only: port roles are as configured. |
Feature matrix
Section titled “Feature matrix”| Feature | Status | Notes |
|---|---|---|
| Secure MAC maximum | Supported | Violation when limit is exceeded. |
| Static secure MAC | Supported | Known MAC allowed on the port. |
| Sticky MAC | Supported | Learns allowed MACs deterministically. |
| Violation protect/restrict/shutdown | Supported | Mode changes forwarding and state outcome. |
| DHCP snooping trust | Supported | Server replies allowed only on trusted ports. |
| Snooping binding table | Supported | Learns client/IP/MAC/port from modelled DHCP. |
| DAI validation | Supported | Spoofed ARP from an untrusted port is dropped when it does not match a binding. |
| Pinned DAI binding | Supported | A spoofer cannot steal another port’s pinned DHCP-snooping binding. |
| IP Source Guard | Supported | Drops IPv4 packets whose source has no binding. MAC+IP and IPv6 source guard are not modelled. |
| 802.1X auth state | Supported | Authorized, 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 VLAN | Supported | A 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 authentication | Supported | An 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 policy | Partial | policy-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 priority | Supported | authentication 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. |
| Supplicant | Supported | From the document port, or IOS dot1x credentials with dot1x pae supplicant. |
| Critical VLAN / re-authentication / CoA | Not modelled | The decision is made once. |
| DTP runtime-effective trunk | Supported | A dynamically negotiated trunk forwards VLAN-tagged frames as trunk traffic. |
| UDLD aggressive | Partial | Detection comes from the topology, not UDLD echo frames. |
| Root guard | Supported | Superior BPDU moves the port to root-inconsistent; clear restores forwarding. |
| Loop guard | Supported | A port that stops hearing BPDUs blocks. |
| MACsec | Behaviour model | One-sided or mismatched keys break the link. |
| Storm control | Supported | Frames 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 guard | Supported | A 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 security | Supported | DHCP snooping, trust by port mode with a group override, and ARP inspection. |
Vendor command matrix
Section titled “Vendor command matrix”| Command | IOS-style | Junos-style | VyOS-style | Notes |
|---|---|---|---|---|
switchport port-security | Supported | n/a | n/a | Enables port security. |
switchport port-security maximum 2 | Supported | n/a | n/a | MAC limit. |
ip dhcp snooping vlan 10 | Supported | Supported | n/a | Snooping domain. Junos: set vlans V forwarding-options dhcp-security. |
ip dhcp snooping trust | Supported | Supported | n/a | Trusted uplink. Junos: trunk ports are trusted, access ports not, unless dhcp-security group G overrides trusted|untrusted. |
ip arp inspection vlan 10 | Supported | Supported | n/a | DAI domain. Junos: dhcp-security arp-inspection. |
ip verify source | Supported | n/a | n/a | IP Source Guard. |
authentication port-control auto | Supported | n/a | n/a | 802.1X. force-unauthorized is written back as itself. |
mab | Supported | n/a | n/a | MAC Authentication Bypass. Written back. |
authentication order dot1x mab / authentication priority dot1x mab | Supported | n/a | n/a | Method order and priority. Written back. |
authentication event fail action authorize vlan 30 | Supported | n/a | n/a | Auth-fail VLAN. Also dot1x auth-fail vlan N. |
authentication event no-response action authorize vlan 20 | Supported | n/a | n/a | Guest VLAN. Also dot1x guest-vlan N. |
show authentication sessions | Supported | n/a | n/a | Method, outcome and VLAN per port. |
access-session closed | Supported | n/a | n/a | Makes an IBNS 2.0 port closed until authorized. |
ipv6 nd raguard policy / ipv6 nd raguard attach-policy | Supported | n/a | n/a | RA guard. show ipv6 nd raguard policy lists the guarded ports. |
switchport mode dynamic desirable | Supported | n/a | n/a | DTP can resolve runtime trunking. |
udld port aggressive | Supported | n/a | n/a | UDLD. |
errdisable recovery cause <cause> | Supported | n/a | n/a | Recovery timer per cause. |
spanning-tree guard root | Supported | Supported | n/a | Root guard. Junos: protocols rstp interface X no-root-port. |
storm-control broadcast level 1.00 | Supported | Partial | n/a | Broadcast storm threshold. A second (falling) level is read and not modelled. |
show port-security interface | Supported | n/a | n/a | Security state. |
show ip dhcp snooping binding | Supported | n/a | n/a | Bindings. |
Behaviour notes
Section titled “Behaviour notes”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.
Examples
Section titled “Examples”Canonical example
configure terminalip dhcp snoopingip dhcp snooping vlan 10interface GigabitEthernet0/1 switchport port-security switchport port-security maximum 1 ip verify source authentication port-control autointerface GigabitEthernet0/24 ip dhcp snooping trustendshow port-security interface GigabitEthernet0/1show ip dhcp snooping bindingVendor styles
IOS-style
ip dhcp snoopingip dhcp snooping vlan 10interface GigabitEthernet0/1 switchport port-security switchport port-security maximum 1 ip verify source authentication port-control autoJunos-style
set vlans users vlan-id 10set vlans users forwarding-options dhcp-security arp-inspectionset vlans users forwarding-options dhcp-security group uplink overrides trustedset vlans users forwarding-options dhcp-security group uplink interface ge-0/0/24.0set forwarding-options storm-control-profiles sc all bandwidth-percentage 5Try it
Section titled “Try it”Known limits
Section titled “Known limits”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.