eNSP——MSTP+VRRP

发布时间:2024年01月06日

ps:虽然这个实验看起来很复杂,实际上配置很简单,就是有点繁琐 :)

MSTP+VRRP综合实验

S1配置

基础配置

[S1]int g0/0/1
[S1-GigabitEthernet0/0/1]p l t
[S1-GigabitEthernet0/0/1]p t a v 10 20
[S1-GigabitEthernet0/0/1]int g0/0/2
[S1-GigabitEthernet0/0/2]p l t
[S1-GigabitEthernet0/0/2]p t a v 10 20
[S1-GigabitEthernet0/0/2]int g0/0/3
[S1-GigabitEthernet0/0/3]p l t
[S1-GigabitEthernet0/0/3]p t a v 10 20

?mstp配置

[S1]stp mode mstp    //配置stp模式	
[S1]stp region-configuration         //进入mstp配置视图
[S1-mst-region]region-name huawei
[S1-mst-region]revision-level 12    //设置修正等级
[S1-mst-region]instance 10 vlan 10        //配置实例映射
[S1-mst-region]instance 20 vlan 20
[S1-mst-region]active region-configuration     //使配置生效
[S1]stp instance 10 priority 0        //配置本机stp优先级,使其为vlan10的主根
    (=stp instance 10 priority root primary)
[S1]stp instance 20 priority 4096    //配置本机stp优先级,使其为vlan20的副根
    (=stp instance 20 priority root secondary)

注:关于mstp实例优先级的问题

stp instance 10 priority ?
? INTEGER<0-61440> ?Bridge priority, in steps of 4096?

缺省情况下为32768,步长为4096,越小越优先

?vrrp配置

[S1]int vlan 10
[S1-Vlanif10]ip add 192.168.10.252 24
[S1-Vlanif10]vrrp vrid 1 virtual-ip 192.168.10.254    //配置虚拟网关
[S1-Vlanif10]vrrp vrid 1 priority 120        //配置标识符1的优先级
[S1-Vlanif10]int vlan 20
[S1-Vlanif20]ip add 192.168.20.252 24
[S1-Vlanif20]vrrp vrid 2 virtual-ip 192.168.20.254

注:关于vrrp路由器标识符(vrid)优先级的问题

vrrp vrid 1 priority ?
? INTEGER<1-254> ?The level of priority(default is 100)

缺省情况下为100,越大越优先

S2配置

基础配置

[S2]int g0/0/1
[S2-GigabitEthernet0/0/1]p l t
[S2-GigabitEthernet0/0/1]p t a v 10 20
[S2-GigabitEthernet0/0/1]int g0/0/2
[S2-GigabitEthernet0/0/2]p l t
[S2-GigabitEthernet0/0/2]p t a v 10 20
[S2-GigabitEthernet0/0/2]int g0/0/3
[S2-GigabitEthernet0/0/3]p l t
[S2-GigabitEthernet0/0/3]p t a v 10 20

?mstp配置

[S2]stp mode mstp
[S2]stp region	
[S2]stp region-configuration 
[S2-mst-region]region-name huawei
[S2-mst-region]revision-level 12
[S2-mst-region]instance 10 vlan 10
[S2-mst-region]instance 20 vlan 20
[S2-mst-region]active region-configuration 
[S2]stp instance 10 priority 4096
[S2]stp instance 20 priority 0

?vrrp配置

[S2]int vlan 10
[S2-Vlanif10]ip add 192.168.10.253 24
[S2-Vlanif10]vrrp vrid 1 virtual-ip 192.168.10.254
[S2-Vlanif10]int vlan 20
[S2-Vlanif20]ip add 192.168.20.253 24
[S2-Vlanif20]vrrp vrid 2 virtual-ip 192.168.20.254
[S2-Vlanif20]vrrp vrid 2 priority 120

S3配置

?基础配置

[S3]int g0/0/4
[S3-GigabitEthernet0/0/4]p l a
[S3-GigabitEthernet0/0/4]p d v 10
[S3-GigabitEthernet0/0/4]int g0/0/5
[S3-GigabitEthernet0/0/5]p l a
[S3-GigabitEthernet0/0/5]p d v 20
[S3-GigabitEthernet0/0/5]int g0/0/1
[S3-GigabitEthernet0/0/1]p l t
[S3-GigabitEthernet0/0/1]p t a v 10 20
[S3-GigabitEthernet0/0/1]int g0/0/3
[S3-GigabitEthernet0/0/3]p l t
[S3-GigabitEthernet0/0/3]p t a v 10 20
[S3-GigabitEthernet0/0/3]int g0/0/2
[S3-GigabitEthernet0/0/2]p l t
[S3-GigabitEthernet0/0/2]p t a v 10 20

?mstp配置

[S3]stp mode mstp	
[S3]stp region-configuration 
[S3-mst-region]region-name huawei
[S3-mst-region]revision-level 12
[S3-mst-region]instance 10 vlan 10
[S3-mst-region]instance 20 vlan 20
[S3-mst-region]active region-configuration 

S4配置

基础配置?

[S4]int g0/0/1
[S4-GigabitEthernet0/0/1]p l t
[S4-GigabitEthernet0/0/1]p t a v 10 20
[S4-GigabitEthernet0/0/1]int g0/0/3
[S4-GigabitEthernet0/0/3]p l t
[S4-GigabitEthernet0/0/3]p t a v 10 20
[S4-GigabitEthernet0/0/3]int g0/0/2
[S4-GigabitEthernet0/0/2]p l t
[S4-GigabitEthernet0/0/2]p t a v 10 20
[S4-GigabitEthernet0/0/2]int g0/0/4
[S4-GigabitEthernet0/0/4]p l a
[S4-GigabitEthernet0/0/4]p d v 10
[S4-GigabitEthernet0/0/4]int g0/0/5
[S4-GigabitEthernet0/0/5]p l a
[S4-GigabitEthernet0/0/5]p d v 20

mstp配置

[S4]stp mode mstp
[S4]stp region-configuration 
[S4-mst-region]region-name huawei
[S4-mst-region]revision-level 12
[S4-mst-region]instance 10 vlan 10
[S4-mst-region]instance 20 vlan 20	
[S4-mst-region]active region-configuration 

测试1:查看mstp状态是否正常

成功!!

测试2:查看vrrp状态是否正常

成功!!

测试3:相同网段能否通信

成功!!

测试4:将S1关闭,查看能够通信

成功!!芜湖!!起飞!!

文章来源:https://blog.csdn.net/scy1034446395/article/details/135351487
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。