Loops and bonded links
Edge port
A spanning-tree port that faces a single host, so it forwards the instant the link is up — plus the guards that protect it.
The problem
A spanning-tree port waits before forwarding in case a switch is behind it, so a laptop plugged in gets no network at first.
- Alice's cable to floorA comes up. As an ordinary port it stays Discarding, then Learning, before Forwarding.
- Measured on floorA, running rapid spanning tree: about 20 seconds before alice could send anything.
- Her port is marked edge (Cisco: PortFast): only one host is behind it, so there is no loop to fear.
- The cable is plugged in again:
Forwardingat once, and the flap does not shake the rest of the tree. - BPDU guard protects an edge port: a BPDU there means a switch where only a host belongs, so the port is shut.
What you'd see
$ ovs-appctl rstp/show br0
Interface Role State Cost Pri.Nbr
---------- ---------- ---------- -------- -------
alice Designated Forwarding 2000 128.1
- floorA's port to alice, run the instant her cable came back up with the port marked edge.
Designated: the port's role, the forwarding end of its cable.Forwarding: passing frames already. Without edge, the same check showedDiscardingfor about 20 seconds.
Guess first
Someone plugs a small switch into alice's port, which has BPDU guard. What does floorA do?
Show answer
Shuts the port the moment the first BPDU arrives (Cisco: err-disabled). On a Linux bridge the port shows state disabled and the log says BPDU received on blocked port 3(alice). It stays down until an operator brings it back.
In short
An edge port is a spanning-tree port that faces one host, not another switch (Cisco: PortFast). With no loop to fear it forwards the moment the link is up, so a laptop gets DHCP at once. BPDU guard protects it: only switches send BPDUs, so when one arrives the port is shut (err-disabled) until an operator re-enables it. BPDU filter instead makes the port neither send nor receive BPDUs.
Read next
- Spanning tree The protocol that lets switches be cabled in loops by electing a root and blocking the ports that close a loop.
- Switch Joins devices into one network, forwarding each frame toward the port its destination MAC was seen on.
- Broadcast storm A broadcast copied round a loop of switches for ever, because Ethernet frames have no hop limit.