基于防火墙的VRRP技术--华为防火墙双机热备--VGMP
目录
为了解决多个VRRP备份组状态不一致的问题,华为防火墙引入VGMP(VRRP Group Management Protocol)来实现对VRRP备份组的统一管理,保证多个VRRP备份组状态的一致性。我们将防火墙上的所有VRRP备份组都加入到一个VGMP组中,由VGMP组来集中监控并管理所有的VRRP备份组状态。如果VGMP组检测到其中一个VRRP备份组的状态变化,则VGMP组会控制组中的所有VRRP备份组统一进行状态切换,保证各VRRP备份组状态的一致性。双机热备协议HRP(Huawei Redundancy Protocol)协议是承载在VGMP(Vrrp Group Management Protocol)报文上进行传输的,在Master和Backup防火墙设备之间备份关键配置命令和会话表状态信息,是双机热备协议。VGMP、HRP是华为私有协议
主备备份双机热备配置
在主备备份双机热备模式下,FW1既是PC1的网关也是PC2的网关,也是AR1回去的路由的默认下一跳。在主备备份双机热备模式下,假如FW1宕机了,FW2会立刻切换到Active状态,从而不影响主机与外界通信。
如图,PC1和PC2是企业内网的主机,属于不同的VLAN。AR1是边界路由器。FW1和FW2是企业内部防火墙,他们之间形成双机热备,FW1是active状态,FW2是standby状态。企业内网通过AR1的出端口通过NAT方式访问外网。在防火墙FW1上还配置链路追踪功能,追踪AR2的g0/0/0口,如果到达不了,则切换状态。AR1下面的配置
PC1
PC>ipconfig
IPv4 address......................: 192.168.1.10
Subnet mask.......................: 255.255.255.0
Gateway...........................: 192.168.1.254
Physical address..................: 54-89-98-30-73-39
Vlan .............................: 10
PC2
PC>ipconfig
IPv4 address......................: 192.168.2.10
Subnet mask.......................: 255.255.255.0
Gateway...........................: 192.168.2.254
Physical address..................: 54-89-98-AF-62-C9
Vlan..............................: 20
LSW1
#
vlan batch 10 20
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10 20
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 10 20
#
interface GigabitEthernet0/0/3
port link-type access
port default vlan 10
#
interface GigabitEthernet0/0/4
port link-type access
port default vlan 20
#
FW1
#
hrp enable
hrp interface GigabitEthernet1/0/0 remote 10.1.1.2
hrp preempt delay 10
hrp track ip-link track
#
ip-link check enable
ip-link name track
destination 20.0.0.2 mode icmp
#
interface GigabitEthernet1/0/0
undo shutdown
ip address 10.1.1.1 255.255.255.252
#
interface GigabitEthernet1/0/1.10
vlan-type dot1q 10
ip address 192.168.1.1 255.255.255.0
vrrp vrid 10 virtual-ip 192.168.1.254 active
#
interface GigabitEthernet1/0/1.20
vlan-type dot1q 20
ip address 192.168.2.1 255.255.255.0
vrrp vrid 20 virtual-ip 192.168.2.254 active
#
interface GigabitEthernet1/0/2
undo shutdown
ip address 192.168.3.1 255.255.255.0
vrrp vrid 30 virtual-ip 192.168.3.254 active
#
firewall zone trust
set priority 85
add interface GigabitEthernet0/0/0
add interface GigabitEthernet1/0/1.10
add interface GigabitEthernet1/0/1.20
#
firewall zone untrust
set priority 5
add interface GigabitEthernet1/0/2
#
firewall zone name heartbeat id 4
set priority 80
add interface GigabitEthernet1/0/0
#
ip route-static 0.0.0.0 0.0.0.0 192.168.3.3
#
#
security-policy
rule name TRUST_UN_TRUST
source-zone trust
destination-zone untrust
service icmp
action permit
#
FW2
#
hrp enable
hrp interface GigabitEthernet1/0/0 remote 10.1.1.1
hrp preempt delay 10
#
interface GigabitEthernet1/0/1
undo shutdown
#
interface GigabitEthernet1/0/1.10
vlan-type dot1q 10
ip address 192.168.1.2 255.255.255.0
vrrp vrid 10 virtual-ip 192.168.1.254 standby
#
interface GigabitEthernet1/0/1.20
vlan-type dot1q 20
ip address 192.168.2.2 255.255.255.0
vrrp vrid 20 virtual-ip 192.168.2.254 standby
#
interface GigabitEthernet1/0/2
undo shutdown
ip address 192.168.3.2 255.255.255.0
vrrp vrid 30 virtual-ip 192.168.3.254 standby
#
firewall zone trust
set priority 85
add interface GigabitEthernet0/0/0
add interface GigabitEthernet1/0/1.10
add interface GigabitEthernet1/0/1.20
#
firewall zone untrust
set priority 5
add interface GigabitEthernet1/0/2
#
firewall zone name heartbeat id 4
set priority 80
add interface GigabitEthernet1/0/0
#
ip route-static 0.0.0.0 0.0.0.0 192.168.3.3
#
security-policy
rule name TRUST_UN_TRUST
source-zone trust
destination-zone untrust
service icmp
action permit
#
AR1
#
acl number 2000
rule 5 permit source 192.168.2.0 0.0.0.255
rule 10 permit source 192.168.1.0 0.0.0.255
#
interface GigabitEthernet0/0/0
ip address 192.168.3.3 255.255.255.0
#
interface GigabitEthernet0/0/2
ip address 20.0.0.1 255.255.255.0
nat outbound 2000
#
ip route-static 192.168.1.0 255.255.255.0 192.168.3.254
ip route-static 192.168.2.0 255.255.255.0 192.168.3.254
#
AR2
#
interface GigabitEthernet0/0/0
ip address 20.0.0.2 255.255.255.0
#
负载分担双机热备配置
在负载分担双机热备模式下,FW1是PC1的网关,FW2是PC2的网关。AR1回往PC1的下一跳是PC1,AR2回往PC2的下一跳是PC2。FW1和FW2之间形成负载分担双机热备关系,其实任何一个防火墙的接口down了,都不影响主机和外接通信。
如图,PC1和PC2是企业内网的主机,属于不同的VLAN。AR1是边界路由器。FW1和FW2是企业内部防火墙,他们之间形成双机热备,FW1既有active状态也有standby状态,FW2既有active状态也有standby状态。企业内网通过AR1的出端口通过NAT方式访问外网。
PC1
PC>ipconfig
IPv4 address......................: 192.168.1.10
Subnet mask.......................: 255.255.255.0
Gateway...........................: 192.168.1.254
Physical address..................: 54-89-98-30-73-39
Vlan..............................: 10
PC2
PC>ipconfig
IPv4 address......................: 192.168.2.10
Subnet mask.......................: 255.255.255.0
Gateway...........................: 192.168.2.254
Physical address..................: 54-89-98-AF-62-C9
Vlan..............................: 20
LSW1
[SW1]display current-configuration
#
vlan batch 10 20
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10 20
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 10 20
#
interface GigabitEthernet0/0/3
port link-type access
port default vlan 10
stp edged-port enable
#
interface GigabitEthernet0/0/4
port link-type access
port default vlan 20
stp edged-port enable
#
FW1
HRP_M[FW1]display current-configuration
#
hrp enable
hrp interface GigabitEthernet1/0/0 remote 10.1.1.2
#
interface GigabitEthernet1/0/1.10
vlan-type dot1q 10
ip address 192.168.1.1 255.255.255.0
vrrp vrid 10 virtual-ip 192.168.1.254 active
#
interface GigabitEthernet1/0/1.20
vlan-type dot1q 20
ip address 192.168.2.1 255.255.255.0
vrrp vrid 20 virtual-ip 192.168.2.254 standby
#
interface GigabitEthernet1/0/2
undo shutdown
ip address 192.168.3.1 255.255.255.0
vrrp vrid 30 virtual-ip 192.168.3.253 active
vrrp vrid 40 virtual-ip 192.168.3.254 standby
#
firewall zone trust
set priority 85
add interface GigabitEthernet0/0/0
add interface GigabitEthernet1/0/1.10
add interface GigabitEthernet1/0/1.20
add interface GigabitEthernet1/0/1
#
firewall zone untrust
set priority 5
add interface GigabitEthernet1/0/2
#
firewall zone name heartbeat id 4
set priority 80
add interface GigabitEthernet1/0/0
#
ip route-static 0.0.0.0 0.0.0.0 192.168.3.3
#
security-policy
rule name TRUST_TO_UNTRUST
source-zone trust
destination-zone untrust
service icmp
action permit
#
FW2
HRP_S[FW2]display current-configuration
#
hrp enable
hrp interface GigabitEthernet1/0/0 remote 10.1.1.1
#
interface GigabitEthernet1/0/0
undo shutdown
ip address 10.1.1.2 255.255.255.252
#
interface GigabitEthernet1/0/1.10
vlan-type dot1q 10
ip address 192.168.1.2 255.255.255.0
vrrp vrid 10 virtual-ip 192.168.1.254 standby
#
interface GigabitEthernet1/0/1.20
vlan-type dot1q 20
ip address 192.168.2.2 255.255.255.0
vrrp vrid 20 virtual-ip 192.168.2.254 active
#
interface GigabitEthernet1/0/2
undo shutdown
ip address 192.168.3.2 255.255.255.0
vrrp vrid 30 virtual-ip 192.168.3.253 standby
vrrp vrid 40 virtual-ip 192.168.3.254 active
#
firewall zone trust
set priority 85
add interface GigabitEthernet0/0/0
add interface GigabitEthernet1/0/1
add interface GigabitEthernet1/0/1.10
add interface GigabitEthernet1/0/1.20
#
firewall zone untrust
set priority 5
add interface GigabitEthernet1/0/2
#
firewall zone name heartbeat id 4
set priority 80
add interface GigabitEthernet1/0/0
#
ip route-static 0.0.0.0 0.0.0.0 192.168.3.3
#
security-policy
rule name TRUST_TO_UNTRUST
source-zone trust
destination-zone untrust
service icmp
action permit
#
AR1
[AR1]display current-configuration
#
acl number 2000
rule 5 permit source 192.168.1.0 0.0.0.255
rule 10 permit source 192.168.2.0 0.0.0.255
#
interface GigabitEthernet0/0/0
ip address 192.168.3.3 255.255.255.0
#
interface GigabitEthernet0/0/2
ip address 20.0.0.1 255.255.255.0
nat outbound 2000
#
ip route-static 192.168.1.0 255.255.255.0 192.168.3.253
ip route-static 192.168.2.0 255.255.255.0 192.168.3.254
#
AR2
[AR2]display current-configuration
#
interface GigabitEthernet0/0/0
ip address 20.0.0.2 255.255.255.0
#
VRRP和VGMP官方参考:https://forum.huawei.com/enterprise/zh/thread-282263.html
附上负载分担模式下的ensp源文件:链接: https://pan.baidu.com/s/1S5xzALnyg8cmn_lTB_jd_w 密码: yez5
基于路由器的 VRRP ------------>基于路由器的VRRP技术--VRRP的应用
基于三层交换机的VRRP-------->基于三层交换机的VRRP--MSTP、VRRP的综合运用
基于防火墙的VRRP技术--华为防火墙双机热备--VGMP的更多相关文章
- 基于三层交换机的VRRP技术--MSTP、VRRP的综合运用
MSTP (多生成树) 每个VLAN或者几个VLAN拥有一颗生成树,基于实例的生成树.instance 1.instance 2 每个实例拥有一颗生成树.MSTP可以实现多VLAN 的负载分担,可以实 ...
- 基于路由器的VRRP技术--VRRP的应用
目录 无Vlan的VRRP 有Vlan的VRRP 今天要讲的VRRP都是基于路由器的VRRP. 一:无Vlan的VRRP 如图,PC1和PC2是企业内网主机,AR1和AR2是企业访问外网的路由器,有一 ...
- 【Nginx】如何基于主从模式搭建Nginx+Keepalived双机热备环境?这是最全的一篇了!!
写在前面 最近出版了<海量数据处理与大数据技术实战>,详情可以关注 冰河技术 微信公众号,查看<我的<海量数据处理与大数据技术实战>出版啦!>一文. 也有不少小伙伴 ...
- Java技术中如何使用keepalived实现双机热备
Keepalived简介 Keepalived是Linux下一个轻量级别的高可用解决方案.高可用(High Avalilability,HA),其实两种不同的含义:广义来讲,是指整个系统的高可用行,狭 ...
- SqlServer双机热备技术实践笔记
SqlServer双机热备,大体上可以通过发布订阅,日志传送,数据库镜像来实现. 1,发布--订阅 是最早最简单的方案,但需要注意发布的时候,发布进程必须对快照目录有访问权限,这个问题可以从“查看快照 ...
- 基于RHCS的web双机热备集群搭建
基于RHCS的web双机热备集群搭建 RHCS集群执行原理及功能介绍 1. 分布式集群管理器(CMAN) Cluster Manager.简称CMAN.是一个分布式集群管理工具.它执行在集群的各个节 ...
- 基于主主复制的mysql双机热备+keepalived实现高可用性
- 基于nginx实现web服务器的双机热备
1.适用场景 对于部署重要的服务,会使用两台服务器,互相备份,共同执行同一服务.当一台服务器出现故障时,可以由另一台服务器承担服务任务,从而在不需要人工干预的情况下,自动保证系统能持续提供服务.双机热 ...
- Nginx+Keeplived双机热备(主从模式)
Nginx+Keeplived双机热备(主从模式) 参考资料: http://www.cnblogs.com/kevingrace/p/6138185.html 双机高可用一般是通过虚拟IP(漂移IP ...
随机推荐
- 25个关键技术点,带你熟悉Python
摘要:本文收纳了Python学习者经常使用的库和包,并介绍了Python使用中热门的问题. 01.Python 简介 什么是 Python 一种面向对象的高级动态可解释型脚本语言. Python 解释 ...
- 如何快速开发Winform应用系统
在实际的业务中,往往还有很多需要使用Winform来开发应用系统的,如一些HIS.MIS.MES等系统,由于Winform开发出来的系统界面友好,响应快速,开发效率高等各方面原因,还有一些原因是独立的 ...
- ZooKeeper 基本概念并介绍RPC中Netty和Zookeeper的使用
前言 ZooKeeper 是一个分布式协调服务,可用于服务发现,分布式锁,分布式领导选举,配置管理等.Zookeeper提供一个类似Linux文件系统的属性结构,每个节点可存储少量的内存文件,并提供每 ...
- MySQL基础知识:创建MySQL数据库和表
虚构一个微型在线书店的数据库和数据,作为后续MySQL脚本的执行源,方便后续MySQL和SQL的练习. 在虚构这个库的过程中,主要涉及的是如何使用命令行管理 MySQL数据库对象:数据库.表.索引.外 ...
- 【odoo14】odoo 14 Development Cookbook【目录篇】
网上已经有大佬翻译过odoo12并且在翻译odoo14了.各位着急的可以自行搜索下... 这本书是为了让自己从odoo12转odoo14学习.也是为了锻炼下自己... odoo 14 Developm ...
- ICPC题目选讲
Traveling in the grid world 题目描述 有一个 \(n\times m\) 的格点图,两点之间走他们的连线,但是这条连线不能恰好覆盖其他整点.还要求相邻两步之间的连线不能斜率 ...
- switch case语句,switch case用法详解
switch 是"开关"的意思,它也是一种"选择"语句,但它的用法非常简单.switch 是多分支选择语句.说得通俗点,多分支就是多个 if. 从功能上说,sw ...
- 攻防世界 reverse 进阶 16-zorropub
16.zorropub nullcon-hackim-2016 (linux平台以后整理) https://github.com/ctfs/write-ups-2016/tree/master/nu ...
- OCPC产品初探
OCPC即Optimization CPC,今天我们就来看看它的Optimizaton在哪儿. 在广告模型初探(一)中我们就曾提到过,互联网广告的本质其实就是流量的买卖.是广告主.媒体方以及用户三方之 ...
- 初识Django(一)
首先安装Django 1 pip install django==1.11.13 安装 由于django最新的长期支持版本为1.11.x,所以我们安装最新的1.11.13版本 '=='后面跟版本号 安 ...