当前位置: 首页 > news >正文

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

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

思考:

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

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

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

这种情况防火墙接口ip只能配置一个私网ipVRRP虚拟出公网对接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防火墙上

防火FW1mastet变为stadby

 

 

 


http://www.mrgr.cn/news/100023.html

相关文章:

  • 第9章 多模态大语言模型
  • 阿里云99机器总是宕机,实测还是磁盘性能差
  • 常用第三方库:cached_network_image图片加载优化
  • 自动化标注软件解析
  • 【农气项目】基于适宜度的产量预报
  • Linux 服务器运维常用命令大全
  • CMCC RAX3000M CH EC 算力版刷机(中国移动 RAX3000M 算力版)刷机备份数据
  • 【Go】重难点知识汇总
  • 涂料油墨制造数字化转型的关键技术与挑战
  • QEMU源码全解析 —— 块设备虚拟化(21)
  • Maxscript调用Newtonsoft.Json解析Json
  • ibus输入法微软词库分享
  • 静电放电测试中垂直和水平耦合板的作用
  • Linux 系统监控大师:Glances 工具详解助力自动化
  • Unitest和pytest使用方法
  • 离散化区间和 java c++
  • HTTP状态码有哪些常见的类型?
  • 【Pandas】pandas DataFrame div
  • python数据分析(二):Python Pandas索引技术详解
  • Protues8.11安装只需5步骤即可。