cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
799
Views
0
Helpful
16
Replies

Configuration spanning-tree on root

mulbreizh
Level 1
Level 1

Hello and sorry for my english , 

My core switch is also root of spanning-tree, i use Rapid-pvst.  On this switch, in global configuration i can see :

spanning-tree portfast bpduguard default
spanning-tree portfast bpdufilter default

This commands are necessary ? not ?

thanks a lot

1 Accepted Solution

Accepted Solutions

Hello
You can leave it however as stated , I would say its not preferable to do so, especially bpdu-filter.
disabling it globally and applying it at an interface level is more deterministic and you have better control as when those features will initiate.


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

View solution in original post

16 Replies 16

MHM

Two solution for portfast+bpduguard+bpdufilter

Solution1 

Global 

spanning-tree portfast bpduguard default
spanning-tree portfast bpdufilter default

Interface

Spanning-tree portfast 

 

Solution2

Interface 

Spanning-tree portfast 

Spanning-tree bpduguard enable 

Spanning-tree bpdufilter enable 

 

You use first solution for simplicity, and it work but be aware which port you config as portfast that all

MHM

Joseph W. Doherty
Hall of Fame
Hall of Fame

"This commands are necessary ?"

No.

But are they a good or bad practice to use?

That's an "it depends".  Firstly, do they serve your goals "better"?  Does the combination of global bpduguard and bpdufilter confuse?  If the latter, possible that would outweigh using them.

Oh my, reading the many follow on replies, most consider, at least the global default for bpdufilter "bad".

I've reread Cisco documentation, and also read, many comments on these two commands.  The latter, also generally places the global bpdufilter into the "bad" category, or using the two commands, bpduguard and bpdufilter, together, as "bad".  However, unless the Cisco documentation is incorrect, or these configuration statements don't work as documented, either I, or many others, misunderstand these commands.

Firstly, when you have an option to change global defaults, as applied to interfaces, that's to shortcut much interface configuration using a common configuration different from the Cisco default.

For example, if we want almost every edge/portfast port to use bpduguard, we can configure almost every edge/portfast port to use bpduguard, or we make it the default, an now we only need to configure (few) edge/portfast ports to NOT use bpduguard.

Of course, with the interface range statement, often setting many ports to have a common configuration statement doesn't take much typing, but it does reduce the amount of "verbiage" when you list the config.

I suspect the big worry over bpdufilter is it may open up a path to a potential L2 loop.  Possibly, but no more so that using portfast does.

Cisco does note: "Enabling BPDU filtering on an interface is the same as disabling spanning tree on it and can result in spanning-tree loops." but that's when configured on an interface, not for the global default.

For a global default, Cisco has:

Enabling BPDU filtering on PortFast edge-enabled interfaces at the global level keeps those interfaces that are in a PortFast edge-operational state from sending or receiving BPDUs. The interfaces still send a few BPDUs at link-up before the switch begins to filter outbound BPDUs. You should globally enable BPDU filtering on a switch so that hosts connected to these interfaces do not receive BPDUs. If a BPDU is received on a PortFast edge-enabled interface, the interface loses its PortFast edge-operational status, and BPDU filtering is disabled.

So, what the global bpdufilter does is mainly suppress sending outbound BPDUs, but if a BPDU is received, the port then operates as a normal STP non-edge port.

The "gotcha", the global bpduguard only applies to portfast configured ports, so it's possible the incoming BPDU will NOT error disable such a also globally configured bpdufilter port.

I.e. using a global bpdufilter command may implicitly disable the global bpduguard command, but I wouldn't say this is "bad", it's just is what it is.

In my prior reply, I wrote:

But are they a good practice to use?

Usually, yes.

Which I'll revise, because I didn't see using the combination of bpduguard and bpdufilter global defaults as usually "bad", but didn't intend to imply that it's recommended or a best practice.

Hello
Id would recommend to remove bpdufilter globally especially 

Both of those commands enabled globally work in conjunction with port-fast enabled edge ports -  and as you SHOULD append port-fast to ALL access-edge ports I would recommend disabling both commands globally and applying bpdu-guard at interface level where it will work with/without portfast


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

If there are apply globally but not in interfaces, i can let like this in global configuration ?

Hello
You can leave it however as stated , I would say its not preferable to do so, especially bpdu-filter.
disabling it globally and applying it at an interface level is more deterministic and you have better control as when those features will initiate.


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Hello @mulbreizh ,

bpdu guard = good

bpdu filter = bad idea .

BPDU filter should be used only on specific corner cases like connecting to other network where you don't want to joint your Rapid PVST domain with some other devices.

on normal user ports BPDU filter should not be used.

So my personal suggestion is to remove the command

conf it

no spanning-tree portfast bpdufilter default

( note to disable the command may be different )

 

Finally if your core switch is acting as a pure core switch i.e. it just has inter switch links with distribution layer switches or access layer switches both commands are useless, however you can keep the one for  bpdu guard .

Final note : stay also away from

spanning-tree loopguard default

it can create issues. I had a customer many years ago that had incident caused by this.

Hope to help

Giuseppe

 

Most of my network is cisco switch with VTP domain. I just have 4 Aruba switchs on other spanning-tree but connect to the core /

with configuration like this on aruba :
interface lag 1 multi-chassis
description LACP-to-Coeur
no shutdown
no routing
vlan trunk native 999
vlan trunk allowed 1-2,5,15,17,21-22,25-26,45,51,54,56,61-62,70,89,100,102,104,110,999
lacp mode active
spanning-tree bpdu-filter
spanning-tree rpvst-filter

Hello @mulbreizh ,

but you have this configuration on a swtch interface acting as trunk because you don't want to merge the two STP domains this is the corner case I have referring to in my previous post.

I wanted to say the BPDU filter should be used only at interface level where needed like in your case.

I'm against the use of

spanning-tree postfast bdpufilter default

You still want to be able to detect if one user connects two ports of the same switch with  a cable, BPDU filter defeats this key capability.

at global level.

Hope to help

Giuseppe

 

Bad idea why ? if he careful config it ?
if he have more than 48 ports instead of add two or three command under the port connect to host he only need specify this port is portfast and make global config add it auto

both solution I share misconfig the bpdufilter is make issue 

MHM

Hello @MHM Cisco World ,

BPDU guard with potfast is a good feature and it is effective to detect and stop user connecting unmanaged switches or even making errors in cabling.

BPDU filter in my personal opinion and work experience should be used only on specific llinks at interface level to keep two STP domains separated for possible interoperability issues or for administrative reasons.

There a lot of security focused people that try to enforce the use of BPDU filter on user facing ports to avoid a possible attacker to detect your switch is running some flavor of STP.

Not all Cisco commands at global level work well in all environments like the one we are discussing about.

Hope to help

Giuseppe

 

Security of bpdufilter this first time I know that 

The SW no need to send bpdu to host that why bpdufilter use with portfast 

And again both solution I share above have pro/con.

Anyway he already decided disable bpdufilter so let him do that it not so effect SW forwarding data.

MHM

@mulbreizh o

bpdufilter 

Cisco Sw use bpdufilter in link connect to other SW vendor to disable STP between two SW 

This can Done only if there is only one link connect two SW 

Why ? Because Cisco SW not use standard IEEE stp it use it stp abd that not compatible with other vendor that why disable stp by bpdufilter is one solution 

Other is run MST

MHM

Review Cisco Networking for a $25 gift card