Você está na página 1de 17

Introduction

The Advanced Spanning-tree module provides you with the instructions and Cisco hardware to
develop your hands on skills in configuring advanced spanning-tree including RSTP and MST. This
module includes the following exercises:

1) Rapid Spanning-tree (RSTP)

2) Configuring the Multiple Spanning-Tree Protocol (MST)

Lab Diagram
During your session you will have access to the following lab configuration. Depending on the
exercises you may or may not use all of the devices, but they are shown here in the layout to get an
overall understanding of the topology of the lab.

Internet

ISP1 ISP2
172.14.0.3/24 172.14.0.4/24

Frame-Relay
WAN NYEDGE1 NYEDGE2
Gi0/1 Gi0/1 Cisco
Cisco
2911 Router Ser0/0/0 2911 Router
LDNWAN1
Ser0/0/0
Ser0/0/1

Ser0/0/1
Gi0/0 Ser0/0/1 Gi0/0

Ser0/1/1
Ser0/0/0 Ser0/1/0
Fas1/0/1 Fas1/0/1
Gi0/1 Gi0/0 Fas1/0/2 Fas1/0/12
172.16.16.0/24 Fas1/0/23

NYWAN1 Fas1/0/24 Cisco


Cisco NYCORE1 Fas1/0/22 Fas1/0/22 NYCORE2 IP Phone
NWRKWAN1 Cisco 3750v2-24PS Cisco 3750v2-24PS
2911 Router
Switch Switch

Fas0/24 Fas0/23
PLABCSCO01 NYACCESS1
Cisco Tools Server Lab Nic Fas0/1 Cisco 2960-24
192.168.16.10/24 Switch

Connecting to your lab


In this module you will be working on the following equipment to carry out the steps defined in each
exercise.
NYCORE1
NYCORE2
NYACCESS1

Each exercise will detail which terminal you are required to work on to carry out the steps.

During the boot up process an activity indicator will be displayed in the device name tab:

Black - Powered Off


Orange - Working on your request
Green - Ready to access

If the remote terminal is not displayed automatically in the main window (or popup) click the
Connect icon located in the tools bar to start your session.

Copyright Notice
This document and its content is copyright of Practice-IT - Practice-IT 2014. All rights reserved.
Any redistribution or reproduction of part or all of the contents in any form is prohibited other than
the following:

1) You may print or download to a local hard disk extracts for your personal and non-commercial use
only.

2) You may copy the content to individual third parties for their personal use, but only if you
acknowledge the website as the source of the material. You may not, except with our express
written permission, distribute or commercially exploit the content. Nor may you transmit it or store
it in any other website or other form of electronic retrieval system.
Exercise 1 Rapid Spanning-tree
(RSTP)
In this exercise you will learn how to configure the rapid spanning-tree protocol. Please refer to your
course material or use your preferred search engine to gain an understanding of these tasks.

Rapid Spanning-tree protocol


By default a Cisco switch will run PVST+ (or per-VLAN spanning-tree plus) and needs to be configured
to run any other spanning-tree protocol. Configuring other spanning-tree methods is sometimes a
little confusing, but in this module youll learn how to configure a few of these methods.

Confirming the spanning-tree protocol


First lets confirm the default spanning-tree protocol. This is a simple process, and as always, ensure
the 3 switches in the lab have powered on.

Step 1
On NYCORE1, use the following command to determine the default protocol:

show spanning-tree vlan 1

Output from this command:

NYCORE1#show spanning-tree vlan 1

VLAN0001

Spanning tree enabled protocol ieee

If you view the running configuration you can confirm this is PVST:

NYCORE1#sh run | inc spanning-tree mode

spanning-tree mode pvst

You can see that in the output above, the protocol running out of the box is IEEE/PVST.

Changing to RSTP
Next we will configure rapid spanning tree with a simple command:

Step 1
Use the following command enable RSTP:

spanning-tree mode rapid-pvst


Output from this command:

NYCORE1#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

NYCORE1(config)#spanning-tree mode rapid-pvst

*Mar 1 00:06:36.017: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1,


changed state to down

*Mar 1 00:06:37.494: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1,


changed state to up

Step 2
To confirm the change, use the command you learnt previously:

NYCORE1#show spanning-tree vlan 1

VLAN0001

Spanning tree enabled protocol rstp

Root ID Priority 32769

Address 0017.5a7b.4400

