If you’ve ever wondered what does Spanning Tree PortFast do in a real network ? You're in the right place.

Figure 1 – PortFast skips STP states for immediate forwarding
Spanning Tree PortFast is a Cisco feature that allows a switch port to skip the usual STP Listening and Learning states and jump straight to the Forwarding state.
Without Spanning Tree PortFast
By default, the Spanning Tree Protocol does not allow a PC to connect to a switch port and send traffic right away.
The switch port must go through two Spanning Tree states:
Listening (for 15 seconds)
Learning (for 15 seconds)

Figure 2 – Without PortFast, the port waits 30 seconds before forwarding
Only after that does the port move to Forwarding state and allow traffic. That means you get 30 seconds of delay before your device can send anything to the network.
This is not ideal, since users expect their devices to send traffic immediately after connecting to a switch port.
With Spanning Tree PortFast Enabled
When PortFast is enabled, the switch port skips the Listening and Learning States and goes immediately to the Forwarding state, allowing devices to send traffic as soon as they are connected to the Switch Port.

Figure 3 – With PortFast, the port forwards traffic immediately
In simple words, that’s exactly what Spanning Tree PortFast does it bypasses the STP Listening and Learning stages and goes straight to the Forwarding State, allowing end devices to start forwarding traffic without delay.
In the diagram above, PC1 is connected to port G0/2 on switch SW2.
With PortFast enabled, that port goes directly to the Forwarding state instantly.
No 15 seconds Listening state + 15 seconds Learning state, PortFast gives immediate network access.Now that you understand what Spanning Tree PortFast does, let’s see how to configure it properly !
Answer the question below
PortFast can be enabled in Two Ways:
On individual interfaces
Globally (applies to all access ports on the switch)
Let’s explore both methods !
Method 1 - Enabling PortFast on an Individual Interface
Let’s say PC1 is connected to port GigabitEthernet0/2 on SW2.
To give it instant access to the network, we want to enable PortFast just on this port.
Figure 4 – Enabling PortFast on a specific interface (G0/2)
Configuration Steps
1. Access the interface configuration mode:
SW2# configure terminal Enter configuration commands, one per line. End with CNTL/Z. SW2(config)# int G0/22. Enable PortFast using
spanning-tree portfastcommandSW2(config-if)# 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 has been configured on GigabitEthernet0/2 but will only have effect when the interface is in a non-trunking mode. SW2(config-if)# end %SYS-5-CONFIG_I: Configured from console by consoleThe switch warns you to enable PortFast only on ports connected to a single host.
This feature should not be configured on interfaces towards switches and hubs.Verifying PortFast
We can verify if the PortFast Feature is enabled on this interface:
SW2# show spanning-tree interface g0/2 detail Port 3 (GigabitEthernet0/2) of VLAN0001 is designated forwarding Port path cost 4, Port priority 128, Port Identifier 128.3. Designated root has priority 32769, address 50e2.aa04.6b00 Designated bridge has priority 32769, address 50e2.aa04.6b00 Designated port id is 128.3, designated path cost 0 Timers: message age 0, forward delay 0, hold 0 Number of transitions to forwarding state: 1 The port is in the portfast edge mode Link type is point-to-point by default BPDU: sent 82, received 0You can notice the line: "The port is in the portfast edge mode."
This confirms that PortFast is active on the interface.
Disable PortFast on an Individual Interface
If you want to turn off the feature, this is pretty easy:
SW2# configure terminal Enter configuration commands, one per line. End with CNTL/Z. SW2(config)# int g0/2 SW2(config-if)# spanning-tree portfast disable SW2(config-if)# end %SYS-5-CONFIG_I: Configured from console by consoleIf you verify the interface again, you’ll see that PortFast is no longer mentioned:
SW2# show spanning-tree interface g0/2 detail Port 3 (GigabitEthernet0/2) of VLAN0001 is designated forwarding Port path cost 4, Port priority 128, Port Identifier 128.3. Designated root has priority 32769, address 50e2.aa04.6b00 Designated bridge has priority 32769, address 50e2.aa04.6b00 Designated port id is 128.3, designated path cost 0 Timers: message age 0, forward delay 0, hold 0 Number of transitions to forwarding state: 1 Link type is point-to-point by default BPDU: sent 124, received 0PortFast is now disabled for this interface.
Method 2 - Enabling PortFast Globally (on access port)
So far, we’ve enabled PortFast on a single interface.
But in most enterprise networks, switch ports are primarily connected to end devices like PCs and printers.
In that case, manually configuring PortFast on every port would be inefficient.The solution is to enable PortFast globally using the command
spanning-tree portfast default.
Figure 5 – Enabling PortFast globally on all access ports
Configuration Steps
1. Enable PortFast Globally on SW2 and SW3:
40 % Complete: you’re making great progress
Unlock the rest of this lesson
If you’d like to continue your CCNA journey, simply create your free account.
Access all CCNA lessons
Practice with hands-on labs
Train with Practice exams and Quizzes
Progress tracking in your dashboard
Made by network engineers - CCNP certified
learners globally
PortFast
Spanning Tree PortFast is designed to eliminate the 30-second delay that normally occurs when a device connects to a switch port. In this lesson, you’ll learn how PortFast gives end devices immediate network access while still keeping the network safe from loops.