字数
467 字
阅读时间
3 分钟
本实验通过搭建两台华为防火墙 FW1 与 FW2 的双机热备(HRP)系统,实现主备冗余功能,并通过 VRRP 为各安全区域提供虚拟网关地址,使 DMZ 区域、Trust 区域及 Untrust 区域的业务在主防火墙故障时仍能继续工作,保证网络的连续性与可靠性。 实验包含以下内容:
- 配置 HRP 同步链路,实现会话、配置同步。
- 在 DMZ、Trust、Untrust 三个安全区域配置 VRRP 虚拟网关。
- 配置安全区域划分与基础策略。
- 测试主备切换过程,观察业务流量不中断。
实验拓扑
![[Pasted image 20251119105352.png]]
实验配置
IP地址规划
| 区域 | 网段 | VRRP 虚拟地址 | FW1 地址 | FW2 地址 |
|---|---|---|---|---|
| Trust | 10.1.1.0/24 | 10.1.1.1 | 10.1.1.11 | 10.1.1.12 |
| Untrust | 100.1.1.0/24 | 100.1.1.1 | 100.1.1.11 | 100.1.1.12 |
| HRP 心跳 | 10.10.10.0/24 | — | 10.10.10.1 | 10.10.10.2 |
| MGMT | 192.168.0.0/24 | 192.168.0.1 | 192.168.0.2 |
配置接口IP及vrrp
FW1
int g0/0/0
ip add 192.168.0.1 24
int g1/0/1
ip add 10.1.1.11 24
vrrp vrid 1 virtual-ip 10.1.1.1 255.255.255.0 active
int g1/0/2
ip add 100.1.1.11 24
vrrp vrid 2 virtual-ip 100.1.1.1 255.255.255.0 active
int g1/0/6
ip add 10.10.10.1 24FW2
int g0/0/0
ip add 192.168.0.2 24
int g1/0/1
ip add 10.1.1.12 24
vrrp vrid 1 virtual-ip 10.1.1.1 24 standby
int g1/0/2
ip add 100.1.1.12 24
vrrp vrid 2 virtual-ip 100.1.1.1 255.255.255.0 standby
int g1/0/6
ip add 10.10.10.2 24安全区域配置(FW1/FW2)
firewall zone dmz
add int g1/0/6
firewall zone trust
add int g1/0/1
firewall zone untrust
add int g1/0/2配置hrp心跳
FW1
hrp int g1/0/6 remote 10.10.10.2
hrp encryption-key Huawei12#$
hrp enableFW2
hrp int g1/0/6 remote 10.10.10.1
hrp encryption-key Huawei12#$
hrp enable让外网可以访问外网虚拟地址
HRP_M[FW1]security-policy
HRP_M[FW1-policy-security]rule name untrust-local-ping
HRP_M[FW1-policy-security-rule-untrust-local-ping]source-zone untrust
HRP_M[FW1-policy-security-rule-untrust-local-ping]destination-zone local
HRP_M[FW1-policy-security-rule-untrust-local-ping]service icmp
HRP_M[FW1-policy-security-rule-untrust-local-ping]action permit配置内网访问外网
security-policy
rule name trust-untrust
source-zone trust
destination-zone untrust
source-address 10.1.1.0 24
action permit创建nat策略
nat address-group nat
section 0 1.1.1.2 1.1.1.5
quit
nat-policy
rule name nat1
source-zone trust
destination-zone untrust
source-address 10.1.1.0 24
action source-nat address-group nat