Showing results for 
Search instead for 
Did you mean: 

enable portfast on all ports.

Level 1
Level 1

Can I enable portfast on ports of a catalyst 2950

in one command:

config# spanning-tree portast default

or should I enable portfast on a per port basis.



7 Replies 7

Level 4
Level 4

You can use the Interface range command:

interface range fa0/1 - 24

spanning-tree portfast

Be careful that no switches are connected to ports within the range.

Good luck


Be a little bit careful about that syntax...the switch wont like the command if you dont enter a space between the 1, - and 24

interface range fa 0/1 - 24

spanning-tree portfast

Sankar Nair
UC Solutions Architect
Pacific Northwest | CDW
CCIE Collaboration #17135 Emeritus

By the way, this annoying space issue requirement is being eliminated in future versions.

Enjoy :)

Level 4
Level 4

to answer your question which I think didn't get answered so far.

Use the global default command. This is precisely the type of scenario (access-layer) for which this command was designed. The uplinks would automatically go out portfast disabled mode upon receiving BPDU. But you can explictly turn it off on uplinks if you would like. Other user ports would be portfast automagically. :)

I think it is worth mentioning that the command (spanning-tree portfast default) will enable the portfast feature on all access ports, so first it could be wise to force all user ports to access mode.

#spanning-tree portfast ?

bpdufilter Enable portfast bdpu filter on this switch

bpduguard Enable portfast bpdu guard on this switch

default Enable portfast by default on all access ports

so I like doing something like:


Switch(config)#interface range f0/1 - X

Switch(config-if-range)#switchport mode access


Switch(config)#spanning-tree portfast default



It does not have to be configured for access port first. It would work if you enable global portfast and then convert a port to access port. So no need to do it in this order. I would think order independent configuration for this scenario is better :)

I did not say the order is important

but because the default mode is:

switchport mode dynamic desirable

tunring on the global "portfast default" option will not be enough to really enable portfast

sorry if I was not clear