STP配置:

  switchA(Config)#spanning-tree

  MSTP is starting now, please wait...........

  MSTP is enabled successfully.

  spanning-tree设置

  查看配置

  SW1#sh spanning-tree

  -- MSTP Bridge Config Info --

  Standard : IEEE 802.1s

  Bridge MAC : 00:03:0f:01:0e:30

  Bridge Times : Max Age 20, Hello Time 2, Forward Delay 15

  Force Version: 3

  ########################### Instance 0 ###########################

  Self Bridge Id : 32768 - 00:03:0f:01:0e:30

  Root Id : 16384.00:03:0f:01:0f:52

  Ext.RootPathCost : 200000

  Region Root Id : this switch

  Int.RootPathCost : 0

  Root Port ID : 128.1

  Current port list in Instance 0:

  Ethernet0/0/1 Ethernet0/0/2 (Total 2)

  PortName ID ExtRPC IntRPC State Role DsgBridge DsgPort

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

  Ethernet0/0/1 128.001 0 0 FWD ROOT 16384.00030f010f52 128.007

  Ethernet0/0/2 128.002 0 0 BLK ALTR 16384.00030f010f52 128.011

  MSTP

  用少量资源在网络中实现多个生成树

  在多条TRUNK链路上实现VLAN级负载均衡

  MSTP配置

  DCS (Config)# spanning-tree mst configuration

  DCS (Config-Mstp-Region)#name mstp

  DCS (Config-Mstp-Region)#instance 1 vlan 10

  DCS (Config-Mstp-Region)#instance 2 vlan 20

  DCS (Config-Mstp-Region)#exit

  DCS (Config)# spanning-tree

  MSTP is starting now, please wait...........

  MSTP is enabled successfully.

  改变生成树的形态

  改变交换机优先级

  switchB(Config)#spanning-tree mst 0 priority 28672

  改变链路开销

  switchA(config-Ethernet0/0/2 )#spanning-tree mst 1 cost 300000

  改变端口优先级

  switchA(Config-Ethernet0/0/2)#spanning-tree mst 0 port-priority 144