portfast and uplinkfast
TRANSCRIPT
-
1 Boson NetSim Lab Manual
SWITCH Lab: PortFast and UplinkFast
ObjectiveCon gure PortFast and UplinkFast. PortFast is an option that allows a switchport to change from blocking to
forwarding immediately upon detection of a link. If PortFast is disabled, it will take up to 60 seconds for the port
to forward. This sometimes causes applications, such as Dynamic Host Con guration Protocol (DHCP), to fail.
P1PC1 and P2PC2 are PC workstations. P1ASW1 and P2ASW2 are Access layer switches. P1DSW1 and
P2DSW2 are Distribution layer switches. The Access and Distribution layers are two of the three layers in the
Cisco three-layer hierarchical network model, which also includes the Core layer.
Lab TopologyThe Topology diagram below represents the NetMap in the Simulator:
P2DSW2
P2ASW2P1ASW1
P1DSW1
P1PC1 P2PC2
VLAN 11 VLAN 12
VLAN 1 172.16.1.10
VLAN 11 172.16.11.10VLAN 1 172.16.1.20
VLAN 12 172.16.12.20
VLAN 1 172.16.1.100
VLAN 11 172.16.11.100VLAN 1 172.16.1.200
VLAN 12 172.16.12.200
Lab ID: 8.8K412A132.SWP.1
-
2 Boson NetSim Lab Manual
Command Summary
Command Description
interface type number changes from global con guration mode to interface con guration
mode
ping ip-address sends an Internet Control Message Protocol (ICMP) echo request
to the speci ed address
show spanning-tree vlan vlan-id shows whether spanning tree is running for a virtual LAN (VLAN)
shutdown; no shutdown disables an interface; enables an interface
spanning-tree portfast enables portfast
spanning-tree uplinkfast sets UplinkFast
switchport access vlan vlan-id assigns the default VLAN for a port
switchport mode {access | dynamic
{auto | desirable} | trunk}
con gures the VLAN membership mode of a port
switchport trunk encapsulation dot1q con gures trunk for 802.1Q encapsulation
Lab Tasks
Task 1: Con gure PortFast and UplinkFast
1. Ping from P1PC1 to P1ASW1 (172.16.11.10). The ping should succeed.
2. On P1ASW1, shut down the FastEthernet 0/5 port, which connects to P1PC1. Wait 5 seconds, and then
re-enable the port. While Spanning Tree Protocol (STP) is recalculating, quickly try another ping from
P1PC1 to P1ASW1. Notice that the ping now fails.
3. Wait about 40 seconds to ensure that STP has nished calculating, and then try the ping again. Does the
ping succeed? ______________________________________________________________________
4. On P1ASW1, enable PortFast on the FastEthernet 0/5 port, which connects to P1PC1.
-
3 Boson NetSim Lab Manual
5. On P1ASW1, disable and enable the FastEthernet 0/5 port. Immediately after enabling the port, try to
ping P1ASW1 from P1PC1. How long does it take for the ping to succeed this time? _______________
6. On P1DSW1, con gure FastEthernet ports 0/1 and 0/2 as trunking ports.
7. Determine which of the ports that connect from P1ASW1 to P1DSW1 are blocking for VLAN 11.
8. Verify that you can ping from P1PC1 to P1DSW1 (172.16.11.100).
9. On P1ASW1, disable the forwarding port for VLAN 11. While STP is recalculating, quickly try another
ping from P1PC1 to P1DSW1 (172.16.11.100). Notice that the ping now fails. How long does STP take to
reconverge? ________________________________________________________________________
10. On P1ASW1, enable UplinkFast port and then enable the FastEthernet 0/1 interface.
11. Verify that you can ping from P1PC1 to P1DSW1 (172.16.11.100).
12. From P1ASW1, disable the forwarding port for VLAN 11. Immediately attempt to ping from P1PC1 to
P1DSW1 (172.16.11.100). How long does STP take to reconverge? ____________________________
13. Re-enable the port. Immediately attempt to ping from P1PC1 to P1DSW1 (172.16.11.100). How long
does STP take to reconverge? _________________________________________________________
-
4 Boson NetSim Lab Manual
Lab Solutions
Task 1: Con gure PortFast and UplinkFast
1. On P1PC1, you should issue the ping 172.16.11.10 command to ping from P1PC1 to P1ASW1. The ping
should be successful.
2. On P1ASW1, you should issue the following commands to shut down the FastEthernet 0/5 port, which
connects to P1PC1:
P1ASW1(config)#interface fastethernet 0/5
P1ASW1(config-if)#shutdown
Wait 5 seconds, and then re-enable the port by issuing the following command:
P1ASW1(config-if)#no shutdown
Now, while STP is recalculating, quickly try another ping from P1PC1 to P1ASW1 by issuing the ping
172.16.11.10 command. Notice that the ping now fails.
3. After waiting about 40 seconds to ensure that STP has nished calculating, you should issue the ping
172.16.11.10 command again. The ping should succeed.
4. On P1ASW1, you should issue the following commands to enable PortFast on the FastEthernet 0/5 port,
which connects to P1PC1:
P1ASW1(config)#interface fastethernet 0/5
P1ASW1(config-if)#spanning-tree portfast
5. On P1ASW1, you should issue the following command to disable the FastEthernet 0/5 port:
P1ASW1(config-if)shutdown
Wait 5 seconds, and then re-enable the port by issuing the following command:
P1ASW1(config-if)no shutdown
After enabling the port, you should issue the ping 172.16.11.10 command from P1PC1 to ping P1ASW1.
The pings should succeed immediately.
6. On P1DSW1, you should issue the following commands to con gure FastEthernet ports 0/1 and 0/2 on
P1DSW1 as trunking ports in VLAN 11:
P1DSW1(config)#interface fastethernet 0/1
P1DSW1(config-if)#switchport trunk encapsulation dot1q
P1DSW1(config-if)#switchport mode trunk
P1DSW1(config-if)#interface fastethernet 0/2
P1DSW1(config-if)#switchport trunk encapsulation dot1q
P1DSW1(config-if)#switchport mode trunk
-
5 Boson NetSim Lab Manual
7. On P1ASW1, you should issue the show spanning-tree vlan 11 command to determine which of the
ports that connect to P1DSW1 are blocking for VLAN 11. Sample output is shown below:
P1ASW1#show spanning-tree vlan 11
VLAN0011
Spanning tree enabled protocol ieee
Root ID Priority 24567
Address 000C.1625.2062
Cost 38
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32768
Address 000C.3378.5283
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300
Uplinkfast enabled
Interface Port ID Designated Port ID
Name Prio.Nbr Cost Sts Cost Bridge ID Prio.Nbr
------------- -------- ------ --- ------- -------------------- --------
Fa0/1 128.1 19 FWD 19 24567 000C.1625.2062 128.1
Fa0/2 128.2 19 BLK 19 24567 000C.1625.2062 128.2
Fa0/3 128.3 19 BLK 38 24567 000C.1625.2062 128.3
Fa0/4 128.4 19 BLK 38 24567 000C.1625.2062 128.4
Fa0/5 128.5 19 FWD 0 32768 000C.3378.5283 0.5
8. On P1PC1, you should issue the ping 172.16.11.100 command to verify that you can ping P1DSW1.
9. From P1ASW1, issue the following commands to disable the forwarding port, which is the FastEthernet
0/1 interface, for VLAN 11:
P1ASW1(config)#interface fastethernet 0/1
P1ASW1(config-if)#shutdown
While STP is recalculating, you should issue the ping 172.16.11.100 command quickly to try another
ping from P1PC1 to P1DSW1. The ping should fail initially. Continue to issue the ping until it succeeds so
that you can observe how long it takes for Spanning Tree Protocol to reconverge. It should take about 30
seconds for STP to reconverge.
10. On P1ASW1, you should issue the following commands to globally enable UplinkFast and to enable the
FastEthernet 0/1 interface:
P1ASW1(config)#spanning-tree uplinkfast
P1ASW1(config)#interface fastethernet 0/1
P1ASW1(config-if)#no shutdown
11. On P1PC1, you should issue the ping 172.16.11.100 command to verify that you can ping P1DSW1.
-
6 Boson NetSim Lab Manual
12. From P1ASW1, you should issue the following commands to disable the forwarding port for VLAN:
P1ASW1(config)#interface fastethernet 0/1
P1ASW1(config-if)shutdown
On P1PC1, immediately issue the ping 172.16.11.100 command to attempt to ping P1DSW1. Observe
how long it takes for STP to reconverge. Convergence should occur immediately.
13. You should issue the following commands to re-enable the port.
P1ASW1(config)#interface fastethernet 0/1
P1ASW1(config-if)#no shutdown
On P1PC1, immediately issue the ping 172.16.11.100 command to attempt to ping P1DSW1. Observe
how long it takes for STP to reconverge. Convergence should occur immediately.
-
7 Boson NetSim Lab Manual
Sample Con guration Scripts
P1ASW1 P1ASW1 (continued)
P1ASW1#show running-config
!
Version 12.3
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname P1ASW1
ip cef
!
ip subnet-zero
spanning-tree uplinkfast
spanning-tree extend system-id
!
interface FastEthernet0/1
description P1ASW1 to P1DSW1
switchport mode trunk
!
interface FastEthernet0/2
description P1ASW1 to P1DSW1
switchport mode trunk
!
interface FastEthernet0/3
description P1ASW1 to P2DSW2
switchport mode trunk
!
interface FastEthernet0/4
description P1ASW1 to P2DSW2
switchport mode trunk
!
interface FastEthernet0/5
description P1PC1 to P1ASW1
switchport mode access
switchport access vlan 11
spanning-tree portfast
!
interface FastEthernet0/6
switchport mode dynamic desirable
!
interface FastEthernet0/7
switchport mode dynamic desirable
!
interface FastEthernet0/8
switchport mode dynamic desirable
!
interface FastEthernet0/9
switchport mode dynamic desirable
!
interface FastEthernet0/10
switchport mode dynamic desirable
!
interface FastEthernet0/11
switchport mode dynamic desirable
!
interface FastEthernet0/12
switchport mode dynamic desirable
!
interface Vlan 1
ip address 172.16.1.10 255.255.255.0
no ip route-cache
!
interface Vlan0011
ip address 172.16.11.10 255.255.255.0
no ip route-cache
!
vlan 11 name 11
vlan 12 name 12
!
ip default-gateway 172.16.1.100
!
ip classless
no ip http server
!
line con 0
line aux 0
line vty 0 15
!
no scheduler allocate
end
-
8 Boson NetSim Lab Manual
Sample Con guration Scripts
P1DSW1 P1DSW1 (continued)
P1DSW1#show running-config
!
Version 12.3
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname P1DSW1
ip cef
!
ip subnet-zero
spanning-tree vlan 1 priority 24567
spanning-tree extend system-id
!
interface FastEthernet0/1
description P1DSW1 to P1ASW1
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface FastEthernet0/2
description P1DSW1 to P1ASW1
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface FastEthernet0/3
description P1DSW1 to P2ASW2
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface FastEthernet0/4
description P1DSW1 to P2ASW2
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
description P1DSW1 to P2DSW2
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface FastEthernet0/12
description P1DSW1 to P2DSW2
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface Vlan 1
ip address 172.16.1.100 255.255.255.0
no ip route-cache
!
interface Vlan0011
ip address 172.16.11.100 255.255.255.0
no ip route-cache
!
vlan 11 name 11
vlan 12 name 12
!
ip classless
no ip http server
!
line con 0
line aux 0
line vty 0 4
!
no scheduler allocate
end
Copyright 19962012 Boson Software, LLC. All rights reserved. NetSim software and documentation are protected by copyright law.