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

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

相关推荐
君鼎1 小时前
muduo库TcpServer模块详解
linux·网络·c++
开***能1 小时前
包装设备跨系统兼容:Profinet转Modbus TCP的热收缩包装机改造方案
服务器·网络·tcp/ip
卡戎-caryon1 小时前
【MySQL】02.数据库基础
linux·网络·数据库·mysql·存储引擎
技术宝哥2 小时前
从另一个视角理解TCP握手、挥手与可靠传输
网络·网络协议·tcp/ip
李白你好2 小时前
H3C网络设备(交换机、路由器、防火墙)常用命令整理
运维·网络·智能路由器
終不似少年遊*2 小时前
【从基础到模型网络】深度学习-语义分割-基础
网络·人工智能·深度学习·语义分割·卷积·上采样
卡戎-caryon2 小时前
【Linux网络与网络编程】12.NAT技术&&内网穿透&&代理服务
linux·运维·服务器·网络·网络协议·https
我的老子姓彭2 小时前
LWIP的Socket接口
运维·服务器·网络
随缘。。。。3 小时前
服务端HttpServletRequest、HttpServletResponse、HttpSession
网络·网络协议·http
Johny_Zhao4 小时前
AI+自动化测试系统方案:网络设备与网络应用智能测试
linux·网络·人工智能·python·网络安全·docker·ai·信息安全·云计算·ansible·shell·cisco·huawei·系统运维·itsm·华三·deepseek