Concepts / Loops and bonded links

Loops and bonded links

Edge port

Also called PortFast, BPDU guard, BPDU filter, err-disable, port role, Alternate port, proposal/agreement

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.

  1. Alice's cable to floorA comes up. As an ordinary port it stays Discarding, then Learning, before Forwarding.
  2. Measured on floorA, running rapid spanning tree: about 20 seconds before alice could send anything.
  3. Her port is marked edge (Cisco: PortFast): only one host is behind it, so there is no loop to fear.
  4. The cable is plugged in again: Forwarding at once, and the flap does not shake the rest of the tree.
  5. BPDU guard protects an edge port: a BPDU there means a switch where only a host belongs, so the port is shut.
An edge port forwards at once; BPDU guard shuts it if a switch appears
An edge port forwards at once; BPDU guard shuts it if a switch appears

A port facing one host cannot close a loop, so it skips the wait. Only switches send BPDUs, so a BPDU arriving on an edge port means a switch was plugged in, and BPDU guard shuts the port.

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 showed Discarding for 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.

See it on real machines

Read next

Learn it on real machines.

Every lab is a small network of real Linux machines in your browser. Sign in with Google or email to start.

Start this lab