码迷,mamicode.com
首页 > 其他好文 > 详细

Lab - Multiple Spanning Tree

时间:2015-09-03 16:28:39      阅读:192      评论:0      收藏:0      [点我收藏+]

标签:

Multiple Spanning Tree

Topology

技术分享

 

Objective

Obsrve te behavior of Multiple Spanning Tree(MST)

 

Background

Four switches have just been installed. The distribution Layer switches are Catalyst 3660s, and the access layer switches are Catalyst 2960. There are redundant uplinks between the access layer and distribution layer. Because of the possibility of bridging loops, spanning tree logically removes any redundant links. In this lab, we will group VLANs using MST so that we can have fewer spanning tree instances running at once to minimize switch CPU load.

 

Step 1: Prepare the switches for the lab.

  1. Delete vlan.dat file, erase the startup config, and reload the switches.
  2. Give each switch a hostname according to the topology diagram.
  3. Configure ports f0/7 through f0/12 on all switches to be trunks. On the 3560, first set the trunk encapsulation to dot1q. On the 2960s, only dot1q is supported, therefore the switchport trunk encapsulation command is unavailable, but the mode stll needs to be changed to trunk. If you do not set the mode of the ports to trunk, they will negotiate the operational mode according to their default DTP settings.

 

All Switches:
interface range f0/7-12
switchport trunk encapsulation dot1q
switchport mode trunk

 

 

Step 2: Configure VTP and VLANs

a. Configure all switches with VTP mode transparent and VTP domain CISCO. Add VLANs 10,20,30,40,50,60,70,80,90,100 to all of them.

All Switch:
vtp mode transparent
vtp domain CISCO
vlan 10,20,30,40,50,60,70,80,90,100

 

 

b. Issue the show vlan brief command to view the VLAN configurations.

DLS1#show vlan brief

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Et1/2, Et1/3, Et2/0, Et2/1
                                                Et2/2, Et2/3, Et3/0, Et3/1
                                                Et3/2, Et3/3
10   VLAN0010                         active    
20   VLAN0020                         active    
30   VLAN0030                         active    
40   VLAN0040                         active    
50   VLAN0050                         active    
60   VLAN0060                         active    
70   VLAN0070                         active    
80   VLAN0080                         active    
90   VLAN0090                         active    
100  VLAN0100                         active    
1002 fddi-default                     act/unsup
1003 token-ring-default               act/unsup
1004 fddinet-default                  act/unsup
1005 trnet-default                    act/unsup

 

Step 3: Display spanning-tree information

issue the show spanning-tree command on one of the switches. How many spanning tree instances are running?

DLS1#show spanning-tree

VLAN0001
  Spanning tree enabled protocol ieee
  Root ID    Priority    32769
             Address     aabb.cc00.0100
             Cost        100
             Port        1 (Ethernet0/0)
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32769  (priority 32768 sys-id-ext 1)
             Address     aabb.cc00.0500
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  300 sec

Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Et0/0               Root FWD 100       128.1    Shr
Et0/1               Altn BLK 100       128.2    Shr
Et0/2               Altn BLK 100       128.3    Shr
Et0/3               Altn BLK 100       128.4    Shr
Et1/0               Altn BLK 100       128.5    Shr
Et1/1               Altn BLK 100       128.6    Shr
Et1/2               Desg FWD 100       128.7    Shr
Et1/3               Desg FWD 100       128.8    Shr
Et2/0               Desg FWD 100       128.9    Shr
Et2/1               Desg FWD 100       128.10   Shr
Et2/2               Desg FWD 100       128.11   Shr
Et2/3               Desg FWD 100       128.12   Shr
Et3/0               Desg FWD 100       128.13   Shr
Et3/1               Desg FWD 100       128.14   Shr
Et3/2               Desg FWD 100       128.15   Shr
Et3/3               Desg FWD 100       128.16   Shr


          
VLAN0010
  Spanning tree enabled protocol ieee
  Root ID    Priority    32778
             Address     aabb.cc00.0100
             Cost        100
             Port        1 (Ethernet0/0)
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32778  (priority 32768 sys-id-ext 10)
             Address     aabb.cc00.0500
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  300 sec

Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Et0/0               Root FWD 100       128.1    Shr
Et0/1               Altn BLK 100       128.2    Shr
Et0/2               Altn BLK 100       128.3    Shr
Et0/3               Altn BLK 100       128.4    Shr
Et1/0               Altn BLK 100       128.5    Shr
Et1/1               Altn BLK 100       128.6    Shr

          
          
