Tasks:
Download Solved Lab
Solution:
PCs today don't take a lot of time to boot up. Spanning tree protocol normally takes 30 seconds to converge and forward traffic on the network. So if Spanning tree in enabled at a switch on access port, it might not be possible for a device to get IP Address from DHCP server. PortFast causes a switch or trunk port to enter the spanning tree forwarding state immediately, bypassing the listening and learning states. Work around this problem is to enable Port Fast in the access port of the switch so that STP Forwarding state is immediately applied.
But there is a downside to this approach. If a switch is connected at an access port it might create a loop in the network.
Following are the commands to configure Port Fast at ports gigabitEthernet 1/0/1 to 1/0/3
Switch>
Switch>en
Switch#config t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#interface range gigabitEthernet 1/0/1 -3
Switch(config-if-range)#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 GigabitEthernet1/0/1 but will only
have effect when the interface is in a non-trunking mode.
%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 GigabitEthernet1/0/2 but will only
have effect when the interface is in a non-trunking mode.
%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 GigabitEthernet1/0/3 but will only
have effect when the interface is in a non-trunking mode.
Switch(config-if-range)#
Switch(config-if-range)#exit
Switch(config)#
Switch(config)#exit
Switch#
%SYS-5-CONFIG_I: Configured from console by console
Switch#
Now if we perform a power cycle, we see that switch ports are turned in forwarding state immediately.