PortFast allows an edge interface to enter forwarding rapidly instead of waiting for normal spanning-tree convergence. It does not disable spanning tree.
Configuration
Replace highlighted placeholders. Configure only the variants required by the task.
Access edge port Recommended / essential starting point
Start in privileged EXEC; block enters and exits configuration mode.Section link
enable
configure terminal
interface [INTERFACE]
switchport
switchport mode access
switchport access vlan [VLAN-ID]
spanning-tree portfast
no shutdown
exit
end
Command parameters
[INTERFACE]
Local interface name including type and number, or an SVI as appropriate.
[VLAN-ID]
VLAN identifier.
Default on access edge ports Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode.Section link
Review all affected non-trunk interfaces first.
enable
configure terminal
spanning-tree portfast default
end
Trunk to an edge endpoint Optional when requested
Start in privileged EXEC; block enters and exits configuration mode.Section link
On a switch with fixed 802.1Q encapsulation, omit the encapsulation selection command if it is not supported. Match native VLAN and allowed VLANs at both ends.
Use only for an explicitly intended edge trunk, never a normal switch-to-switch trunk.