• 全部
  • 经验案例
  • 典型配置
  • 技术公告
  • FAQ
  • 漏洞说明
  • 全部
  • 全部
  • 大数据引擎
  • 知了引擎
产品线
搜索
取消
案例类型
发布者
是否解决
是否官方
时间
搜索引擎
匹配模式
高级搜索

防火墙rbm双主

2024-05-17提问
  • 1关注
  • 0收藏,199浏览
粉丝:0人 关注:0人

问题描述:

防火墙双主,两条30位公网电信移动宽带。请问这种该怎么配置。

最佳答案

粉丝:101人 关注:8人

需要加运营商交换机,参考


一、拓扑


二、需求

1、 园区出口部署两台防火墙,使用RBM+VRRP方式实现主备

2、 从运营商租借两条ISP链路,要求两条链路同时使用,互为备份

3、 如运营商接入交换机上行链路出现故障,防火墙路由需快速感知到并切换

4、 内网核心交换机使用IRF实现高可靠性

5、 内网vlan 100:172.16.100.0/24可通过任意出口访问运营商网络

6、 内网和公网侧访问防火墙上任意ISP地址的TCP 2222端口都能访问到内网Server提供的ssh服务

7、 内网Server手工配置地址172.16.100.22,该地址不可分配给其他终端;PC1固定获取172.16.100.15地址,PC2随机获取地址。

三、配置思路

1、 运营商提供的单根线路无法与两台防火墙直连,因此在防火墙和ISP之间增加运营商接入交换机,该交换机将ISP的一条链路变为两条链路,然后分别与两台出口防火墙相连。具体做法为将相同ISP的三个接口以access的方式划分到相同vlan即可,不同ISP链路用不同vlan区分,vlan可自定义。

2、 每个ISP只提供了1个公网ip,所以防火墙上行连接到同一组ISP的接口可配置同网段的私网ip地址,将vrrp虚拟地址配置为ISPip地址即可,注意配置虚拟IP时需要配置掩码,掩码以ISP给的为准。

3、 为保证防火墙可快速感知到运营商接入交换机上行链路的状况,可配置nqa探测到ISP网关地址的状态,同时与track联动,防火墙配置的到各ISP的缺省路由再分别与track关联。

4、 为保证内网vlan100可以访问运营商网络,以及公网侧可以访问内网Server的服务,需在防火墙分别配置SNATDNAT。内网使用ISP地址访问Server的服务需配置双向NAT

5、 防火墙各接口加入安全域并放行安全策略。

四、接口及地址规划

本端接口

vlan/ip

补充

对端

运营商接入交换机

G1/0/1

VLAN10

ISP1

ISP1

G1/0/2

VLAN10

 

FW1:G1/0/1

G1/0/3

VLAN10

 

FW2:G1/0/1

G1/0/4

VLAN20

ISP2

 

G1/0/5

VLAN20

 

FW1:G1/0/2

G1/0/6

VLAN20

 

FW2:G1/0/2

出口防火墙FW1

G1/0/1

10.0.0.1/30

VRRP1:200.0.1.1/24 active

 

G1/0/2

10.0.0.5/30

VRRP2:200.0.2.1/24 active

 

G1/0/5

10.0.1.2/24

VRRP10:10.0.1.1/24 active

核心交换机6:G1/0/5

G1/0/22

Route-agg641.1.1.1/30

HA接口

FW2:G1/0/22

G1/0/23

FW2:G1/0/23

出口防火墙FW2

G1/0/1

10.0.0.2/30

VRRP1:200.0.1.1/24 standby

 

G1/0/2

10.0.0.6/30

VRRP2:200.0.2.1/24 standby

 

G1/0/5

10.0.1.3/24

VRRP10:10.0.1.1/24 standby

核心交换机7:G2/0/5

G1/0/22

Route-agg641.1.1.2/30

HA接口

FW1:G1/0/22

G1/0/23

FW1:G1/0/23

