交换机STP实验配置

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

配置

配置PVST+

说明:以上图为例,配置PVST+,默认交换机上都配置有VLAN 10,VLAN 20,VLAN 30,VLAN 40,要求控制SW1与SW4之间的流量路径为VLAN 10和VLAN 20从SW1—SW2—SW4,VLAN 30和VLAN 40从SW1—SW3—SW4。

注:默认为PVST+,所以STP版本不用改。

1.配置各交换机优先级(只能为4096的整数倍)

(1)配置SW1在所有VLAN的优先级为4096

sw1(config)#spanning-tree vlan 10-40 priority 4096

(2)配置SW2在所有VLAN的优先级24576

sw2(config)#spanning-tree vlan 10-40 priority 24576

(3)配置SW3在所有VLAN的优先级32768

sw3(config)#spanning-tree vlan 10-40 priority 32768

(4)配置SW4在所有VLAN的优先级32768

sw4(config)#spanning-tree vlan 10-40 priority 32768

2.配置SW2的F0/20的端口优先级(必须为16的整数倍)(1)在所有VLAN将SW2的F0/20的端口优先级配置为112 sw2(config)#int f0/20

sw2(config-if)#spanning-tree vlan 10-40 port-priority 112

3.查看根交换机

(1)查看根交换机SW1

说明:因为现在4个VLAN的配置是一样的,结果也是一样的,所以只提供一个VLAN的结果:

sw1#sh spanning-tree

(输出被省略)

VLAN0010

Spanning tree enabled protocol ieee

Root ID Priority 4106

Address 001a.6c6f.fb00

This bridge is the root

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

Bridge ID Priority 4106 (priority 4096 sys-id-ext 10)

Address 001a.6c6f.fb00

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

Aging Time 300

Interface Role Sts Cost Prio.Nbr Type

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

Fa0/23 Desg FWD 19 128.25 P2p

(输出被省略)

sw1#

说明:从结果中看出,SW1手工配置的优先级为4096,但由于Extended System

ID功能,所以优先级加上了VLAN号码10,结果优先级变为4106,因为优先级在网络中数字最小,所以自己就是当前网络的根交换机。

4.查看根端口

(1)查看SW2的根端口

sw2#sh spanning-tree

(输出被省略)

VLAN0010

Spanning tree enabled protocol ieee

Root ID Priority 4106

Address 001a.6c6f.fb00

Cost 19

Port 23 (FastEthernet0/23)

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

Bridge ID Priority 24586 (priority 24576 sys-id-ext 10)

Address 0013.805c.9d00

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

Aging Time 300

Interface Role Sts Cost Prio.Nbr Type

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

Fa0/19 Desg FWD 19 128.19 P2p

Fa0/20 Desg FWD 19 112.20 P2p

Fa0/23 Root FWD 19 128.23 P2p

(输出被省略)

sw2#

说明:因为SW2上从端口F0/23到达根的Path Cost值为19,从F0/19和F0/20到达根的Path Cost值都为19×3=57。因此,F0/23被选为根端口。

(2)查看SW3的根端口

sw3#sh spanning-tree

(输出被省略)

VLAN0010

Spanning tree enabled protocol ieee

Root ID Priority 4106

Address 001a.6c6f.fb00

Cost 19

Port 21 (FastEthernet0/19)

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

Bridge ID Priority 32778 (priority 32768 sys-id-ext 10)

Address 001a.a256.f300

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

Aging Time 15

相关文档
最新文档