Cost 19

Port 25 (FastEthernet1/0/23)

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)

Address 0024.514b.0800

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Aging Time 300 sec

Interface Role Sts Cost Prio.Nbr Type

------------------- ---- --- --------- -------- --------------------------------

Fa1/0/2 Desg FWD 19 128.4 P2p

Fa1/0/23 Root FWD 19 128.25 P2p Peer(STP)

Fa1/0/24 Altn BLK 19 128.26 P2p Peer(STP)

As you can see the protocol running is now RSTP.

You can also see that in this output, the switch has detected its peers that are running traditional
STP. This is indicated by the p2p Peer(STP) (or Type column) at the bottom.
Have a look at the output on NYCORE2 using the same command:

NYCORE2#show spanning-tree vlan 1

VLAN0001

Spanning tree enabled protocol ieee

Root ID Priority 32769

Address 0017.5a7b.4400

This bridge is the root

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)

Address 0017.5a7b.4400

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Aging Time 300 sec

Interface Role Sts Cost Prio.Nbr Type

------------------- ---- --- --------- -------- --------------------------------

Fa1/0/12 Desg FWD 19 128.18 P2p

Fa1/0/23 Desg FWD 19 128.25 P2p

Fa1/0/24 Desg FWD 19 128.26 P2p

You can see that the type is p2p.

Configuring Link Types for RSTP


Next well configure the various link types in RSTP.

Configuring an Edge Port


Step 1
Ports that are connected to hosts and not other switches on NYCORE1 are interfaces fastethernet
1/0/1 through 1/0/21. Configure these as edge ports using the following command:

interface range fastethernet 1/0/1 - 21

spanning-tree portfast

NYCORE1#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

NYCORE1(config)#interface range fastethernet 1/0/1 - 21

NYCORE1(config-if-range)#spanning-tree portfast
When configuring you may receive this message:

%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 FastEthernet1/0/21 but will only

have effect when the interface is in a non-trunking mode.

Of course this can be safely ignored providing you are 100% sure that the connections on these
interfaces are indeed hosts and not other switches.

There is an IP Phone connected to Fas1/0/12 on NYCORE2, observe the output for the show
spanning-tree command on this interface. The Type field changes for this interface:

NYCORE2#show spanning-tree vlan 1

VLAN0001

Spanning tree enabled protocol rstp

Interface Role Sts Cost Prio.Nbr Type

------------------- ---- --- --------- -------- --------------------------------

Fa1/0/2 Desg FWD 19 128.4 P2p Edge

Fa1/0/12 Desg FWD 19 128.18 P2p Edge

(Some output has been omitted)

Configuring a point-to-point link


In contrast to the edge port, a point to point link is determined by default if the interface is running
in full-duplex operation, a little presumptuous in networks these days. To override the setting you
can use the following command.

Step 1
Configure the interfaces fas 1/0/12 as a p2p link:

interface fastethernet 1/0/12

spanning-tree link-type point-to-point

NYCORE2#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.

NYCORE2(config)#interface fastethernet 1/0/12

NYCORE2(config-if)#spanning-tree link-type point-to-point

Leave the devices powered on and continue to the next exercise.


Exercise 2 Configuring the Multiple
Spanning-Tree Protocol (MST)
In this exercise you will learn how to configure the Multiple Spanning Tree Protocol (MST). Please
refer to your course material or use your preferred search engine to gain an understanding of these
tasks.

Multiple Spanning Tree


As you would have learnt in your course material, spanning-tree 802.1Q and PVST+ are at the
extremes of spanning-tree. At the one side you have a single spanning-tree instance running on a
switch and at the other you have an instance running for every VLAN, regardless if it is 10 or 100.
Both of these protocols have their flaws, which is why MST was developed.

In this configuration example we will configure the links between NYCORE1 and NYCORE2 to have
their VLANs load balanced to utilise both links simultaneously.

Our design goal will be to run a group of VLANs over the connection on interface fas 1/0/23 and a
group on the interface fas 1/0/24. You could of course use EtherChannel to achieve load balancing,
however there may be a reason you wouldnt want to use EtherChannel and need to use VLAN load
balancing using MST.

Creating the Base configuration


The first step is to create some VLANs, a VTP domain and some trunk links. Use the following
configuration information to build your configs. All of these commands you will have previously
learnt:

Step 1
NYCORE1

VLANs:

10 InformationTech