核心交换机6-slot1/核心交换机7-slot2(IRF)

G1/0/5

VLAN10

Vlan-int:10:10.0.1.4/24

FW1:G1/0/5

G2/0/5

VLAN10

FW2:G2/0/5

G1/0/48

VLAN4000

BFD MAD检测,1.1.1.5/30

核心交换机7:G2/0/48

G2/0/48

VLAN4000

BFD MAD检测,1.1.1.6/30

核心交换机6:G1/0/48

XG1/0/49

IRF-PORT1/1

IRF接口

核心交换机7:XG2/0/49

XG1/0/50

核心交换机7:XG2/0/50

XG2/0/49

IRF-PORT2/2

IRF接口

核心交换机6:XG1/0/49

XG2/0/50

核心交换机6:XG1/0/50

G1/0/6

Bridge-agg100

VLAN100

Trunk

Vlan-int100:172.16.100.1/24

接入交换机:G1/0/6

G2/0/6

接入交换机:G1/0/7

接入交换机

G1/0/6

Bridge-agg100

VLAN100

Trunk

核心交换机6:G1/0/6

G1/0/7

核心交换机7:G2/0/6

G1/0/1

Access

Vlan100

 

PC1

G1/0/2

 

PC2

G1/0/3

 

Server

终端

PC1

Dhcp自动获取

获取固定ip 172.16.100.15

接入交换机:G1/0/1

PC2

Dhcp自动获取

自动分配

接入交换机:G1/0/2

Server

172.16.100.22

对外提供ssh服务

接入交换机:G1/0/3



配置步骤

HCL模拟器工程文件已上传至HCLhub:http://hclhub.h3c.com/project/9466/summary/master?path=README.md&type=text

如连接失效可登录http://hclhub.h3c.com/  搜索:v7_防火墙_rbm_vrrp_出口主备

(1)   运营商接入交换机

1、 配置将IPS1的三个接口划分到vlan 10,将ISP2的三个接口划分到vlan20

#创建vlan10,并将接口g1/0/1~g1/0/3划分到vlan10

#

system-view

#

vlan 10

port GigabitEthernet 1/0/1 GigabitEthernet 1/0/2 GigabitEthernet 1/0/3

quit

#

#创建vlan20,并将接口g1/0/4~g1/0/6划分到vlan20

#

vlan 20

port GigabitEthernet 1/0/4 GigabitEthernet 1/0/5 GigabitEthernet 1/0/6

quit

#

#保存配置

save force

 

(2)   出口防火墙

1、 完成FW1FW2RBM基础配置

#创建三层聚合口64,并将接口g1/0/22和接口g1/0/23加入该聚合口。该聚合口将作为FW之间RBM的数据/控制通道,同时为接口配置控制通道IP

#

system-view

#

sysname FW1

#

interface Route-Aggregation64

ip address 1.1.1.1 255.255.255.252

#

interface GigabitEthernet1/0/22

port link-aggregation group 64

#

interface GigabitEthernet1/0/23

port link-aggregation group 64

#完成RBM配置,指定数据通道为Route-Aggregation64HA回切时间为10分钟,控制通道本段ip地址为1.1.1.1,对端ip地址为1.1.1.2,本设备作为主管理设备。

remote-backup group

 data-channel interface Route-Aggregation64

 delay-time 10

 local-ip 1.1.1.1

 remote-ip 1.1.1.2

 device-role primary

#

#FW2此部分配置与FW1类似。

#

system-view

#

sysname FW2

#

interface Route-Aggregation64

ip address 1.1.1.2 255.255.255.252

#

interface GigabitEthernet1/0/22

port link-aggregation group 64

#

interface GigabitEthernet1/0/23

port link-aggregation group 64

#

remote-backup group

 data-channel interface Route-Aggregation64

 delay-time 10

 local-ip 1.1.1.2

 remote-ip 1.1.1.1

 device-role secondary

#

 

2、 完成FW1FW2VRRP配置

