华为配置专题
(八)VRRP原理
1.ARRP(网关冗余技术)
2.MSTP防止环路,VRRP主备切换
(九)VRRP配置
1,配置接入交换机acsw
system-view
sysname acsw
interface gigabitethernet 0/0/3
vlan 10
port link-type access //access接口
port default vlan 10
quit
interface gigabitethernet 0/0/1 //trunk 接口
port link-type trunk
port trunk allow-pass vlan all
interface gigabitethernet 0/0/2
port link-type trunk
port trunk allow-pass vlan all
quit
2.配置核心交换机coresw1
system-view
sysname coresw1
interface gigabitethernet 0/0/1
port link-type trunk
port trunk allow-pass vlan all
interface gigabitethernet 0/0/3
port link-type trunk
port trunk allow-pass vlan all
quit
vlan batch 10 100
interface gigabitethernet 0/0/2
port link-type access
port default vlan 100
quit
interface vlanif 10
ip address 192.168.10.252 24
quit
interface vlanif 100
ip address 192.168.100.1 30
quit
interface vlanif 10
vrrp vrid 10 virtual-ip 192.168.10.254 //给备份组配置虚拟IP地址
vrrp vrid 10 priority 120 //配置优先级
vrrp vrid 10 preempt-mode timer delay 20 配置备份组中设备的抢占延迟时间
quit
ip route-static 0.0.0.0 0 192.168.100.2 //配置默认路由
interface vlanif 10
vrrp vrid 10 track interface gigabitethernet 0/0/2 reduced 30 //监视接口
quit
3.配置核心交换机coresw2
system-view
sysname coresw2
interface gigabitethernet 0/0/1
port link-type trunk
port trunk allow-pass vlan all
quit
interface gigabitethernet 0/0/3
port link-type trunk
port trunk allow-pass vlan all
quit
vlan batch 10 200
interface gigabitethernet 0/0/2
port link-type access
port default valn 200
quit
interface vlanif 10
ip address 192.168.10.253 24
quit
interface vlanif 200
ip address 192.168.200.1 30
quit
interface vlanif 10
vrrp vrid 10 virtual-ip 192.168.10.254
quit
ip route-static 0.0.0.0 0 192.168.200.2 //配置默认路由
4.配置路由器AR1
system-view
sysname AR1
interface gigabitethernet 0/0/1
ip address 192.168.100.2 30
interface gigabitethernet 0/0/0
ip address 100.1.1.2 30
interface gigabitethernet 0/0/2
ip address 192.168.200.2 30
quit
ip route-static 192.168.10.0 24 192.168.100.1
ip route-static 192.168.10.0 24 192.168.100.2
5.配置互联网
ip route-static 192.168.10.0 24 100.1.1.2 //静态路由