How to Configure PortFast on Cisco Switch in Cisco Packet Tracer

When configuring the Spanning Tree protocol on Cisco Switches, you can achieve performance improvements by excluding client computers or servers from the STP convergence process.

How to Configure PortFast on Cisco Switch in Cisco Packet Tracer

How to Enable PortFast on Cisco Switch

The basic logic of using PortFast on switches is to save a server at the endpoint from 50 seconds downtime without STP convergence. The server must be online and available at all times. Otherwise, downtime for a server will be the worst factor.

We configure the Spanning Tree Protocol to prevent loops that may occur when configuring Switches in Layer 2. When using the Standard Spanning Tree Protocol (802.1d), we enable PortFast, UplinkFast, and BackboneFast to improve network performance.

In this article, we will configure PortFast on Switches in a redundant network using Packet Tracer.

How to Enable PortFast

First, create a network topology as in Step 1 in the Cisco Packet Tracer.

   Step 1

For clarity, you can add comments on the network topology. For example; The LenovoPC IP address is 192.168.1.10 and the Web Server is 192.168.1.100.

A Network Topology with Four Cisco Switches

In the network topology above, you can see that the Switches have redundant paths and also the Root Bridge based on the Priority value of SW1.

   Step 2

In addition, the network topology includes a client computer called LenovoPC and an HTTP server. A record is entered for cisco.com in DNS settings on HTTP Server. You can do this as in the following image;

DNS Configuration in Packet Tracer

   Step 3

Ping from LenovoPC to cisco.com and then try to access the site by typing www.cisco.com from the Web Browser.

Pinging Website

   Step 4

We tested the Web Server up to this step!

The network connection from LenovoPC to the Web Server must always be active, so you must enable PortFast on the FastEthernet 0/10 interfaces on SW2 and SW4 to enable STP Convergence to occur quickly when a cable error occurs on the network.

Since PortFast is enabled in the SW4 FastEthernet 0/10 interface, data transfer will continue even if there is a cable error and as a result, the connection between the client and the server will not be disconnected.

The only point to note here is that we evaluate the Standard Spanning Tree Protocol in this post. If we enabled Rapid STP protocol by considering this network topology, UplinkFast would be enabled automatically. Because the RST protocol combines PortFast, UplinkFast, and BackboneFast.

UplinkFast is enabled by default in the Rapid STP version.

SW2 Config

SW2# conf t
SW2(config)# interface fastethernet 0/10
SW2(config-if)# spanning-tree portfast
SW2(config-if)# end

 
Port-Fast Activation

SW4 Config

SW4# conf t
SW4(config)# interface fastethernet 0/10
SW4(config-if)# spanning-tree portfast
SW4(config-if)# end

 
SW4'ü Yapılandırma

When you enable PortFast, you’ll see a warning like the one above, telling you where to use this feature.

Show Commands

SW2#show running-config
Building configuration...

Current configuration : 1097 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname SW2
!
spanning-tree mode pvst
spanning-tree extend system-id
!
interface FastEthernet0/1
!
interface FastEthernet0/2
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
spanning-tree portfast
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface Vlan1
no ip address
shutdown
!
line con 0
!
line vty 0 4
login
line vty 5 15
login
!
end
SW2#

 

SW4#show running-config
Building configuration...

Current configuration : 1097 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname SW4
!
spanning-tree mode pvst
spanning-tree extend system-id
!
interface FastEthernet0/1
!
interface FastEthernet0/2
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
spanning-tree portfast
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface Vlan1
no ip address
shutdown
!
line con 0
!
line vty 0 4
login
line vty 5 15
login
!
end
SW4#

 

SW2#show spanning-tree
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 4097
Address 0001.969B.9621
Cost 4
Port 26(GigabitEthernet0/2)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 00D0.5865.9D80
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20

Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Gi0/1 Desg FWD 4 128.25 P2p
Gi0/2 Root FWD 4 128.26 P2p
Fa0/24 Desg FWD 19 128.24 P2p
Fa0/10 Desg FWD 19 128.10 P2p

SW2#

 

