山石防火墙双机热备模式配置案例

描述

1. 需求分析

配置HA Active- Active[1]工作模式,以提高网络可靠性,保证业务不中断。

本案例将分别演示WebUI和CLI两种配置方式。

2. 案例说明

2.1 环境说明

在配置之前,确认搭建成HA典型组网模式的两台Hillstone设备采用完全相同的硬件平台、固件版本和安装相同的许可证,并且两台设备使用同样的接口连接到网络。

2.2 软硬件信息

硬件平台 软件版本
SG-6000-E1100 SG6000-M-3-5.5R8P5-v6.bin
SG-6000-E1100 SG6000-M-3-5.5R8P5-v6.bin

2.3 组网拓扑

网络

3. 功能配置

3.1 WebUI配置步骤

FW1接口配置,ethernet0/1为外网出接口,ethernet0/3为内网口。

网络网络

配置安全策略。

网络

配置检测对象,建议同时监测内网口和外网口(本案例只监测外网口)。

网络网络

配置FW1,group0为主,group1为备(配置 ha link 和 HA group并调用检测对象)。(系统->HA)

网络网络网络

配置FW2,group0为备,group1为主。

网络网络网络

配置FW1上为group 1所生成的VFI接口。

网络网络

配置FW1的SNAT和目的路由。

网络网络网络

FW1,FW2分别配置HA簇,开启HA功能。

网络

配置完成后,点击“系统 > 系统信息”,两台设备的HA状态分别如下显示:

FW1:

FW2:

网络

3.2 CLI配置步骤

• 配置FW1 ,group 0 为 主, group 1 为备。

 

FW1(config)# interface ethernet0/1
FW1 (config-if-eth0/2)# zone untrust
FW1(config-if-eth0/2)# ip address 100.0.1.1/24
FW1(config-if-eth0/2)# exit
FW1(config)# interface ethernet0/3
FW1(config-if-eth0/0)# zone trust
FW1(config-if-eth0/0)# ip address 192.168.10.1/24
FW1(config-if-eth0/0)# exit
FW1(config)# policy-global
FW1(config-policy)# rule from any to any service any permit
FW1(config-policy)# exit
FW1(config)#
配置 track
FW1(config)# track trackobj1
FW1(config-trackip)# interface ethernet0/3 weight 255
FW1(config-trackip)# interface ethernet0/1 weight 255
FW1(config-trackip)# exit
FW1(config)#
FW1(config)# track trackobj2
FW1(config-trackip)# interface ethernet0/3 weight 255
FW1(config-trackip)# interface ethernet0/1 weight 255
FW1(config-trackip)# exit
FW1(config)#
配置 ha link 和 HA group
FW1(config)# ha link interface ethernet0/4
FW1(config)# ha link ip 1.1.1.1/24
FW1(config)# ha group 0
FW1(config-ha-group)# priority 50
FW1(config-ha-group)# preempt 5
FW1(config-ha-group)# monitor track trackobj1
FW1(config-ha-group)# exit
FW1(config)# ha group 1
FW1(config-ha-group)# priority 100
FW1(config-ha-group)# monitor track trackobj2
FW1(config-ha-group)# exit

 

• 配置 FW2 , group 0为 备 ,group 1 为 主 。

 

FW1(config)# ha link interface ethernet0/4
FW1(config)# ha link ip 1.1.1.2/24
FW2(config)# ha group 0
FW2(config-ha-group)# priority 100
FW2(config-ha-group)# exit
FW2(config)# ha group 1
FW2(config-ha-group)# priority 50
FW2(config-ha-group)# exit

 

• 配置 FW1 上为 group 1 所生成的 VFI 接口。

 

VFI(Virtual Forward Interface)接口就是专为 HA group 1 所用
FW1(config)# interface ethernet0/3:1
FW1(config-if-eth0/1:1)# zone trust
FW1(config-if-eth0/1:1)# ip address 192.168.20.1/24
FW1(config-if-eth0/1:1)# exit
FW1(config)# interface ethernet0/1:1
FW1(config-if-eth0/3:1)# zone untrust
FW1(config-if-eth0/3:1)# ip address 100.0.1.2/24
FW1(config-if-eth0/3:1)# exit
FW1(config)# ip vrouter trust-vr
FW1(config-vrouter)# snatrule from any to any eif ethernet0/1 trans-to eif-ip mode dynamicport
FW1(config-vrouter)# snatrule from any to any eif ethernet0/1:1 trans-to eif-ip mode dynamicport group 1
FW1(config-vrouter)# ip route 0.0.0.0/0 ethernet0/1 100.0.1.10
FW1(config-vrouter)# ip route 0.0.0.0/0 ethernet0/1:1 100.0.1.10
FW1(config-vrouter)#exit

 

• 配置 HA 簇开启HA 功能,等待配置同步。

 

FW1(config)# ha cluster 1
FW2(config)# ha cluster 1

 

• 查看HA协商结果。

 

FW1# show ha group 0
FW1# show ha group 1
FW2# show ha group 0
FW2# show ha group 1

 

审核编辑:汤梓红

打开APP阅读更多精彩内容
声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉

全部0条评论

快来发表一下你的评论吧 !

×
20
完善资料,
赚取积分