20 Marketing

30 Sales

40 HumanResources

VTP:

VTP Domain: practicelabs

Script on NYCORE1:

NYCORE1#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.


NYCORE1(config)#vlan 10

NYCORE1(config-vlan)#name InformationTech

NYCORE1(config-vlan)#vlan 20

NYCORE1(config-vlan)#name Marketing

NYCORE1(config-vlan)#vlan 30

NYCORE1(config-vlan)#name Sales

NYCORE1(config-vlan)#vlan 40

NYCORE1(config-vlan)#name HumanResources

NYCORE1(config-vlan)#exit

NYCORE1(config)#vtp domain practicelabs

Changing VTP domain name from NULL to practicelabs

NYCORE1(config)#

Trunking:

Trunk encapsulation 802.1q, and trunking mode set to on for interfaces fas1/0/23 and 1/0/24

Allowed VLANs on trunk:

Fas 1/0/23: ODD VLANs (10, 30)

Fas 1/0/24: EVEN VLANs (20, 40)

NYCORE1#conf t

Enter configuration commands, one per line. End with CNTL/Z.

NYCORE1(config)#int range fas 1/0/23-24

NYCORE1(config-if-range)#switchport trunk encapsulation dot1q

NYCORE1(config-if-range)#switchport mode trunk

NYCORE1(config-if-range)#interface fas 1/0/23

NYCORE1(config-if)#switchport trunk allowed vlan none

NYCORE1(config-if)#switchport trunk allowed vlan add 10,30

NYCORE1(config-if)#interface fas 1/0/24

NYCORE1(config-if)#switchport trunk allowed vlan none

NYCORE1(config-if)#switchport trunk allowed vlan add 20,40


NYCORE2

Same settings as NYCORE1, except you will not need to create the VLANs if you configure the switch
to be in vtp domain practicelabs.

Once you have made the configuration changes, you should have all the VLANs on NYCORE1 and
NYCORE2 and the trunks should be up.

NYCORE2#show int trunk

Port Mode Encapsulation Status Native vlan

Fa1/0/23 auto n-802.1q trunking 1

Fa1/0/24 auto n-802.1q trunking 1

Port Vlans allowed on trunk

Fa1/0/23 10,30

Fa1/0/24 20,40

Port Vlans allowed and active in management domain

Fa1/0/23 10,30

Fa1/0/24 20,40

Port Vlans in spanning tree forwarding state and not pruned

Fa1/0/23 10,30

Fa1/0/24 20,40

Configuring MST
Next we will make the configuration changes to run MSTP.

This is a simple task to achieve in the lab, but will require some thought in a production
environment. As were only concerned with a small number of VLANs and a small number of
switches and redundancy our configuration will be straight forward.

Step 1
First ensure NYCORE1 is the root for VLANs 10 and 30 that you previously created:

spanning-tree vlan 10,30 root primary

Ensure NYCORE2 is the root for VLANs 20 and 40 that you previously created:

spanning-tree vlan 20,40 root primary


Ensure the links to NYACCESS1 on both NYCORE1 and NYCORE2 are shutdown as these will break our
configuration:

interface fas 1/0/22

shutdown

Next lets configure NYCORE1:

spanning-tree mode mst

spanning-tree mst configuration

name CORE

revision 1

Sript output for NYCORE1:

NYCORE1#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

NYCORE1(config)#spanning-tree mode mst

NYCORE1(config)#spanning-tree mst configuration

NYCORE1(config-mst)#name CORE

NYCORE1(config-mst)#revision 1

Step 2
Next we need to configure our MST instances:

instance 1 vlan 10,30

instance 2 vlan 20,40

Script output for NYCORE1:

NYCORE1#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

NYCORE1(config)#spanning-tree mst configuration

NYCORE1(config-mst)#instance 1 vlan 10,30

NYCORE1(config-mst)#instance 2 vlan 20,40


Step 3
Make the same configuration changes to NYCORE2 that you did to NYCORE1.

NYCORE2#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

NYCORE2(config)#spanning-tree mode mst

NYCORE2(config)#spanning-tree mst configuration

NYCORE2(config-mst)#name CORE

NYCORE2(config-mst)#revision 1

NYCORE2(config-mst)#instance 1 vlan 10,30

NYCORE2(config-mst)#instance 2 vlan 20,40

