华为----vrrp配置

华为--vrrp配置

 

华为----vrrp配置_第1张图片

 

1.规划网段

如上图所示:

2.在各交换机上完成基本配置,使得各网段能够互通

sw3配置:

sys

vlan 10

vlan 20

quit

int g0/0/3

port link-type access

port default vlan 10

quit

int g0/0/4

port link-type access

port default vlan 20

quit

int g0/0/1

port link-type trunk

port trunk allow-pass vlan all

quit

int g0/0/2

port link-type trunk

port trunk allow-pass vlan all

quit

在sw5上配置:

sys

vlan 10

vlan 20

vlan 30

int vlan 10

ip add 192.168.10.1 255.255.255.0

int vlan 20

ip add 192.168.20.1 255.255.255.0

int vlan 30

ip add 192.168.30.1 255.255.255.0

int g0/0/1

port link-type trunk

port trunk allow-pass vlan all

int g0/0/2

port link-type access

port default vlan 30

quit

rip 1

network 192.168.10.0

network 192.168.20.0

network 192.168.30.0

在sw5上配置:

sys

vlan 10

vlan 20

vlan 40

int vlan 10

ip add 192.168.10.2 255.255.255.0

int vlan 20

ip add 192.168.20.2 255.255.255.0

int vlan 40

ip add 192.168.40.1 255.255.255.0

int g0/0/1

port link-type trunk

port trunk allow-pass vlan all

int g0/0/2

port link-type access

port default vlan 40

quit

rip 1

network 192.168.10.0

network 192.168.20.0

network 192.168.40.0

在R1上配置:

sys

int g0/0/1

ip add 192.168.30.1 255.255.255.0

quit

int e0/0/0

ip add 192.168.40.1 255.255.255.0

int g0/0/0

ip add 192.168.50.1 255.255.255.0

quit

rip 1

net 192.168.30.0

net 192.168.40.0

net 192.168.50.0

3.在LSW5和LSW6上配置vrrp

注意:对于VLAN10主设备为sw5备设备为sw6,对于VLAN20,主设备为sw6备设备为sw5

sw5配置:

in vlanif 10

vrrp vrid 1 virtual-ip 192.168.10.254

vrrp vrid 1 priority 200

vrrp vrid 1 preempt-mode timer delay 0

vrrp vrid 1 track interface g0/0/2 reduced 200

quit

in vlanif 20

vrrp vrid 2 virtual-ip 192.168.20.254

quit

sw6配置:

in vlanif 10

vrrp vrid 1 virtual-ip 192.168.10.254

quit

in vlanif 20

vrrp vrid 2 virtual-ip 192.168.20.254

vrrp vrid 2 priority 200

vrrp vrid 2 preempt-mode timer delay 0

vrrp vrid 2 track interface g0/0/2 reduced 200 quit

6测试:

当配置完成后:用pc1

tracert 192.168.50.2 华为----vrrp配置_第2张图片

当配置完成后:用pc2

tracert 192.168.50.2

华为----vrrp配置_第3张图片

断开sw5时,pc1测试

tracert 192.168.50.2

华为----vrrp配置_第4张图片

断开sw6时,pc2测试

tracert 192.168.50.2

华为----vrrp配置_第5张图片

测试断开上行口:

断开sw5的上行口

pc1测试tracert 192.168.50.2

华为----vrrp配置_第6张图片

说明检测到上行口断开后备份交换机自动开启路由转发功能

断开sw6的上行口

pc2测试tracert 192.168.50.2

华为----vrrp配置_第7张图片

说明检测到上行口断开后备份交换机自动开启路由转发功能

你可能感兴趣的:(交换,路由)