How to Enable and Congure PortFast on Cisco Switch in GNS3

Today, lots of companies use computer networks a whole bunch. The folks who manage these LANs have to make sure they’re fast, dependable, and safe. One way to do this is by setting up switches with the Spanning Tree Protocol (STP).

When a switch port breaks and causes STP to stop working, it can be a big issue. PortFast helps fix this. In this guide, we’ll explain how to enable and configure PortFast on a Layer 2 switch using GNS3.

Configuring and Enabling PortFast

How to Configure & Enable PortFast on Layer 2 Switch with GNS3

To set up Spanning Tree Protocol on networks with backups, you need to configure interfaces. For servers or printers connected to the Switch, enable PortFast.

Setting up the fast-forwarding port is super important when you’re working with the STP protocol.

So, in LANs with backups, you have to adjust the Switch ports if a port or connection fails. At this time, you have to specify the interfaces that you don’t want to be part of the STP Convergence process.

In a company, the Hosting Server needs to keep running without any breaks. So, it shouldn’t cause any interruptions for its users. Even a short pause of one minute can mess up work and make things less productive. So, it’s super important to keep a steady connection for everything to work smoothly.

In networks using Cisco Switches, the connection to the Server should be set to Forwarding mode. So, it makes data move quickly without waiting for STP Convergence.

Let’s say you still need to configure the PortFast for the critical Server. In this case, the Server will time out for 50 seconds. Thus, it would be unacceptable to the firm’s customers.

We’ve already talked about how Spanning Tree works and the Root Bridge configuration. Now, let’s turn it on for necessary PC’ connections.

How to Enable PortFast on Cisco Switches

To turn it on in your L2 Switches in a small LAN using GNS3, follow these easy steps. In short, enabling it makes sure your network runs smoothly.

Steps:

Step 1

First, can you open the GNS3 simulator app on your device? Once it’s open, please make a new project in the simulator.

Creating a New Project for PortFast in GNS3

Step 2

Now, drag and drop three L2 Switches that you added to the program before to your workspace.

Creating a GNS3 Network Topology

Step 3

In the network topology below, I use VPCS computers instead of VMs. First, make the TCP/IP settings for VPCS devices. Then, test the connection by pinging the device with IP address 192.168.5.10 from the CLI screen.

In this topology, I named one of the VPCS, Lenovo PC1, and the other HP PC2. Thus, be clear of their names. As an extra, you can use continuous ping while testing the LAN connection between them. To do this, add -t to the end of the ping command.

Continuous Pinging from VPCS PC

Step 4

Once you start the continuous ping, disconnect the cable connected to the L2-SW-1 GigabitEthernet 0/2 interface. Then, go back to the CLI prompt to recheck the ping.

Disconnecting the Network Cable Between the Switch and the Computer

Step 5

Naturally, Ping between VPCS computers failed. Now reconnect the PC2 to SW1 and check the status in the next step.

Ping Timeout Error

Step 6

When you connect the PC2 to the Switch again, the SW1 Gig0/2 interface will not switch to Forwarding Mode directly. In this case, the downtime will be 50 seconds, as you can see in the ping output.

That’s why you may want the PC2 to join the LAN faster. Thus, we must enable PortFast on Switches to prevent such an interruption.

Thanks to this forwarding port, we can reduce this 50-second LAN outage to 1 second!

Ping Downtime Before FortFast Activation

Step 7

Now, let’s configure the fast-forwarding port on SW1. First, open the CLI screen and enable this feature on the port you connected to SW1 of the PC2.

SW1# conf t
SW1(config)# interface gigabitethernet 0/2
SW1(config-if)# spanning-tree portfast
SW1(config-if)# end

Enabling PortFast on Cisco Switch

Step 8

Let’s test this feature at this stage. I ping the PC2 again from the Lenovo PC in my topology.

Pinging HP PC from Lenovo PC

Step 9

Similarly, I disconnect SW1 from the PC2 again.

Disconnecting the Network Cable from the HP PC

Step 10

When we unplug the VPCS from the network, we’ll see a Timeout message. We usually see this when there’s a problem with the network cable.

Ping Error

Step 11

When I reconnect the HP PC2 and SW1, the timeout will be different this time. We set PortFast on the port of SW1 to go to VPCS. As a result, this port will immediately enter the forwarding port.

Reviewing Forwarding Mode After Enabling PortFast

Step 12

This time, you will notice a 1-second delay in the continuous ping test from PC1 to PC2. In short, if the PC2 had a server onsite, we would have connected it to the network faster!

Pinging the PC is Successful Again

How to Verify PortFast

You should check the Switch settings to make sure you PortFast correctly. Thus, it would be best if you verified that you have turned this feature on for the correct ports.

Step 1

First, get into the special mode on the Cisco Switch SW1. Then, type the show spanning-tree command. When you look at the results, you’ll see that the SW1 GigabitEthernet 0/2 port is Edge.

Using the show spanning-tree command on the Cisco Switch

Step 2

Now, apply the show running-config command to SW1’s CLI. This time, you will see that there is PortFast in the GigabitEthernet 0/2 port settings.

Executing the show running-config command on the switch

PortFast Show Commands

1) show spanning-tree

Running show spanning-tree command on SW1

2) show spanning-tree detail

Running show spanning-tree detail command on SW1

3) show running-config

Running show running-config command on SW1

How to Enable PortFast using GNS3 ⇒ Video

To set up the fast-forwarding feature, check out the how-to video below. Specially, it gives easy-to-follow instructions. If it helps, you can also subscribe to our YouTube channel.

Frequently Asked Questions (FAQ) About PortFast Configuration

  1. How to install PortFast?
Cisco’s Switches’ fast-forwarding feature enables instantaneous forwarding of packets. So, to set this up on a network device, first enter configuration mode. Then, go to the specific port settings. Finally, enter the spanning-tree portfast command on the relevant port and press Enter. That’s it! Also, note that you will only use it for devices in access mode. So, do not install this on ports from Switch to Switch or Router.
  1. What are the recommended PortFast configurations?
I recommend configuring this on all access ports for efficient performance. Additionally, enable BPDU Guard on ports with this configuration.
  1. When should I enable PortFast?
Enable this feature for devices such as desktop or laptop computers, printers, or IP phones. In particular, set it on Ethernet interfaces connecting to end devices on Switches. This way, you don’t add these devices to STP convergence. Therefore, you can provide faster network connections for these devices.
  1. Can I turn PortFast on the access port?
Of course, you can use the fast-forwarding feature on Access ports. It is convenient because we usually connect PCs to these interfaces.
  1. Can I use this on the trunk port?
You should definitely not use this feature on trunk ports because these ports carry VLAN traffic. If you use it, you can create a loop.
  1. How can I prevent loops?
Use the BPDU Guard to prevent loops when you use the forwarding mode. Thus, by turning off the port if it receives any BPDUs, you avoid the possibility of a Switch connecting.

Conclusion

To summarize, PortFast, which is only on Cisco Switches, helps keep LAN connections stable. Specifically, they designated this to make sure LAN links stay smooth.

Unlike other brands, Cisco has built this feature to make connections smooth. This means delays and interruptions during connection are gone.

In short, it lets devices join the LAN right away, making things faster. As a result, it eliminates the need to wait around, which makes the network work a whole lot better.

Add a Comment

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