VRRP相关配置案例!②
作者:互联网
实验
实验要求
交换机配置MSTP+VRRP,SW1作为VLAN10的主,VLAN20的备,SW2相反,使得PC1和PC2可以互通。
1.配置各主机IP子网和网关
配置PC1:IP为192.168.1.1,子网掩码为255.255.255.0,网关为192.168.1.254
配置PC2:IP为192.168.2.1,子网掩码为255.255.255.0,网关为192.168.2.254
2.配置交换机SW1
<Huawei>sys
[Huawei]sys SW1
[SW1]vlan batch 10 20
[SW1]int vlanif 10
[SW1-Vlanif10]ip add 192.168.1.252 24
[SW1-Vlanif10]vrrp vrid 1 virtual-ip 192.168.1.254
[SW1-Vlanif10]vrrp vrid 1 priority 110
[SW1-Vlanif10]int vlanif 20
[SW1-Vlanif20]ip add 192.168.2.253 24
[SW1-Vlanif20]vrrp vrid 2 virtual-ip 192.168.2.254
[SW1-Vlanif20]int g0/0/1
[SW1-GigabitEthernet0/0/1]p l t
[SW1-GigabitEthernet0/0/1]p t a v a
00
[SW1]dis vrrp brief
VRID State Interface Type Virtual IP
----------------------------------------------------------------
1 Master Vlanif10 Normal 192.168.1.254
2 Backup Vlanif20 Normal 192.168.2.254
----------------------------------------------------------------
Total:2 Master:1 Backup:1 Non-active:0
[SW1]stp region-configuration
[SW1-mst-region]region-name huawei
[SW1-mst-region]instance 1 vlan 10
[SW1-mst-region]instance 2 vlan 20
[SW1-mst-region]active region-configuration
[SW1-mst-region]q
[SW1]stp mode mstp
[SW1]stp instance 1 root primary
[SW1]stp instance 2 root secondary
3.配置交换机SW2
<Huawei>sys
[Huawei]sys SW2
[SW2]vlan batch 10 20
[SW2]int vlanif 10
[SW2-Vlanif10]ip add 192.168.1.253 24
[SW2-Vlanif10]vrrp vrid 1 virtual-ip 192.168.1.254
[SW2-Vlanif10]int vlanif 20
[SW2-Vlanif20]ip add 192.168.2.252 24
[SW2-Vlanif20]vrrp vrid 2 virtual-ip 192.168.2.254
[SW2-Vlanif20]vrrp vrid 2 priority 110
[SW2-Vlanif20]int g0/0/1
[SW2-GigabitEthernet0/0/1]p l t
[SW2-GigabitEthernet0/0/1]p t a v a
[SW2-GigabitEthernet0/0/1]q
[SW2]dis vrrp brief
VRID State Interface Type Virtual IP
----------------------------------------------------------------
1 Backup Vlanif10 Normal 192.168.1.254
2 Master Vlanif20 Normal 192.168.2.254
----------------------------------------------------------------
Total:2 Master:1 Backup:1 Non-active:0
[SW2]stp region-configuration
[SW2-mst-region]region-name huawei
[SW2-mst-region]instance 1 vlan 10
[SW2-mst-region]instance 2 vlan 20
[SW2-mst-region]active region-configuration
[SW2-mst-region]q
[SW2]stp mode mstp
[SW2]stp instance 1 root secondary
[SW2]stp instance 2 root primary
4.配置交换机SW3
<Huawei>sys
[Huawei]sys SW3
[SW3]vlan batch 10 20
[SW3]int g0/0/1
[SW3-GigabitEthernet0/0/1]p l t
[SW3-GigabitEthernet0/0/1]p t a v a
[SW3-GigabitEthernet0/0/1]int g0/0/2
[SW3-GigabitEthernet0/0/2]p l t
[SW3-GigabitEthernet0/0/2]p t a v a
[SW3-GigabitEthernet0/0/2]int g0/0/3
[SW3-GigabitEthernet0/0/3]p l a
[SW3-GigabitEthernet0/0/3]p d v 10
[SW3-GigabitEthernet0/0/3]int g0/0/4
[SW3-GigabitEthernet0/0/4]p l a
[SW3-GigabitEthernet0/0/4]p d v 20
[SW3]stp region-configuration
[SW3-mst-region]region-name huawei
[SW3-mst-region]instance 1 vlan 10
[SW3-mst-region]instance 2 vlan 20
[SW3-mst-region]active region-configuration
5.ping测试
标签:region,配置,GigabitEthernet0,192.168,案例,VRRP,SW1,SW3,SW2 来源: https://blog.csdn.net/guguai7/article/details/115628592