VLAN0020
  Spanning tree enabled protocol ieee
  Root ID    Priority    32788
             Address     aabb.cc00.0100
             Cost        100
             Port        1 (Ethernet0/0)
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32788  (priority 32768 sys-id-ext 20)
             Address     aabb.cc00.0500
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  300 sec

Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Et0/0               Root FWD 100       128.1    Shr
Et0/1               Altn BLK 100       128.2    Shr
Et0/2               Altn BLK 100       128.3    Shr
Et0/3               Altn BLK 100       128.4    Shr
Et1/0               Altn BLK 100       128.5    Shr
Et1/1               Altn BLK 100       128.6    Shr

          
          
VLAN0030
  Spanning tree enabled protocol ieee
  Root ID    Priority    32798
             Address     aabb.cc00.0100
             Cost        100
             Port        1 (Ethernet0/0)
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32798  (priority 32768 sys-id-ext 30)
             Address     aabb.cc00.0500
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  300 sec

Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Et0/0               Root FWD 100       128.1    Shr
Et0/1               Altn BLK 100       128.2    Shr
Et0/2               Altn BLK 100       128.3    Shr
Et0/3               Altn BLK 100       128.4    Shr
Et1/0               Altn BLK 100       128.5    Shr
Et1/1               Altn BLK 100       128.6    Shr

          
          
VLAN0040
  Spanning tree enabled protocol ieee
  Root ID    Priority    32808
             Address     aabb.cc00.0100
             Cost        100
             Port        1 (Ethernet0/0)
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32808  (priority 32768 sys-id-ext 40)
             Address     aabb.cc00.0500
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  300 sec

Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Et0/0               Root FWD 100       128.1    Shr
Et0/1               Altn BLK 100       128.2    Shr
Et0/2               Altn BLK 100       128.3    Shr
Et0/3               Altn BLK 100       128.4    Shr
Et1/0               Altn BLK 100       128.5    Shr
Et1/1               Altn BLK 100       128.6    Shr

          
          
VLAN0050
  Spanning tree enabled protocol ieee
  Root ID    Priority    32818
             Address     aabb.cc00.0100
             Cost        100
             Port        1 (Ethernet0/0)
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32818  (priority 32768 sys-id-ext 50)
             Address     aabb.cc00.0500
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  300 sec

Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Et0/0               Root FWD 100       128.1    Shr
Et0/1               Altn BLK 100       128.2    Shr
Et0/2               Altn BLK 100       128.3    Shr
Et0/3               Altn BLK 100       128.4    Shr
Et1/0               Altn BLK 100       128.5    Shr
Et1/1               Altn BLK 100       128.6    Shr

          
          
VLAN0060
  Spanning tree enabled protocol ieee
  Root ID    Priority    32828
             Address     aabb.cc00.0100
             Cost        100
             Port        1 (Ethernet0/0)
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32828  (priority 32768 sys-id-ext 60)
             Address     aabb.cc00.0500
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  300 sec

Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Et0/0               Root FWD 100       128.1    Shr
Et0/1               Altn BLK 100       128.2    Shr
Et0/2               Altn BLK 100       128.3    Shr
Et0/3               Altn BLK 100       128.4    Shr
Et1/0               Altn BLK 100       128.5    Shr
Et1/1               Altn BLK 100       128.6    Shr

          
          
VLAN0070
  Spanning tree enabled protocol ieee
  Root ID    Priority    32838
             Address     aabb.cc00.0100
             Cost        100
             Port        1 (Ethernet0/0)
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32838  (priority 32768 sys-id-ext 70)
             Address     aabb.cc00.0500
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  300 sec

Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Et0/0               Root FWD 100       128.1    Shr
Et0/1               Altn BLK 100       128.2    Shr
Et0/2               Altn BLK 100       128.3    Shr
Et0/3               Altn BLK 100       128.4    Shr
Et1/0               Altn BLK 100       128.5    Shr
Et1/1               Altn BLK 100       128.6    Shr

          
          
VLAN0080
  Spanning tree enabled protocol ieee
  Root ID    Priority    32848
             Address     aabb.cc00.0100
             Cost        100
             Port        1 (Ethernet0/0)
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32848  (priority 32768 sys-id-ext 80)
             Address     aabb.cc00.0500
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  300 sec

Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Et0/0               Root FWD 100       128.1    Shr
Et0/1               Altn BLK 100       128.2    Shr
Et0/2               Altn BLK 100       128.3    Shr
Et0/3               Altn BLK 100       128.4    Shr
Et1/0               Altn BLK 100       128.5    Shr
Et1/1               Altn BLK 100       128.6    Shr

          
          
VLAN0090
  Spanning tree enabled protocol ieee
  Root ID    Priority    32858
             Address     aabb.cc00.0100
             Cost        100
             Port        1 (Ethernet0/0)
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32858  (priority 32768 sys-id-ext 90)
             Address     aabb.cc00.0500
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  300 sec

Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Et0/0               Root FWD 100       128.1    Shr
Et0/1               Altn BLK 100       128.2    Shr
Et0/2               Altn BLK 100       128.3    Shr
Et0/3               Altn BLK 100       128.4    Shr
Et1/0               Altn BLK 100       128.5    Shr
Et1/1               Altn BLK 100       128.6    Shr

          
          