#ISP只提供了1个公网ip,所以防火墙上行连接到同一组ISP的接口可配置同网段的私网ip地址,将vrrp虚拟地址配置为ISPip地址即可,注意配置虚拟IP时需要配置掩码,掩码以ISP给的为准。

#配置VRRP时需要与RBM关联(主设备命令后增加active,反之standby)

#因防火墙为双出口,为了保证源进源出,在公网口配置ip last-hop hold

#

interface GigabitEthernet1/0/1

port link-mode route

ip address 10.0.0.1 255.255.255.252

vrrp vrid 1 virtual-ip 200.0.1.1 255.255.255.0 active

ip last-hop hold

#

interface GigabitEthernet1/0/2

port link-mode route

ip address 10.0.0.5 255.255.255.252

vrrp vrid 2 virtual-ip 200.0.2.1 255.255.255.0 active

ip last-hop hold

#

interface GigabitEthernet1/0/5

port link-mode route

ip address 10.0.1.2 255.255.255.0

vrrp vrid 10 virtual-ip 10.0.1.1 255.255.255.0 active

#

#FW2此部分配置与FW1类似。

#

interface GigabitEthernet1/0/1

port link-mode route

ip address 10.0.0.2 255.255.255.252

vrrp vrid 1 virtual-ip 200.0.1.1 255.255.255.0 standby

ip last-hop hold

#

interface GigabitEthernet1/0/2

port link-mode route

ip address 10.0.0.6 255.255.255.252

vrrp vrid 2 virtual-ip 200.0.2.1 255.255.255.0 standby

ip last-hop hold

#

interface GigabitEthernet1/0/5

port link-mode route

ip address 10.0.1.3 255.255.255.0

vrrp vrid 10 virtual-ip 10.0.1.1 255.255.255.0 standby

#

 

3、 完成FW1FW2nqatrack和路由配置

#完成nqa配置,用于探测防火墙到各ISP网关地址的连通性,探测方式为icmp,探测间隔为100ms,超时时间为500ms,连续5次不通即探测失败。

#

nqa entry isp1 main

type icmp-echo

destination ip 200.0.1.254

frequency 1000

next-hop ip 200.0.1.254

probe timeout 500

reaction 1 checked-element probe-fail threshold-type consecutive 5 action-type trigger-only

#             

nqa entry isp2 main

type icmp-echo

destination ip 200.0.2.254

frequency 1000

next-hop ip 200.0.2.254

probe timeout 500

reaction 1 checked-element probe-fail threshold-type consecutive 5 action-type trigger-only

#

#启动nqa探测,并配置track项与nqa联动

#

nqa schedule isp1 main start-time now lifetime forever

nqa schedule isp2 main start-time now lifetime forever

#

track 1 nqa entry isp1 main reaction 1

#

track 2 nqa entry isp2 main reaction 1

#

#配置缺省路由与track项关联,同时配置去往内网vlan100的回程路由

#

ip route-static 0.0.0.0 0 200.0.1.254 track 1

ip route-static 0.0.0.0 0 200.0.2.254 track 2

ip route-static 172.16.100.0 24 10.0.1.4

#

#FW2此部分配置与FW1类似。

#

nqa entry isp1 main

type icmp-echo

destination ip 200.0.1.254

frequency 1000

next-hop ip 200.0.1.254

probe timeout 500

reaction 1 checked-element probe-fail threshold-type consecutive 5 action-type trigger-only

#             

nqa entry isp2 main

type icmp-echo

destination ip 200.0.2.254

frequency 1000

next-hop ip 200.0.2.254

probe timeout 500

reaction 1 checked-element probe-fail threshold-type consecutive 5 action-type trigger-only

#

nqa schedule isp1 main start-time now lifetime forever

nqa schedule isp2 main start-time now lifetime forever

#

track 1 nqa entry isp1 main reaction 1

#

track 2 nqa entry isp2 main reaction 1

#

ip route-static 0.0.0.0 0 200.0.1.254 track 1

