RSTP配置

通过配置RSTP,边缘端口,当修改交换机优先级时,改变拓扑,使端口状态快速切换。

1.1.1         拓扑

 

1.1.2         配置

1)在STP配置下,修改spanning tree mode为rstp。

xNet#configure terminal

xNet(config)#spanning-tree mode rstp

xNet(config)#end

xNet#

查看此时端口状态,block的端口为208的ge48

2)设置ge25为边缘端口,达到快速迁移到转发状态的特性

xNet#configure terminal

xNet(config)#interface ge25

xNet(config-if)#spanning-tree edgeport

xNet(config-if)#end

xNet#

3)修改交换机的优先级,使拓扑改变

xNet#configure terminal

xNet(config)#spanning-tree priority 4096

xNet(config)#end

xNet#

4)查看端口状态变化

当拓扑改变后,端口能快速切换状态,变为207的ge1变为Discarding状态,其它端口为Forwarding。

1.1.3         结果

通过配置RSTP,边缘端口,当修改交换机优先级时,改变拓扑,端口状态能够快速切换。

 

1.2         MSTP

配置3个实例,实例1:vlan11,vlan12;实例2:vlan13,vlan14;实例3:vlan15;通过协议计算不同实例的端口状态变化。

1.2.1         拓扑

 

1.2.2         配置

1)3台交换分配置3个实例

实例1:vlan11,vlan12;

实例2:vlan13,vlan14;

实例3:vlan15;

以207号机配置为例,208和206号机配置类似:

a)创建vlan

xNet#configure terminal

xNet(config)#vlan database

xNet(config-vlan)#vlan 11-15

xNet(config-vlan)#end

xNet#

b)配置MSTP

xNet#configure terminal

xNet(config)#spanning-tree mode mstp

xNet(config)#spanning-tree mst configuration

xNet(config-mst)#instance 1 vlan 11-12

xNet(config-mst)#instance 2 vlan 13-14

xNet(config-mst)#instance 3 vlan 15

xNet(config-mst)#exit

c)端口加入实例

xNet(config)#interface ge1

xNet(config-if)#switchport

xNet(config-if)#switchport mode trunk

xNet(config-if)#switchport trunk allowed vlan add 11-15

xNet(config-if)#spanning-tree instance 1

xNet(config-if)#spanning-tree instance 2

xNet(config-if)#spanning-tree instance 3

xNet(config-if)#exit

xNet(config)#interface xe3

xNet(config-if)#switchport

xNet(config-if)#switchport mode trunk

xNet(config-if)#switchport trunk allowed vlan add 11-15

xNet(config-if)#spanning-tree instance 1

xNet(config-if)#spanning-tree instance 2

xNet(config-if)#spanning-tree instance 3

xNet(config-if)#end

xNet#

 

2)分别查看三台交换机的每个端口在每个实例中的端口状态,结果为:

命令:

xNet#show spanning-tree mst instance 1 interface ge1

实例1 block的端口为:206的xe1

实例2 block的端口为:206的xe1

实例3 block的端口为:206的xe1

其它端口均为Forwarding

3)改变交换机优先级,使每个交换机作为一个实例的根(207为实例1的根,208为实例2的根,206为实例3的根):

207:

xNet#configure terminal

xNet(config)#spanning-tree instance 1 priority 0

xNet(config)#end

xNet#

208:

xNet#configure terminal

xNet(config)#spanning-tree instance 2 priority 0

xNet(config)#end

xNet#

206:

xNet#configure terminal

xNet(config)#spanning-tree instance 3 priority 0

xNet(config)#end

xNet#

 

4)查看优先级修改后的端口状态:

实例1 block的端口为:206的xe1

实例2 block的端口为:206的xe3

实例3 block的端口为:208的ge1

其它端口均为Forwarding

1.2.3         结果

配置3个实例,实例1:vlan11,vlan12;实例2:vlan13,vlan14;实例3:vlan15;通过协议计算不同实例的端口状态能够变化。

转载于:https://www.cnblogs.com/niezhongle/p/11075318.html

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值