VLAN0100
  Spanning tree enabled protocol ieee
  Root ID    Priority    32868
             Address     aabb.cc00.0100
             Cost        100
             Port        1 (Ethernet0/0)
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32868  (priority 32768 sys-id-ext 100)
             Address     aabb.cc00.0500
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  300 sec

Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Et0/0               Root FWD 100       128.1    Shr
Et0/1               Altn BLK 100       128.2    Shr
Et0/2               Altn BLK 100       128.3    Shr
Et0/3               Altn BLK 100       128.4    Shr
Et1/0               Altn BLK 100       128.5    Shr
Et1/1               Altn BLK 100       128.6    Shr

Spanning tree is running a separate spanning tree instance for each VLAN created, plus VLAN1. This method assumes that each VLAN could be runnning on a differently shaped topology. However, in many networks, multiple VLAN follow the same physical topology, so multiple spanning-tree calculations for the same topologies can get redundant. MST lets you configure different spanning tree instances. Each instance can hold a group of VLANs and manages its own spanning tree calculation.

 

MST is convenient in that it is backward compatible with PVST and RPVST+. Two switches only run MST with each other if they are in the same MST region. An MST region is defined by switches having identical regioin names, revision numbers, and VLAN-to-instance assignments. If they differ by any single attribute, they are considered different MST regions and fall back to RPVST+.

 

Step 4: Configure MST globally.

a. To configure MST, first use the global configuration command spanning-tree mode mst on all four switches.

    Note: By default, all VLANs are assigned to instance 0, but can be moved around to different instances when MST is configured.

 

b. issue the show spanning-tree command and observe that there is only one spanning tree(instance 0) coming up. Also notice that the mode is listed as MSTP.

DLS1(config)#do show spanning-tree

MST0
  Spanning tree enabled protocol mstp
  Root ID    Priority    32768
             Address     aabb.cc00.0100
             Cost        0
             Port        1 (Ethernet0/0)
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32768  (priority 32768 sys-id-ext 0)
             Address     aabb.cc00.0500
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Et0/0               Root FWD 2000000   128.1    Shr
Et0/1               Altn BLK 2000000   128.2    Shr
Et0/2               Altn BLK 2000000   128.3    Shr
Et0/3               Altn BLK 2000000   128.4    Shr
Et1/0               Altn BLK 2000000   128.5    Shr
Et1/1               Altn BLK 2000000   128.6    Shr
Et1/2               Desg LRN 2000000   128.7    Shr
Et1/3               Desg LRN 2000000   128.8    Shr
          
Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------

Et2/0               Desg LRN 2000000   128.9    Shr
Et2/1               Desg FWD 2000000   128.10   Shr
Et2/2               Desg FWD 2000000   128.11   Shr
Et2/3               Desg FWD 2000000   128.12   Shr
Et3/0               Desg FWD 2000000   128.13   Shr
Et3/1               Desg FWD 2000000   128.14   Shr
Et3/2               Desg FWD 2000000   128.15   Shr
Et3/3               Desg FWD 2000000   128.16   Shr

c. if you use the show spanning-tree mst configuration command, you can see a switch‘s current MST configuration. Because you have not configured any MST region settings, the switch shows the default settings.

DLS1(config)#do show spanning-tree mst configuration
Name      []
Revision  0     Instances configured 1

Instance  Vlans mapped
--------  ---------------------------------------------------------------------
0         1-4094
-------------------------------------------------------------------------------

 

Step 5: Configure the MST region and instance.

Now that MST has been enabled, we can configure the MST region setting to group VLANs, We use the region name CISCO and revision number of 1. We put VLAN 20 through 50 into instance 1, and 80 and 100 into instance 2. The rest of the VLANs remain in instance 0, the default.

 

a. To begin modifying the MST configuration, type the global configuration command spanning-tree mst configuration. Configuring MST is deifferent from other switch configurations, because changes are not applied until you are finished (similar to the deprecated VLAN database mode), and you can abort changes if you wish.

    Note: you must apply identical configurations on each switch for MST to work propely.

DLS1(config)#spanning-tree mst configuration 
DLS1(config-mst)# 

 

 

b. When you are in MST configuration mode, you can view the current configuration using the show current command. You do not need to leave configuration mode to execute this command. Notice that the output is identical to show spanning-tree mst configuration.

 

change the region name by typing name name. Change the revision number by typing revison number.