ip route-static 0.0.0.0 0 200.0.2.254 track 2

ip route-static 172.16.100.0 24 10.0.1.4

#

 

4、 完成FW的安全域配置(此部分配置主管理设备会实时同步给备管理设备)

#配置将内网接口g1/0/5加入trust区域,将ISP1接口g1/0/1加入untrust区域,将ISP2接口g1/0/2加入untrust2区域。

#

security-zone name Trust

import interface GigabitEthernet1/0/5

quit

#

security-zone name Untrust

import interface GigabitEthernet1/0/1

quit

#

security-zone name Untrust2

import interface GigabitEthernet1/0/2

quit

#

 

5、 完成FW的全局NAT配置(此部分配置主管理设备会实时同步给备管理设备)

#配置服务对象组,用于匹配访问tcp目的端口为2222的流量

#

object-group service tcp2222

0 service tcp destination eq 2222

quit

#

#配置nat地址组,用于源地址转换,同时各地址组与接口的VRRP备份组关联

#

nat address-group 1 name isp1

address 200.0.1.1 200.0.1.1

vrrp vrid 1

quit

#

nat address-group 2 name isp2

address 200.0.2.1 200.0.2.1

vrrp vrid 2

quit

#

nat address-group 5 name trust

address 10.0.1.1 10.0.1.1

vrrp vrid 5

quit

#

nat global-policy

 #配置名为isp1vlan100server的规则,用于匹配由untrust域访问目的地址为200.0.1.1,目的端口为tcp 2222的流量,匹配上后执行目的地址+端口转换,转换后的目的ip172.16.100.22,目的端口为tcp 22.

 rule name isp1vlan100server

  service tcp2222

  source-zone untrust

  destination-ip host 200.0.1.1

  action dnat ip-address 172.16.100.22 local-port 22

 rule name isp2vlan100server

  service tcp2222

  source-zone untrust2

  destination-ip host 200.0.2.1

  action dnat ip-address 172.16.100.22 local-port 22

 

#配置名为vlan100toserver的规则,用于匹配由trust域访问目的地址为200.0.1.1200.0.2.1,目的端口为tcp 2222的流量,匹配上后执行目的地址+端口转换,转换后的目的ip172.16.100.22,目的端口为tcp 22。同时执行源地址转换,转换后的源ipnat地址组5中的地址。

rule name vlan100toserver

 service tcp2222

 source-zone trust

 destination-ip host 200.0.1.1

 destination-ip host 200.0.2.1

 action snat address-group 5 vrrp 5

 action dnat ip-address 172.16.100.22 local-port 22

 

#配置名为vlan100snat1的规则,用于匹配由trust域到untrust域,源地址为172.16.100.0/24的流量,匹配上后执行源地址转换,转换后的源ipnat地址组1中的地址。

 rule name vlan100snat1

  source-zone trust

  destination-zone untrust

  source-ip subnet 172.16.100.0 24

  action snat address-group 1 vrrp 1

 rule name vlan100snat2

  source-zone trust

  destination-zone untrust2

  source-ip subnet 172.16.100.0 24

  action snat address-group 2 vrrp 2

#

 

6、 完成FW的安全策略配置(此部分配置主管理设备会实时同步给备管理设备)

#

security-policy ip

#创建名为trust2untrust的安全策略规则rule 1,匹配源域为trust,目的域为untrustuntrust2,源地址为172.16.100.0/24的流量,动作为允许。(对应内网vlan100访问互联网的需求)

 rule 1 name trust2untrust

  action pass

  source-zone trust

  destination-zone untrust

  destination-zone untrust2

  source-ip-subnet 172.16.100.0 255.255.255.0

 

#创建名为2vlan100server的安全策略规则rule 5,匹配源域为untrustuntrust2,目的域为trust,目的地址为172.16.100.22/32的流量,动作为允许。(对应公网侧访问内网server的需求)

 rule 5 name 2vlan100server

  action pass

  source-zone untrust

  source-zone untrust2

  destination-zone trust

  destination-ip-host 172.16.100.22

 

