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

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

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.xdnf.cn/news/1343.html

相关文章:

  • MYSQL-库的基本操作
  • 数据结构--AVL树
  • 【问题解决】本机navicat连接云服务器mysql
  • idea无法下载源代码
  • k8s 证书相关问题
  • Python 从PPT文档中提取图片和图片信息(坐标、宽度和高度等)
  • Linux 管道理解
  • 【计算机网络】现代网络技术核心架构与实战解析
  • OCR之身份证识别
  • MinIO 教程:从入门到Spring Boot集成
  • 极狐GitLab 的合并请求部件能干什么?
  • 数据结构-链表
  • OpenGL学习笔记(Blinn-Phong、伽马矫正、阴影)
  • UML2.0中的14种图简介,并借助AI生成UML图
  • 4.23学习总结
  • 【测试报告】幸运闪烁抽奖系统(Java+Selenium+Jmeter自动化测试)
  • 《把握人机共融设计要点,重塑人机协作格局》
  • 如何解决极狐GitLab 合并冲突?
  • 第4天:Linux开发环境搭建
  • 配置Intel Realsense D405驱动与ROS包
  • 配置 Apache 的 HTTPS
  • 一些确保 iPaaS 集成平台与现有系统安全集成的方法
  • 操作系统环境变量
  • 每天五分钟深度学习PyTorch:图像的处理的上采样和下采样
  • Vue3:component(组件:uniapp版本)
  • JavaScript学习教程,从入门到精通,Ajax与Node.js Web服务器开发全面指南(24)
  • C++学习之游戏服务器开发十五QT登录器实现
  • 面试篇:Java并发与多线程
  • gem5-gpu教程03 当前的gem5-gpu软件架构(因为涉及太多专业名词不知道该如何翻译所以没有汉化)
  • 牛客 verilog入门 VIP