PortFast is a feature which can be used to speed up convergence on ports which are connected to a workstation or a server (which will not cause layer 2 loops).
• To configure PortFast on a Switch running IOS, run "spanning-tree portfast" command as shown below.
omnisecu.com.switch01>enable
omnisecu.com.switch01#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
omnisecu.com.switch01(config)#interface range fa0/3 - 5
omnisecu.com.switch01(config-if-range)#switchport mode access
omnisecu.com.switch01(config-if-range)#spanning-tree portfast
%Warning: portfast should only be enabled on ports connected to a single
host. Connecting hubs, concentrators, switches, bridges, etc... to this
interface when portfast is enabled, can cause temporary bridging loops.
Use with CAUTION
%Portfast will be configured in 3 interfaces due to the range command
but will only have effect when the interfaces are in a non-trunking mode.
omnisecu.com.switch01(config-if-range)#exit
omnisecu.com.switch01(config)#exit
omnisecu.com.switch01#
The "switchport mode access" command turns off DTP.
• To view PortFast enabled ports, issue the "show running-config" IOS command as shown below. We can see that PortFast is enabled on access ports fa0/3, fa0/4 and fa0/5.
omnisecu.com.switch01#show running-config
Building configuration...
Current configuration : 1106 bytes
!
version 12.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname omnisecu.com.switch01
!
!
!
interface FastEthernet0/1
!
interface FastEthernet0/2
!
interface FastEthernet0/3
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/4
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/5
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/6
!
interface FastEthernet0/7
<output omitted>
• To display a detailed summary of interface information, run "show spanning-tree detail" command as shown below.
omnisecu.com.switch01#show spanning-tree detail
VLAN0001 is executing the ieee compatible Spanning Tree Protocol
Bridge Identifier has priority of 32768, sysid 1, 0001.6449.1C49
Configured hello time 2, max age 20, forward delay 15
Current root has priority 32769
Topology change flag not set, detected flag not set
Number of topology changes 0 last change occurred 00:00:00 ago
from FastEthernet0/1
Times: hold 1, topology change 35, notification 2
hello 2, max age 20, forward delay 15
Timers: hello 0, topology change 0, notification 0, aging 300
Port 1 (FastEthernet0/1) of VLAN0001 is designated forwarding
Port path cost 19, Port priority 128, Port Identifier 128.1
Designated bridge has priority 32769, address 0001.6449.1C49
Designated port id is 128.1, designated path cost 19
Timers: message age 16, forward delay 0, hold 0
Number of transitions to forwarding state: 1
Link type is point-to-point by default
Port 2 (FastEthernet0/2) of VLAN0001 is designated forwarding
Port path cost 19, Port priority 128, Port Identifier 128.2
Designated bridge has priority 32769, address 0001.6449.1C49
Designated port id is 128.2, designated path cost 19
Timers: message age 16, forward delay 0, hold 0
Number of transitions to forwarding state: 1
Link type is point-to-point by default
Port 3 (FastEthernet0/3) of VLAN0001 is designated forwarding
Port path cost 19, Port priority 128, Port Identifier 128.3
Designated bridge has priority 32769, address 0001.6449.1C49
Designated port id is 128.3, designated path cost 19
Timers: message age 16, forward delay 0, hold 0
Number of transitions to forwarding state: 1
Link type is point-to-point by default
Port 4 (FastEthernet0/4) of VLAN0001 is designated forwarding
Port path cost 19, Port priority 128, Port Identifier 128.4
Designated bridge has priority 32769, address 0001.6449.1C49
Designated port id is 128.4, designated path cost 19
Timers: message age 16, forward delay 0, hold 0
Number of transitions to forwarding state: 1
Link type is point-to-point by default
Port 5 (FastEthernet0/5) of VLAN0001 is designated forwarding
Port path cost 19, Port priority 128, Port Identifier 128.5
Designated bridge has priority 32769, address 0001.6449.1C49
Designated port id is 128.5, designated path cost 19
Timers: message age 16, forward delay 0, hold 0
Number of transitions to forwarding state: 1
Link type is point-to-point by default
omnisecu.com.switch01#
• To display spanning-tree information on active interfaces only, run "show spanning-tree active" IOS command as shown below.
omnisecu.com.switch01#show spanning-tree active
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0001.6449.1C49
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 0001.6449.1C49
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/1 Desg FWD 19 128.1 P2p
Fa0/5 Desg FWD 19 128.5 P2p
Fa0/2 Desg FWD 19 128.2 P2p
Fa0/3 Desg FWD 19 128.3 P2p
Fa0/4 Desg FWD 19 128.4 P2p
• To display spanning-tree information for the specified interface, run "show spanning-tree interface interface-id" IOS command as shown below.
omnisecu.com.switch01#show spanning-tree interface fa0/3
Vlan Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
VLAN0001 Desg FWD 19 128.3 P2p
Related Topics...
• What is Broadcast Storm
• What is Layer 2 Switching loop
• What is Bridge Protocol Data Unit (BPDU) frame
• Bridge Protocol Data Unit (BPDU) Frame Format
• What is a Root Bridge (Switch)
• What is a Root Port
• What are Port Cost, Port Priority and Path Cost Values
• How Spanning Tree Protocol (STP) select Root Port
• What is a Designated Port
• How Spanning Tree Protocol (STP) select Designated Port
• Difference between Root Port and Designated Port
• Spanning Tree Port States
• Topology Changes in Spanning Tree Protocol (STP)
• Spanning Tree Protocol (STP) Convergence
• What is Spanning Tree Protocol (STP) PortFast
• How to enable or disable Spanning Tree Protocol (STP)
• What is Rapid Spanning Tree Protocol (RSTP)
• Difference between Spanning Tree Protocol (STP) and Rapid Spanning Tree Protocol (RSTP)
• Per-VLAN Spanning Tree (PVST) and Per-VLAN Spanning Tree Plus (PVST+)