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.
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.
Step 2
Now, drag and drop three L2 Switches that you added to the program before to your workspace.
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.
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.
Step 5
Naturally, Ping between VPCS computers failed. Now reconnect the PC2 to SW1 and check the status in the next step.
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!
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
Step 8
Let’s test this feature at this stage. I ping the PC2 again from the Lenovo PC in my topology.
Step 9
Similarly, I disconnect SW1 from the PC2 again.
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.
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.
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!
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.
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.
PortFast Show Commands
1) show spanning-tree
2) show spanning-tree detail
3) show running-config
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
- How to install PortFast?
- What are the recommended PortFast configurations?
- When should I enable PortFast?
- Can I turn PortFast on the access port?
- Can I use this on the trunk port?
- How can I prevent loops?
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.