Providing everything is configured correctly, you should find that fas 1/0/23 and 1/0/24 are both in
non-blocking states for VLANs 10, 20, 30 and 40. You will also notice that there is a block! This is for
MST0 which is running VLAN 1 only.

NYCORE1#show spanning-tree int fas 1/0/23

Mst Instance Role Sts Cost Prio.Nbr Type

------------------- ---- --- --------- -------- --------------------------------

MST0 Root FWD 200000 128.25 P2p

MST1 Root FWD 200000 128.25 P2p

NYCORE1#show spanning-tree int fas 1/0/24

Mst Instance Role Sts Cost Prio.Nbr Type

------------------- ---- --- --------- -------- --------------------------------

MST0 Altn BLK 200000 128.26 P2p

MST2 Root FWD 200000 128.26 P2p

Step 4
You can use the show pending command under the spanning-tree mst configuration mode to view
the mst configuration:

configure terminal

spanning-tree mst configuration

show pending
Script output on NYCORE1:

NYCORE1#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

NYCORE1(config)#spanning-tree mst configuration

NYCORE1(config-mst)#show pending

Pending MST configuration

Name [CORE]

Revision 1 Instances configured 3

Instance Vlans mapped

-------- ---------------------------------------------------------------------

0 1-9,11-19,21-29,31-39,41-4094

1 10,30

2 20,40

-------------------------------------------------------------------------------

NYCORE1(config-mst)#

Setting the root bridge in MST


To configure the root bridges in MST, you will need to set the root under the mst configuration. Be
aware that setting the root is specific to an entire MST region.

Step 1
Use the following commands to set the root bridge for all the VLANs in region 1 to be on NYCORE1:

spanning-tree mst 1 root primary

Script output for NYCORE1:

NYCORE1#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

NYCORE1(config)#spanning-tree mst 1 root primary

Step 2
To configure NYCORE2 as the root for the odd VLANs:

spanning-tree mst 2 root primary


Viewing the changes on NYCORE1 and 2:

NYCORE1#show spanning-tree vlan 10

MST1

Spanning tree enabled protocol mstp

Root ID Priority 24577

Address 0024.514b.0800

This bridge is the root

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 24577 (priority 24576 sys-id-ext 1)

Address 0024.514b.0800

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Interface Role Sts Cost Prio.Nbr Type

------------------- ---- --- --------- -------- --------------------------------

Fa1/0/23 Desg FWD 200000 128.25 P2p

And VLAN 20:

NYCORE1#show spanning-tree vlan 20

MST2

Spanning tree enabled protocol mstp

Root ID Priority 24578

Address 0017.5a7b.4400

Cost 200000

Port 26 (FastEthernet1/0/24)

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32770 (priority 32768 sys-id-ext 2)

Address 0024.514b.0800

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Interface Role Sts Cost Prio.Nbr Type

------------------- ---- --- --------- -------- --------------------------------

Fa1/0/24 Root FWD 200000 128.26 P2p


NYCORE2:

NYCORE2#show spanning-tree vlan 10

MST1

Spanning tree enabled protocol mstp

Root ID Priority 24577

Address 0024.514b.0800

Cost 200000

Port 25 (FastEthernet1/0/23)

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)

Address 0017.5a7b.4400

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Interface Role Sts Cost Prio.Nbr Type

------------------- ---- --- --------- -------- --------------------------------

Fa1/0/23 Root FWD 200000 128.25 P2p

VLAN 20:

NYCORE2#show spanning-tree vlan 20

MST2

Spanning tree enabled protocol mstp

Root ID Priority 24578

Address 0017.5a7b.4400

This bridge is the root

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 24578 (priority 24576 sys-id-ext 2)

Address 0017.5a7b.4400

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Interface Role Sts Cost Prio.Nbr Type

------------------- ---- --- --------- -------- --------------------------------

Fa1/0/24 Desg FWD 200000 128.26 P2p


As you can see from the outputs that the roots have been set for each MST instance.
Summary
In this module you achieved the following activities:

You configured RSTP and learnt how a switch with its neighbors when running in this mode.
You learnt how to configure different RSTP link types.
You learnt how to configure MST and configured multiple instances.
You learnt how to tune the root bridges in MST.

Also Try
Using your lab infrastructure you can attempt the following topics at your own pace, these are
additional tasks that can be done building on what you have learnt in this module:

Change the MST timers for hello, forward and max age to be the smallest values possible.

Você também pode gostar