#创建名为nqa的安全策略规则rule 10,匹配源域为local即防火墙自身,目的域为untrustuntrust2的流量,动作为允许。(对应防火墙nqa探测ISP网关地址的需求)

 rule 10 name nqa

  action pass

  source-zone local

  destination-zone untrust

  destination-zone untrust2

 

#创建名为vlan100toserver的安全策略规则rule 15,匹配源域为trust,目的地址为172.16.100.22的流量,动作为允许。(对应内网使用公网地址访问server的需求)

 rule 15 name vlan100toserver

  action pass

  source-zone trust

  destination-ip-host 172.16.100.22

#

 


(4)   接入交换机

1、 配置上/下行接口

#创建业务vlan100

#

system-view

#

sysname ACCESSsw1

#

vlan 100

#

#配置二层聚合口100,将上行接口g1/0/6g1/0/7加入二层聚合口100,同时放行vlan100。这里需要按照:创建聚合口、接口空配加入聚合口、进入聚合口完成vlan配置的顺序操作。

#

interface Bridge-Aggregation100

quit

#

interface range GigabitEthernet 1/0/6 GigabitEthernet1/0/7

port link-aggregation group 100

quit

#

interface Bridge-Aggregation100

port link-type trunk

port trunk permit vlan 100

#

#配置下行接终端的接口加入vlan100,并开启stp边缘端口

#

interface GigabitEthernet1/0/1

port access vlan 100

stp edged-port

#

interface GigabitEthernet1/0/2

port access vlan 100

stp edged-port

#             

interface GigabitEthernet1/0/3

port access vlan 100

stp edged-port

#

#保存配置

save force


配置关键点

1、 防火墙查看RBMVRRP状态,FW1为主,FW2为备.

#FW1

RBM_P<FW1>dis remote-backup-group status

Remote backup group information:

  Backup mode: Active/standby    -----------备份组模式为主/

  Device management role: Primary -----------设备管理状态为主

  Device running status: Active     -----------设备运行状态为主

  Data channel interface: Route-Aggregation64

  Local IP: 1.1.1.1

  Remote IP: 1.1.1.2    Destination port: 60064

  Control channel status: Connected

  Keepalive interval: 1s

  Keepalive count: 10

  Configuration consistency check interval: 24 hour

  Configuration consistency check result: Not Performed

  Configuration backup status: Auto sync enabled

  Session backup status: Hot backup enabled

  Delay-time: 10 min

  Uptime since last switchover: 0 days, 15 hours, 29 minutes

  Switchover records:

    Time                  Status change        Cause

    2023-02-25 22:31:08   Standby to Active    Interface status changed

RBM_P<FW1> 

RBM_P<FW1>dis vrrp

IPv4 Virtual Router Information: 

 Running mode      : Standard

 RBM control channel is established

   VRRP active group status : Master

   VRRP standby group status: Master

 Total number of virtual routers : 3

 Interface          VRID  State        Running Adver   Auth             Virtual

                                       Pri     Timer   Type             IP

 ----------------------------------------------------------------------------

 GE1/0/1            1     Master       100     100     Not supported    200.0.1.1      

 GE1/0/2            2     Master       100     100     Not supported    200.0.2.1      

 GE1/0/5            10    Master       100     100     Not supported    10.0.1.1       

RBM_P<FW1>

#FW2:

RBM_S<FW2>dis remote-backup-group status

Remote backup group information:

  Backup mode: Active/standby

  Device management role: Secondary

  Device running status: Standby

  Data channel interface: Route-Aggregation64

  Local IP: 1.1.1.2

  Remote IP: 1.1.1.1    Destination port: 60064

  Control channel status: Connected

  Keepalive interval: 1s

  Keepalive count: 10

  Configuration consistency check interval: 24 hour

  Configuration consistency check result: Not Performed

  Configuration backup status: Auto sync enabled

  Session backup status: Hot backup enabled

  Delay-time: 10 min

  Uptime since last switchover: 0 days, 15 hours, 32 minutes

  Switchover records:

    Time                  Status change        Cause

    2023-02-25 22:31:08   Active to Standby    Interface status changed

