【华为】防火墙双击热备-之-主备模式-单外网线路-分享

FW1和FW2的业务接口都工作在三层,上行连接二层交换机。上行交换机连接运营商的接入点,运营商为企业分配的IP地址为100.100.100.2。现在希望FW1和FW2以主备备份方式工作。正常情况下,流量通过FW1转发;当FW1出现故障时,流量通过FW2转发,保证业务不中断。

思考:

1、客户项目只有一根互联网线路、这种情况怎么接防火墙?

使用一台扩展交换机计入互联线路、也可以使用核心交换机复用

2、客户互联网只有一个公网ip、这种情况防火墙上公网ip地址怎么配置

这种情况防火墙接口ip只能配置一个私网ip、VRRP虚拟出公网对接ip

3、防火墙模式选择、主备模式还是负载分担模式

因为只有一条公网这种模式只能选择主备模式

|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 1. 完成网络基本配置。 | |
| FW1 | FW2 |
| # 配置FW1和FW2的接口地址 | |
| interface GigabitEthernet1/0/2 undo shutdown ip address 1.1.1.1 255.255.255.252 service-manage ping permit # interface GigabitEthernet1/0/3 undo shutdown ip address 172.16.1.3 255.255.255.0 service-manage ping permit # interface Eth-Trunk1 ip address 10.1.1.1 255.255.255.252 | interface GigabitEthernet1/0/2 undo shutdown ip address 1.1.1.2 255.255.255.252 service-manage ping permit # interface GigabitEthernet1/0/3 undo shutdown ip address 172.16.1.4 255.255.255.0 service-manage ping permit # interface Eth-Trunk1 ip address 10.1.1.2 255.255.255.252 |
| 各接口加入相应的安全区域。 | |
| firewall zone trust set priority 85 add interface GigabitEthernet0/0/0 add interface GigabitEthernet1/0/3 # firewall zone name HA set priority 60 add interface Eth-Trunk1 | firewall zone trust set priority 85 add interface GigabitEthernet0/0/0 add interface GigabitEthernet1/0/3 # firewall zone name HA set priority 60 add interface Eth-Trunk1 |
| 在fw1和FW2上配置缺省路由,下一跳为100.100.100.1,使内网用户的流量可以正常转发至Router。 | |
| ip route-static 0.0.0.0 0.0.0.0 100.100.100.1 | ip route-static 0.0.0.0 0.0.0.0 100.100.100.1 |
| 配置VRRP备份组 | |
| interface GigabitEthernet1/0/2 vrrp vrid 1 virtual-ip 100.100.100.2 255.255.255.0 active # interface GigabitEthernet1/0/3 vrrp vrid 2 virtual-ip 172.16.1.1 active | interface GigabitEthernet1/0/2 vrrp vrid 1 virtual-ip 100.100.100.2 255.255.255.0 standby # interface GigabitEthernet1/0/3 vrrp vrid 2 virtual-ip 172.16.1.1 standby |
| | |
| 指定心跳接口,配置认证密钥,并启用双机热备功能 | |
| hrp enable hrp interface Eth-Trunk1 remote 10.1.1.2 | hrp enable hrp interface Eth-Trunk1 remote 10.1.1.1 |
| 在fw1主上配置安全策略。双机热备状态成功建立后,FW1的安全策略配置会自动备份到FW2备上。 | |
| # 配置安全策略,允许内网用户访问Internet。 | |
| security-policy rule name local_to_YD source-zone local action permit rule name TRUST_TO_YD source-zone trust destination-zone YD action permit nat-policy rule name TO_INTERNET source-zone trust destination-zone YD action source-nat address-group GW nat address-group GW 0 mode pat section 0 100.100.100.2 100.100.100.2 | |
| OSPF 配置 | |
| ospf 1 default-route-advertise cost 500 type 1 area 0.0.0.0 network 172.16.1.3 0.0.0.0 # | ospf 1 default-route-advertise cost 500 type 1 area 0.0.0.0 network 172.16.1.4 0.0.0.0 # |
| 核心交换机ospf配置 | |
| ospf 1 area 0.0.0.0 network 172.16.20.1 0.0.0.0 network 172.16.1.2 0.0.0.0 | |

验证:

客户端PC可以访问互联网

故障演练:

在核心上关闭连接FW1的接口g0/0/1、流量自动切换到备FW2防火墙上

防火FW1由mastet变为stadby

相关推荐
DianSan_ERP6 天前
电商API接口全链路监控:构建坚不可摧的线上运维防线
大数据·运维·网络·人工智能·git·servlet
呉師傅6 天前
火狐浏览器报错配置文件缺失如何解决#操作技巧#
运维·网络·windows·电脑
2501_946205526 天前
晶圆机器人双臂怎么选型?适配2-12寸晶圆的末端效应器有哪些?
服务器·网络·机器人
linux kernel6 天前
第七部分:高级IO
服务器·网络
数字护盾(和中)6 天前
BAS+ATT&CK:企业主动防御的黄金组合
服务器·网络·数据库
~远在太平洋~6 天前
Debian系统如何删除多余的kernel
linux·网络·debian
unfeeling_6 天前
Keepalived实验
linux·服务器·网络
坐吃山猪6 天前
OpenClaw04_Gateway常见问题
网络·gateway·openclaw
上海云盾商务经理杨杨6 天前
2025年重大网络安全事件回顾与趋势分析
网络·安全·web安全
kylezhao20196 天前
C# 的开闭原则(OCP)在工控上位机开发中的具体应用
网络·c#·开闭原则