Command
Spanning-Tree Portfast
Use
This command essentially disables spanning-tree on an interface and brings it immediately into the forwarding state. Only use this command on access ports
Syntax
Switch(config-if)#spanning-tree portfast
Example
In the below example we will configure SW1’s Fa0/2 to use port-fast to immediately skip to the forwarding state. First, we will flap Fa0/2 and observe how spanning-tree normally treats the interface.
SW1(config)#int fa0/2 |
The port goes through all the spanning tree timers. Here is the listening phase.
SW1(config-if)#do sh spanning vlan 10 VLAN0010 Bridge ID Priority 24586 (priority 24576 sys-id-ext 10) Interface Role Sts Cost Prio.Nbr Type |
Here is the learning phase.
SW1(config-if)#do sh spanning vlan 10 VLAN0010 Bridge ID Priority 24586 (priority 24576 sys-id-ext 10) Interface Role Sts Cost Prio.Nbr Type |
Finally the port is forwarding.
SW1(config-if)#do sh spanning vlan 10 VLAN0010 Bridge ID Priority 24586 (priority 24576 sys-id-ext 10) Interface Role Sts Cost Prio.Nbr Type |
Now we will configure portfast on Fa0/2.
SW1(config)#int fa0/2 %Portfast has been configured on FastEthernet0/2 but will only |
Notice how Fa0/2 is no longer seen in spanning tree.
SW1(config-if)#do sh spanning vlan 10 VLAN0010 Bridge ID Priority 24586 (priority 24576 sys-id-ext 10) Interface Role Sts Cost Prio.Nbr Type |