Use it on every port toward an end device, and when hosts time out on DHCP or 802.1X right after link-up, or when PCs rebooting cause MAC-table flushes across the network.
PortFast
PortFast lets an access port connected to an end device go straight to forwarding instead of waiting through listening and learning (about 30 seconds). STP still runs on the port; combine it with BPDU Guard so an accidentally connected switch shuts the port.
1. spanning-tree portfast on access ports goes straight to forwarding.
2. Only for end hosts; never on switch-to-switch links.
3. show spanning-tree interface Gi1/0/5 portfast.
PortFast configured (interface or global default on access ports) → port is edge → link up → forwarding at once, no topology change → BPDU received → edge status lost (or err-disabled with BPDU Guard)
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
spanning-tree portfastPrimary Commands
Configuration and operational commands for this Topic.
spanning-tree portfastReferenceEnable PortFast on an access port so it forwards immediately.
Use when: Accelerate forwarding on a true endpoint edge port.
Quick note: PortFast does not disable STP; pair edge security with BPDU Guard where appropriate.
Cisco IOS / IOS XE · mixedspanning-tree portfast trunkReferenceEnable PortFast on a trunk port, for example toward a hypervisor.
Use when: Use only for an intentional edge trunk to a non-bridging endpoint/hypervisor/server design where rapid forwarding is required.
Quick note: Use only when the edge-trunk assumption is explicit and protected.
Cisco IOS / IOS XE · mixedspanning-tree portfast defaultReferenceEnable PortFast on all access ports by default.
Use when: Standardize edge behavior across many access interfaces.
Quick note: Verify actual interface edge state after enabling.
Cisco IOS / IOS XE · mixedShow Commands
Read-only Cisco show commands for confirming state, narrowing a fault and interpreting the current boundary.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 First 30 seconds Verify boundary
Immediate answer: Confirm PortFast is used only on the intended edge port and verify the port role/state before assuming faster forwarding is safe.
Verification chain: physical link → edge-port intent → PortFast state → BPDU reception/protection → STP role/state → endpoint traffic
Stop condition: PortFast shortens the edge transition; it does not disable STP or make a switch-to-switch link safe from loops.
Step 2 Operational verification and known-good state Verify boundary
show spanning-tree interface Gi1/0/5 portfast
show spanning-tree vlan 10
show spanning-tree summary
The first prints enabled or disabled per VLAN for the port. In the VLAN view, look at the Type column: P2p Edge means PortFast is in effect, plain P2p means it is not. The summary shows the global defaults, which explain ports that have no PortFast line of their own in the configuration.
Known-good: every host-facing port is Desg FWD, type P2p Edge; no inter-switch link carries the Edge type.
Step 3 Verification and output interpretation Verify boundary
Verify the interface role, operational edge state, STP mode and whether BPDUs are being received. Confirm the VLAN-specific spanning-tree state and check err-disable or protection counters if BPDU Guard is also present. A port forwarding quickly after link-up shows the edge transition occurred, but it does not show the attached device is safe or that no downstream bridge exists.
Step 4 Verification & troubleshooting Narrow the fault
1. show spanning-tree interface <port> portfast → enabled or disabled per VLAN.
2. show spanning-tree vlan <vlan> → the port's type should read P2p Edge.
3. Configured but not Edge? The port is a trunk without the trunk keyword, or it has received a BPDU — something that bridges is connected.
4. show spanning-tree summary → whether Portfast Default and Portfast BPDU Guard Default are on.
5. Re-plug the host: the port should forward at once and the topology-change counter of the VLAN should not move.
Step 5 Failure signatures and troubleshooting branches Narrow the fault
- Host gets no DHCP address right after connecting, but works a minute later. PortFast is missing or not in effect on the port.
- PortFast is configured but the type is not
Edge. A BPDU was received (small switch, bridging device) or the port is a trunk without the trunk keyword. - Bursts of flooding every morning; topology changes come from access ports. Those ports lack PortFast.
- A server on a trunk takes 30 seconds to become reachable after a link flap. It needs the trunk form of PortFast.
- Port goes err-disabled when a device is connected. BPDU Guard fired — the device sends BPDUs and is not a plain host.
Step 6 When the problem is really fixed Narrow the fault
- Host ports show type
P2p Edgeand forward within a second of link-up. - A host obtains its DHCP lease on the first attempt.
- Re-plugging a host does not increase the VLAN's topology-change count.
- No inter-switch link is an edge port.
PortFast marks a port as edge: it forwards immediately and its link flaps do not generate topology changes. STP is still running — if a BPDU arrives the port loses edge status and behaves normally. Only for single hosts; on a trunk to a server or hypervisor use the trunk variant. Always pair it with BPDU Guard.
show spanning-tree interface <if> portfast → enabled per VLAN. show spanning-tree vlan 10 → Type P2p Edge. show spanning-tree summary → whether Portfast Default and Portfast BPDU Guard Default are on.
ReferenceWhat it is1 section · depth on demand
What it is
PortFast marks a switch port as an edge port — a port that connects to an end device, not to another switch. An edge port goes straight to forwarding when the link comes up instead of waiting in discarding and learning, and its link changes are not reported to the rest of the network as topology changes.
ReferenceWhy it matters1 section · depth on demand
Why it matters
There are two reasons to use it, and the second is the less obvious one. For the host: without PortFast a newly connected PC waits about 30 seconds before the port forwards, long enough for DHCP, 802.1X or network boot to time out. For the network: every non-edge port that comes up triggers a topology change, and each topology change makes switches in the VLAN flush their MAC tables and flood traffic for a moment. A few hundred PCs starting in the morning would do that a few hundred times. PortFast on every host port is basic hygiene.
ReferenceImportant terms & boundaries6 sections · depth on demand
Key points
- Interface:
spanning-tree portfaston an access port (newer IOS XE:spanning-tree portfast edge). - Global:
spanning-tree portfast defaultenables it on every port operating in access mode. - Trunk to a server or hypervisor:
spanning-tree portfast trunk(newer:portfast edge trunk). - Spanning tree still runs on the port. If a BPDU arrives, the port loses its edge status and behaves like a normal port.
- Link changes on an edge port do not generate topology changes.
- Never on a link to another switch. Pair it with BPDU Guard.
- An active edge port shows type
P2p Edge.
In depth
PortFast: host ports start forwarding at once
The Catalyst 9300 optional STP features guide describes PortFast as moving an access or trunk port straight to forwarding, skipping listening and learning. It's disabled by default. The global spanning-tree portfast default enables it on all non-trunking ports. Trunk ports to servers or hypervisors need spanning-tree portfast trunk, since the plain form doesn't work on trunks.
C9300(config)# spanning-tree portfast default
C9300(config)# interface GigabitEthernet1/0/10
C9300(config-if)# spanning-tree portfast
C9300(config)# interface TenGigabitEthernet1/0/40
C9300(config-if)# description ESXi host trunk
C9300(config-if)# spanning-tree portfast trunk
C9300# show spanning-tree interface GigabitEthernet1/0/10 portfast
VLAN0020 enabled
C9300# show spanning-tree interface GigabitEthernet1/0/10 detail | include edge|BPDU
The port is in the portfast edge mode
BPDU: sent 11, received 0
Documented behaviour
| Point | Detail |
|---|---|
| Voice VLAN | Enabling it turns PortFast on; disabling it doesn't turn PortFast off |
| Modes | Works with PVST+, Rapid PVST+ and MSTP |
| RSTP | A PortFast port is an edge port: it doesn't trigger topology changes when it goes up or down |
Why it matters
| Without PortFast (802.1D timers) | With PortFast |
|---|---|
| About 30 s before forwarding (listening + learning) | Forwarding immediately |
| DHCP can time out at boot | Clients get an address immediately |
| Each host link change can cause a topology change and MAC flushes | Edge ports cause no topology changes |
Risk and the fix for it
A PortFast port connected to another switch can create a temporary loop before BPDUs are processed. Always combine PortFast with BPDU guard (spanning-tree portfast bpduguard default), so a received BPDU shuts the port down.
Only use PortFast on ports towards end stations, servers or hypervisors that don't bridge between their NICs.
Documented example, not captured output.
Quick reference
PortFast makes an access port go to forwarding immediately when it comes up, skipping the listening/learning wait. It is for ports connected to end devices, where no loop through the port is possible.
interface Gi1/0/10
spanning-tree portfast
spanning-tree bpduguard enable
! or globally for all access ports
spanning-tree portfast default
spanning-tree portfast bpduguard default
Documented example, not captured output.
Without PortFast, DHCP and PXE boot can time out while the port waits about 30 seconds in classic STP.
Mechanics and state ownership
In RSTP terms PortFast sets the port to "admin edge". That has three effects. The port skips proposal/agreement — there is no switch on the other side to agree with — and forwards immediately. It is exempt from the sync step, so it keeps forwarding while the switch renegotiates its own root port. And its transitions are not counted as topology changes.
Edge is an assumption, and the switch drops it as soon as it is proven wrong: when a BPDU is received, the port becomes an ordinary spanning-tree port until the link next goes down and up.
This also shows the risk. If two PortFast ports are patched together, both forward the instant the link comes up, and the loop exists until the first BPDUs cross — up to a hello interval. That short window is why PortFast must not be used toward switches, and why BPDU Guard is its natural partner: with it, the same mistake shuts the port instead.
State model and protocol mechanics
PortFast marks a true edge port so spanning tree can move it directly toward forwarding instead of waiting through the classic startup delay. The port still participates in spanning tree and still processes BPDUs; PortFast changes transition behavior, not the fundamental loop-prevention model.
Limits and common misconceptions
PortFast is not a loop-prevention bypass and it does not disable STP. It should not be used to hide slow convergence on network-facing links. A physical port can be an access port yet still connect to a switch, which makes the edge assumption wrong. Likewise, a trunk can be an intentional edge in some specialized designs, so the configuration keyword alone is less important than the actual topology contract.
ReferenceConfiguration & state1 section · depth on demand
Design and configuration model
Apply PortFast only where the attachment is operationally an endpoint edge and no Layer-2 switch or shared bridging device should appear. Treat edge classification as a design assertion. Pair it with BPDU Guard where policy requires an edge port to fail closed if BPDUs are received, and document exceptions such as phones, hypervisors or appliances that legitimately bridge frames.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Configuration & expected output
Concrete examples are shown only when the stored reference contains an actual configuration or output shape for this Topic.
Configuration example
Assumptions: Lab switch; Rapid PVST+ (spanning-tree mode rapid-pvst); VLAN 10 exists.
interface GigabitEthernet1/0/5
switchport mode access
switchport access vlan 10
spanning-tree portfast
!
! or for every access port:
spanning-tree portfast default
!
! newer IOS XE spells these `spanning-tree portfast edge` and `spanning-tree portfast edge default`Expected output
show spanning-tree vlan 10Expected state: Host ports carry the Edge type.
Interface Role Sts Cost Prio.Nbr Type
------------------- ---- --- --------- -------- ----
Gi1/0/1 Root FWD 4 128.1 P2p
Gi1/0/5 Desg FWD 4 128.5 P2p Edge
! Illustrative output, not captured Evidence.`P2p Edge` on Gi1/0/5 confirms PortFast is operational. The uplink Gi1/0/1 is a normal point-to-point link and must not be edge.Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Switching → STP → STP Enhancements → PortFast. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.cisco.com/c/en/us/support/ios-nx-os-software/ios-xe-17/series.html · confidence 94%Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
PortFast · operational reference
Compact state and interpretation boundaries for fast lookup.
| State / evidence | Interpretation |
|---|---|
| PortFast enabled | Rapid edge transition |
| BPDU received | Edge assumption may be false |
| BPDU Guard | Independent protection |
| Forwarding | Not end-to-end proof |
PortFast operational reference
Topic-specific bounded interpretation: known-good state, suspicious signatures and the next technical proof boundary.
| Boundary | Known-good for PortFast | Suspicious signature | Next proof |
|---|---|---|---|
| Intent | Matches edge-port rapid transition to forwarding while preserving the requirement that the port must not create a switching loop design | Configuration differs from design/peer | Compare effective configuration |
| Control state | Stable expected region/role/topology/path state | PortFast enabled toward another switch, PortFast absent on a true endpoint causing avoidable transition delay, or an operator assuming PortFast alone provides protection against accidental bridging | Inspect protocol detail and adjacent state |
| Forwarding | Expected VLAN/egress/RIB/FIB path | Control state exists but traffic path disagrees | MAC/FIB/CEF/adjacency proof |
| Closure | Original test passes for explained reason | Symptom moved, was bypassed or protection disabled | Regression test |