SW4#show spanning-tree
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 4097
Address 0001.969B.9621
Cost 4
Port 25(GigabitEthernet0/1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 00D0.D343.A8E0
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20

Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/10 Desg FWD 19 128.10 P2p
Fa0/24 Altn BLK 19 128.24 P2p
Gi0/1 Root FWD 4 128.25 P2p
Gi0/2 Desg FWD 4 128.26 P2p

SW4#

 

SW2#show spanning-tree detail
VLAN0001 is executing the ieee compatible Spanning Tree Protocol
Bridge Identifier has priority of 32768, sysid 1, 00D0.5865.9D80
Configured hello time 2, max age 20, forward delay 15
Current root has priority 4097
Root port is 26 (GigabitEthernet0/2), cost of root path is 4
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 10 (FastEthernet0/10) of VLAN0001 is designated forwarding
Port path cost 19, Port priority 128, Port Identifier 128.10
Designated root has priority 128, address 00D0.BCB2.001A
Designated bridge has priority 4097, address 0001.969B.9621
Designated port id is 128.10, 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 24 (FastEthernet0/24) of VLAN0001 is designated forwarding
Port path cost 19, Port priority 128, Port Identifier 128.24
Designated root has priority 128, address 00D0.BCB2.001A
Designated bridge has priority 4097, address 0001.969B.9621
Designated port id is 128.24, 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 25 (GigabitEthernet0/1) of VLAN0001 is designated forwarding
Port path cost 4, Port priority 128, Port Identifier 128.25
Designated root has priority 128, address 00D0.BCB2.001A
Designated bridge has priority 4097, address 0001.969B.9621
Designated port id is 128.25, designated path cost 4
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 26 (GigabitEthernet0/2) of VLAN0001 is root forwarding
Port path cost 4, Port priority 128, Port Identifier 128.26
Designated root has priority 128, address 00D0.BCB2.001A
Designated bridge has priority 4097, address 0001.969B.9621
Timers: message age 16, forward delay 0, hold 0
Number of transitions to forwarding state: 1
Link type is point-to-point by default
SW2#

 

SW4#show spanning-tree detail

VLAN0001 is executing the ieee compatible Spanning Tree Protocol
Bridge Identifier has priority of 32768, sysid 1, 00D0.D343.A8E0
Configured hello time 2, max age 20, forward delay 15
Current root has priority 4097
Root port is 25 (GigabitEthernet0/1), cost of root path is 4
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 10 (FastEthernet0/10) of VLAN0001 is designated forwarding
Port path cost 19, Port priority 128, Port Identifier 128.10
Designated root has priority 128, address 0030.F2D5.1C19
Designated bridge has priority 4097, address 0001.969B.9621
Designated port id is 128.10, 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 24 (FastEthernet0/24) of VLAN0001 is alternate blocking
Port path cost 19, Port priority 128, Port Identifier 128.24
Designated root has priority 128, address 0030.F2D5.1C19
Designated bridge has priority 4097, address 0001.969B.9621
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 25 (GigabitEthernet0/1) of VLAN0001 is root forwarding
Port path cost 4, Port priority 128, Port Identifier 128.25
Designated root has priority 128, address 0030.F2D5.1C19
Designated bridge has priority 4097, address 0001.969B.9621
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 26 (GigabitEthernet0/2) of VLAN0001 is designated forwarding
Port path cost 4, Port priority 128, Port Identifier 128.26
Designated root has priority 128, address 0030.F2D5.1C19
Designated bridge has priority 4097, address 0001.969B.9621
Designated port id is 128.26, designated path cost 4
Timers: message age 16, forward delay 0, hold 0
Number of transitions to forwarding state: 1
Link type is point-to-point by default
SW4#

 
   Video

You can watch the video below to use PortFast on switches, and also subscribe to our YouTube channel to support us!

   Final Word


In this article, we have examined how to configure PortFast on Switches with network simulator software. You can better understand when you disconnect and reconnect the network cable of the client or server to test this feature. Thanks for following us!

   Related Articles


VLAN Configuration
VLAN Routing
Port Security
IOS Recovery
Copying IOS

Add a Comment

Your email address will not be published. Required fields are marked *

You cannot copy content of this page