cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2472
Views
15
Helpful
6
Replies

Portfast and network loops

CrackedJack1
Level 1
Level 1

What happens if there's a loop created between two ports that are set to portfast? I was under the impression that the switch will still detect the loop and shut the ports but it may take 2-3 seconds. Is this correct or does it take longer/not detect the loop at all?

Would all switches, regardless of whether they were Cisco or not, behave the same way as long as STP and portfast/edge port are set?

6 Replies 6

Mark Malone
VIP Alumni
VIP Alumni

Hey

You should run bpduguard with portfast that will put it into errdisable if someone plugs something in they shouldn't , portfast sets the fwd straight away the guard bit prevents the loop , bpdus are seen coming in the port will go errdisable with guard enabled

These 2 commands are recommended to be ran together for that purpose

double post

Ok so to answer the question: yes, two portfast ports connected together will still detect the loop after spanning tree does its thing... Assuming the broadcast storm doesn't kill the switches first:

The problem you have, is that you could potentially overwhelm the switch with a broadcast storm in the few seconds before spanning tree blocks the port (so in the few seconds between you looping the port-fast ports and spanning tree blocking the link, the broadcast storm overwhelms the switch).

This is why bpduguard is good, as it will *immediately* block the port before a broadcast storm occurs.

99% of network loops we see are between access ports (users plugging wall socket 1 into wall socket 2 by accident)...  just always run bpduguard on portfast ports :)

Thanks. So I'll be ok with portfast and loops provided the switch doesn't die from the traffic within 2-3 seconds.

With the bpduguard guard in place, along with portfast, intentionally connecting two switches together (not in a loop) would set the port to disabled though, correct?

If you connect a switch to a port with bpduguard the port will go errdisable as soon as it receives the bpdu

portfast is just to expedite it to fwd mode in stp , guard protects the port from becoming an issue

bpduguard puts the port into error-disabled state. If you are worried about extra administrative work having to no-shut a port, you can have the switch automatically recover from error disabled after a time period:

errdisable recovery cause bpduguard

errdisable recovery time 120

^ This will auto-recover the port after 2 minutes. It will instantly re-disable if the loop is still there, but assuming the user removes the loop after he/she realises he has broken things, they will automatically start working again.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card