RBM_S<FW2>

RBM_S<FW2>dis vrrp

IPv4 Virtual Router Information: 

 Running mode      : Standard

 RBM control channel is established

   VRRP active group status : Backup

   VRRP standby group status: Backup

 Total number of virtual routers : 3

 Interface          VRID  State        Running Adver   Auth             Virtual

                                       Pri     Timer   Type             IP

 ----------------------------------------------------------------------------

 GE1/0/1            1     Backup       100     100     Not supported    200.0.1.1      

 GE1/0/2            2     Backup       100     100     Not supported    200.0.2.1      

 GE1/0/5            10    Backup       100     100     Not supported    10.0.1.1       

RBM_S<FW2>

 


暂无评论

0 个回答

该问题暂时没有网友解答

编辑答案

你正在编辑答案

如果你要对问题或其他回答进行点评或询问,请使用评论功能。

分享扩散:

提出建议

    +

亲~登录后才可以操作哦!

确定

亲~检测到您登陆的账号未在http://hclhub.h3c.com进行注册

注册后可访问此模块

跳转hclhub

你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作

举报

×

侵犯我的权益 >
对根叔社区有害的内容 >
辱骂、歧视、挑衅等(不友善)

侵犯我的权益

×

泄露了我的隐私 >
侵犯了我企业的权益 >
抄袭了我的内容 >
诽谤我 >
辱骂、歧视、挑衅等(不友善)
骚扰我

泄露了我的隐私

×

您好,当您发现根叔知了上有泄漏您隐私的内容时,您可以向根叔知了进行举报。 请您把以下内容通过邮件发送到pub.zhiliao@h3c.com 邮箱,我们会尽快处理。
  • 1. 您认为哪些内容泄露了您的隐私?(请在邮件中列出您举报的内容、链接地址,并给出简短的说明)
  • 2. 您是谁?(身份证明材料,可以是身份证或护照等证件)

侵犯了我企业的权益

×

您好,当您发现根叔知了上有关于您企业的造谣与诽谤、商业侵权等内容时,您可以向根叔知了进行举报。 请您把以下内容通过邮件发送到 pub.zhiliao@h3c.com 邮箱,我们会在审核后尽快给您答复。
  • 1. 您举报的内容是什么?(请在邮件中列出您举报的内容和链接地址)
  • 2. 您是谁?(身份证明材料,可以是身份证或护照等证件)
  • 3. 是哪家企业?(营业执照,单位登记证明等证件)
  • 4. 您与该企业的关系是?(您是企业法人或被授权人,需提供企业委托授权书)
我们认为知名企业应该坦然接受公众讨论,对于答案中不准确的部分,我们欢迎您以正式或非正式身份在根叔知了上进行澄清。

抄袭了我的内容

×

原文链接或出处

诽谤我

×

您好,当您发现根叔知了上有诽谤您的内容时,您可以向根叔知了进行举报。 请您把以下内容通过邮件发送到pub.zhiliao@h3c.com 邮箱,我们会尽快处理。
  • 1. 您举报的内容以及侵犯了您什么权益?(请在邮件中列出您举报的内容、链接地址,并给出简短的说明)
  • 2. 您是谁?(身份证明材料,可以是身份证或护照等证件)
我们认为知名企业应该坦然接受公众讨论,对于答案中不准确的部分,我们欢迎您以正式或非正式身份在根叔知了上进行澄清。

对根叔社区有害的内容

×

垃圾广告信息
色情、暴力、血腥等违反法律法规的内容
政治敏感
不规范转载 >
辱骂、歧视、挑衅等(不友善)
骚扰我
诱导投票

不规范转载

×

举报说明