Cisco Switch STP

Cisco Switch STP

 

注意:模拟器中,交换机之间的连线一定要用交叉线,不能用直通线。

 

人工指定根网桥:
Switch#configure terminal
Switch(config)#spanning-tree vlan 1 priority 4096

1.将汇聚层交换机设置成根网桥这样配置生成树才有意义。

2. 接入层交换机、汇聚层交换机、核心层交换机并非是交换机的种类或者属性,只是由其所执行的任务来划分的。

 

交换机配置(三个交换机配置均相同)

#spanning-tree mode rapid-pvst  // 快速生成树模式

#interface FastEthernet 0/1
#switchport mode trunk  // 设置接口工作模式为trunk
#exit


#interface FastEthernet 1/1
#switchport mode trunk  // 设置接口工作模式为trunk
#exit

#interface FastEthernet 2/1
#switchport access vlan 10  // 设置接口绑定的 VLAN ID 为 10
#exit

 

交换机0

Switch>en
Switch#
Switch#show spanning-tree vlan 10
VLAN0010
  Spanning tree enabled protocol rstp
  Root ID    Priority    32778   (根网桥优先级)
             Address     000D.BD2A.4802   (根交换机MAC地址)
             Cost        19
             Port        1(FastEthernet0/1)
             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32778  (priority 32768 sys-id-ext 10)  (该交换机的优先级)
             Address     00E0.B0A2.12EC  (该交换机MAC地址)
             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  20

Interface        Role Sts Cost      Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/1            Root FWD 19        128.1    P2p
Fa1/1            Altn BLK 19        128.2    P2p
Fa2/1            Desg FWD 19        128.3    P2p

Switch#
Switch#

 

交换机1 (根网桥)

Switch>en
Switch#
Switch#show spanning-tree vlan 10
VLAN0010
  Spanning tree enabled protocol rstp
  Root ID    Priority    32778    (根网桥优先级)
             Address     000D.BD2A.4802   (根交换机MAC地址)
             This bridge is the root
             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32778  (priority 32768 sys-id-ext 10)  (该交换机的优先级)
             Address     000D.BD2A.4802  (该交换机MAC地址)
             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  20

Interface        Role Sts Cost      Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa1/1            Desg FWD 19        128.2    P2p
Fa0/1            Desg FWD 19        128.1    P2p
Fa2/1            Desg FWD 19        128.3    P2p

Switch#
Switch#

 

交换机2

Switch>en
Switch#
Switch#show spanning-tree vlan 10
VLAN0010
  Spanning tree enabled protocol rstp
  Root ID    Priority    32778   (根网桥优先级)
             Address     000D.BD2A.4802   (根交换机MAC地址)
             Cost        19
             Port        1(FastEthernet0/1)
             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32778  (priority 32768 sys-id-ext 10)  (该交换机的优先级)
             Address     0090.2B37.79B1   (该交换机MAC地址)
             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  20

Interface        Role Sts Cost      Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/1            Root FWD 19        128.1    P2p
Fa1/1            Desg FWD 19        128.2    P2p
Fa2/1            Desg FWD 19        128.3    P2p

Switch#
Switch#

 

=========== End

 

posted @ 2020-11-25 14:02  lsgxeva  阅读(307)  评论(0编辑  收藏  举报