Spanning-Tree LoopGuard and UDLD

Hello Matt

Loopguard will only kick in if a switch is able to send BPDUs on a link (i.e. the link appears up) but doesn’t receive any BPDUs (i.e. the incoming link from the neighboring switch is down). Now in classic STP, only the root bridge generates BPDUs. So how does a switch differentiate between a unidirectional link and a failed root bridge? Take a look at this topology.

If SW1 in the above topology failed (i.e. the root bridge), a new root bridge would be elected. So before SW3 can detect a lack of incoming BPDUs, a new root bridge would be selected, and BPDU generation would resume.

Now this is not an issue when we talk about RSTP since each switch generates its own BPDUs, so loopguard’s function is independent of the state of the root bridge. Does that make sense?

I hope this has been helpful!

Laz

Hello. I don’t quite understand this explanation:

If one of the cables (transmit or receive) fails we’ll have a unidirectional link failure and this can cause spanning tree loops.

If one of the cables goes down, shouldn’t both switches experience a link failure? This means that they would both be unable to either transmit or receive which wouldn’t cause loops. Or are we talking specifically about errors on the interfaces/SFP modules where the link state remains up/up?

David