BPDU guard
termKept in this browser · My desk
A spanning tree protection that disables an edge port, one meant for a host, the moment it receives a BPDU, because a BPDU means a switch is connected there.
An edge port (Cisco's PortFast) goes straight to forwarding, which is right for a host and dangerous for a switch. BPDU guard closes the gap: a BPDU on such a port error-disables it, so a switch plugged in under a desk cannot join the tree or close a loop through it. Juniper calls it BPDU protection (bpdu-block-on-edge); Arista notes that a port it disables stays down until someone re-enables it. The site's spanning tree and layer 2 redundancy articles compare it across vendors.
What it is. BPDU guard is a spanning tree protection that disables an edge port, one meant for a host, the moment a BPDU (bridge protocol data unit) arrives on it, on the reasoning that a BPDU means a switch is connected where only a host should be. It is a vendor feature built on top of the standard rather than part of it: the IEEE (Institute of Electrical and Electronics Engineers) 802.1Q management model has no guard setting, and its own reaction to a BPDU on an edge port is gentler, the operational edge status simply becomes false and the port rejoins the tree as an ordinary port.
Why edge ports need it. An edge port (Cisco's PortFast) goes straight to forwarding, which is right for a host and dangerous for a switch. Edge ports exist so that hosts do not wait through listening and learning and do not send topology changes that shorten every MAC (media access control) table's ageing, one of Cisco's three causes of unicast flooding. Without BPDU guard, an edge port facing a second switch skips the very checks that would have blocked a loop. BPDU guard closes the gap with a blunt rule: a BPDU on such a port error-disables it, so a switch plugged in under a desk cannot join the tree or close a loop through it.
On the wire. The trigger is any frame addressed to the Bridge Group Address 01-80-C2-00-00-00 carrying a valid BPDU, a configuration BPDU of 35 bytes, a four-byte topology change notification or a rapid spanning tree BPDU; the content does not matter, unlike root guard, which compares priorities. The Linux bridge shows how simple the check is: before it parses a received BPDU, it tests the port's guard flag and, if set, logs that a BPDU was received on a blocked port and disables the port.
On each platform. Cisco: enabled globally it applies to every port in a PortFast operational state, enabled per interface it puts the port in the error-disabled state, and the interface must be put back in service by hand. Juniper calls it BPDU protection (bpdu-block-on-edge): an edge interface that receives a BPDU is disabled and the error must be cleared, unless a disable-timeout clears it automatically. Arista notes that a port it disables stays down until someone re-enables it. Fortinet's FortiSwitchOS requires the port to be an edge port with STP (Spanning Tree Protocol) enabled on the interface and globally, takes it down for a set time, 5 minutes by default and up to 120, does not forward the BPDUs, and offers execute bpdu-guard reset and diagnose bpdu-guard display status. Linux has IFLA_BRPORT_GUARD, off by default, for ports facing devices that may send BPDUs and cause network failure.
History. Sean Convery's Black Hat USA 2002 slides for Cisco list BPDU guard among the answers to spanning tree attacks, enabled on all ports running PortFast, with its first releases: CatOS 5.4.1 for Catalyst 2000, 4000, 5000 and 6000, native IOS 12.0XE on the 6000, and 12.1 releases for the 3550 and 2950. The same slides warn against the opposite reflex: do not disable spanning tree, because a loop would become another attack.
Why it matters for storms, and its limits. BPDU guard only reacts to BPDUs: a hub or an unmanaged switch that drops BPDUs, or a cable looped back on itself through such a device, sends none, which is why vendors add probe-based loop detection (Aruba's loop-protect is documented for exactly those ports). Its action is also a lever: whoever can send a BPDU into an edge port can shut that port. The National Vulnerability Database (NVD) record CVE-2019-15265 describes Cisco Aironet access points that forwarded BPDUs from certain wireless clients incorrectly, so a stream of crafted BPDUs could put an access point's port into the error-disabled state, a limited denial of service. Where nobody can re-enable a disabled port quickly, Cisco's 2008 campus design guide prefers root guard on access ports; a timeout, as on Juniper and Fortinet, trades a slower response to a real switch for automatic recovery from a nuisance.
Neighbours, kept apart. BPDU filtering looks similar and does the opposite on a switch-facing port: it hides BPDUs and can create loops. Root guard blocks a port only against a superior root claim and recovers by itself. Loop guard keeps a blocked port from forwarding when BPDUs stop. Loop detection sends probes of its own.
Also known as: bpduguard, bpdu protection, bpdu-block-on-edge
Sources
- Cisco, Troubleshoot STP Problems and Related Design Considerations, document 10556, updated 9 September 2026 (read 2026-11-23) (summary): broadcast or multicast on the administrative VLAN can impair the CPU and BPDU processing; BPDU loss makes blocked ports forward; unidirectional links are a common cause; find a loop by repeated packets and port utilization; break it from console or out-of-band access
- HPE Aruba Networking, AOS-CX 10.15 Layer-2 Bridging Guide (read 2026-11-23) (read in a browser): MAC address table, age-time 60 to 3,600 s, default 300; loop protection packets on ports, LAGs, VLANs and VXLANs; for unmanaged switches and authenticated ports; transmit interval 5 s; default action tx-disable
- H3C, S12500R Layer 2 LAN Switching Configuration Guide (R52xx), loop detection configuration (read 2026-11-23): detection frames to 010f-e200-0007, EtherType 0x8918; disabled by default; 30-second interval; default action log only; block, no-learning, shutdown
- Cisco, Layer 2 Configuration Guide, IOS XE 17.12.x (Catalyst 9300), Configuring Optional Spanning-Tree Features, 28 July 2023, read through WebFetch (read 2026-11-23): PortFast disabled by default; BPDU guard error-disables a PortFast port that receives a BPDU and the port must be put back in service by hand; BPDU filtering is the same as disabling spanning tree on the interface and can cause loops, disabled by default; root guard and loop guard disabled by default
- Juniper Networks, BPDU Protection for Spanning-Tree Protocols (read 2026-11-23): by default all BPDUs are accepted on all interfaces; bpdu-block-on-edge disables an edge interface that receives a BPDU and the error must be cleared; disable-timeout clears it automatically; action drop keeps a port up while dropping BPDUs and is not supported on edge ports
- The Linux kernel documentation, Ethernet bridging (read 2026-11-23): IFLA_BRPORT_GUARD disables a port that receives a BPDU, off by default; IFLA_BRPORT_PROTECT, root port guard; the disabled port state, also called BPDU filter; IFLA_BR_FDB_MAX_LEARNED
- IEEE 802.1, ieee802-dot1q-rstp YANG module, revision 2025-02-04 (read 2026-11-23): admin-edge-port default false, oper-edge-port becomes false when a BPDU is received, auto-edge-port default true; restricted-role (Alternate Port instead of Root Port) and restricted-tcn (no propagation of topology changes, no address flushing); last-topology-change; no guard or filter leaf
- Linux kernel source, net/bridge/br_stp_bpdu.c and br_private_stp.h (read 2026-11-23): configuration BPDU of 35 bytes, TCN BPDU of 4 bytes with type 0x80, flags 0x01 topology change and 0x80 acknowledgement, timers in 1/256 s, LLC SAP 0x42; a port with the BPDU guard flag is disabled when a BPDU arrives
- Sean Convery (Cisco Systems), Hacking Layer 2: Fun with Ethernet Switches, Black Hat USA 2002 (read 2026-11-23): Cisco and @stake tests; DTP frames to 0100.0ccc.cccc with SNAP type 0x2004; basic and double-encapsulated VLAN hopping, the latter one-way and working with trunking off; gratuitous ARP misuse, static entries overwritten on NT4 and Windows 2000, port security does not help; STP root claims, TCN ageing in 15 s, BPDU guard and root guard with their first releases
- Fortinet, FortiSwitchOS 7.2.2 Administration Guide, MSTP configuration (read 2026-11-23): STP and edge port enabled on all ports by default; edge ports go straight to forwarding; STP loop protection off by default and recommended on all nondesignated ports; root guard on ports that should not lead to the root, never on the root port; BPDU guard needs an edge port, with a port timeout of up to 120 minutes, 5 by default, reset with execute bpdu-guard reset; Flood BPDU Packets passes STP packets through only when MSTP is disabled, otherwise they are blocked
- NIST National Vulnerability Database (NVD), CVE-2019-15265, record through the NVD API (read 2026-11-23): Cisco Aironet access points forwarded BPDUs from specific wireless clients incorrectly, so a stream of crafted BPDUs could put an access point's port into the error-disabled state, a limited denial of service; published 16 October 2019
- Cisco, Campus Network for High Availability Design Guide, Cisco Validated Design, 21 May 2008, PDF bytes saved by WebFetch (read 2026-11-23): root guard or BPDU guard on every access port, BPDU guard only where someone can re-enable disabled ports; trunking best practices; double 802.1Q encapsulation VLAN hopping a remote possibility, one-way, needing the native VLAN ID; the guide describes root guard as acting on inferior BPDUs