DLS1(config)#spanning-tree mst configuration 
DLS1(config-mst)#name CISCO
DLS1(config-mst)#revision 1

 

    Note: The MST revision number is not like the configuration revision number used with VTP. It does not increment when changes are made. Along with the region name, the revisoin number identifies the MST domain and must be the same on all systems in the MST region.

 

c. The last configuration change you have to make is putting VLANs into instances. Use the command instance number vlan vlan_range. The instance number can be between 0 and 15. Remember that 0 is the default instance number.

DLS1(config)#spanning-tree mst configuration 
DLS1(config-mst)#name CISCO
DLS1(config-mst)#revision 1
DLS1(config-mst)#instance 1 vlan 20-50DLS1(config-mst)#instance 2 vlan 80,100
DLS1(config-mst)#show current
Current MST configuration
Name      []
Revision  0     Instances configured 1

Instance  Vlans mapped
--------  ---------------------------------------------------------------------
0         1-4094
-------------------------------------------------------------------------------

 

 

d. You can verify the changes you are about to make with show pending command. Remember that the changes that you just entered are not committed until you type exit, end or Ctrl + C, if you do not like the changes you made, you can leave the prompt without committing them by typing abort.

DLS1(config-mst)#show pending 
Pending MST configuration
Name      [CISCO]
Revision  1     Instances configured 3

Instance  Vlans mapped
--------  ---------------------------------------------------------------------
0         1-19,51-79,81-99,101-4094
1         20-50
2         80,100
-------------------------------------------------------------------------------

 

 

Why do the switches wait until you are finished making changes to MST to commit them, rather than changing MST as you enter commands(like most switch commands)?

 

f. Verify that separate instances of spanning tree are running.

DLS2#show spanning-tree

MST0
  Spanning tree enabled protocol mstp
  Root ID    Priority    32768
             Address     aabb.cc00.0100
             This bridge is the root
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32768  (priority 32768 sys-id-ext 0)
             Address     aabb.cc00.0100
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Et0/0               Desg FWD 2000000   128.1    Shr 
Et0/1               Desg FWD 2000000   128.2    Shr 
Et0/2               Desg FWD 2000000   128.3    Shr 
Et0/3               Desg FWD 2000000   128.4    Shr 
Et1/0               Desg FWD 2000000   128.5    Shr 
Et1/1               Desg FWD 2000000   128.6    Shr 
Et1/2               Desg FWD 2000000   128.7    Shr 
Et1/3               Desg FWD 2000000   128.8    Shr 
Et2/0               Desg FWD 2000000   128.9    Shr 
Et2/1               Desg FWD 2000000   128.10   Shr 
Et2/2               Desg FWD 2000000   128.11   Shr 
Et2/3               Desg FWD 2000000   128.12   Shr 
Et3/0               Desg FWD 2000000   128.13   Shr 
Et3/1               Desg FWD 2000000   128.14   Shr 
Et3/2               Desg FWD 2000000   128.15   Shr 
Et3/3               Desg FWD 2000000   128.16   Shr 


          
MST1
  Spanning tree enabled protocol mstp
  Root ID    Priority    32769
             Address     aabb.cc00.0100
             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     aabb.cc00.0100
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Et0/0               Desg FWD 2000000   128.1    Shr 
Et0/1               Desg FWD 2000000   128.2    Shr 
Et0/2               Desg FWD 2000000   128.3    Shr 
Et2/0               Desg FWD 2000000   128.9    Shr 
Et2/1               Desg FWD 2000000   128.10   Shr 
Et2/2               Desg FWD 2000000   128.11   Shr 
Et2/3               Desg FWD 2000000   128.12   Shr 


          
MST2
  Spanning tree enabled protocol mstp
  Root ID    Priority    32770
             Address     aabb.cc00.0100
             This bridge is the root
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32770  (priority 32768 sys-id-ext 2)
             Address     aabb.cc00.0100
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Et0/0               Desg FWD 2000000   128.1    Shr 
Et0/1               Desg FWD 2000000   128.2    Shr 
Et0/2               Desg FWD 2000000   128.3    Shr 
Et2/0               Desg FWD 2000000   128.9    Shr 
Et2/1               Desg FWD 2000000   128.10   Shr 
Et2/2               Desg FWD 2000000   128.11   Shr 
Et2/3               Desg FWD 2000000   128.12   Shr 

 

 

Challenge:

You can modify per-instance MST spanning tree attributes the same way you can modify per-VLAN attributes.

Make DLS1 the root of instance 1 and DLS2 the root of instance 2.

HINT: Use the question mark on the global configuration command spanning-tree mst ?

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

DLS2(config)#spanning-tree mst 2 root primary  

 

Lab - Multiple Spanning Tree

标签:

原文地址:http://www.cnblogs.com/elewei/p/4780270.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!