华为配置ISP选路实现报文按运营商转发

Web举例:配置ISP选路实现报文按运营商转发

介绍通过配置ISP选路实现报文按运营商转发的配置举例。

组网需求

图1所示,FW作为安全网关部署在网络出口,企业分别从ISP1和ISP2租用一条链路。

  • 企业希望访问Server 1的报文从ISP1链路转发,访问Server 2的报文从ISP2链路转发。

  • 当其中一条链路故障时,后续流量可以通过另一条链路转发,保证传输的可靠性。

图1 ISP选路组网图

配置思路
  1. 配置健康检查功能,分别为ISP1和ISP2链路配置健康检查。

  2. 配置接口的IP地址、安全区域和网关地址,并在接口上应用健康检查。

  3. 制作isp1.csv和isp2.csv两个ISP地址文件,将Server 1的IP地址3.3.3.3写入isp1.csv文件中;将Server 2的IP地址9.9.9.9写入isp2.csv文件中,并上传到FW上。

  4. 配置ISP选路功能,使访问Server 1的报文从ISP1链路转发,访问Server 2的报文从ISP2链路转发。

  5. 配置基本的安全策略,允许企业内部用户访问外网资源。

本例着重介绍ISP选路相关的配置,其余配置如NAT请根据实际组网进行配置。

操作步骤
  1. 为ISP1和ISP2链路分别新建一个健康检查。

    选择“对象 > 健康检查”,在“健康检查列表”区域单击“新建”,为ISP1链路新建一个健康检查。

    单击“新建”,为ISP2链路新建一个健康检查。

    此处假设3.3.10.10、3.3.10.11和9.9.20.20、9.9.20.21分别为ISP1和ISP2网络中已知的设备地址。

    如果健康检查配置完后,状态一直为down,请检查健康检查的配置。

    对于V500R001C80之前的版本,需要在FW上配置对应的安全策略,允许FW向目的设备发送健康检查探测报文。对于V500R001C80及之后的版本,健康检查的探测报文不受安全策略控制,默认放行,无需配置相应安全策略。

  2. 制作isp1.csv和isp2.csv两个ISP地址文件,将Server 1的IP地址3.3.3.3写入isp1.csv文件中;将Server 2的IP地址9.9.9.9写入isp2.csv文件中,并上传到FW上。

    选择“网络 > 路由 > 智能选路”,在“运营商地址库”页签,单击“导入”。

  3. 配置接口GigabitEthernet 1/0/1和GigabitEthernet 1/0/7的IP地址和网关地址,加入Untrust安全区域,选择所属运营商,启用运营商路由,并应用对应的健康检查。

    选择“网络 > 接口”,单击待配置的接口所在行的

  4. 配置接口GigabitEthernet 1/0/3的IP地址,并加入Trust安全区域。

    选择“网络 > 接口”,单击待配置的接口所在行的

  5. 配置Local到Untrust区域的安全策略,允许FW向目的设备发送相应的健康检查探测报文。

    对于V500R001C80之前的版本,需要在FW上配置对应的安全策略,允许FW向目的设备发送健康检查探测报文。对于V500R001C80及之后的版本,健康检查的探测报文不受安全策略控制,默认放行,无需配置相应安全策略。

    选择“策略 > 安全策略 > 安全策略”,单击“新建安全策略”。

  6. 配置Trust到Untrust区域的安全策略,允许企业内网用户访问外网资源。假设内部用户网段为10.3.0.0/24。

    选择“策略 > 安全策略 > 安全策略”,单击“新建安全策略”。

配置脚本
#
 isp name isp1_ifgroup set filename isp1.csv
 isp name isp2_ifgroup set filename isp2.csv
#
healthcheck enable
healthcheck name isp1_health
 destination 3.3.10.10 interface GigabitEthernet1/0/1 protocol tcp-simple destination-port 10001
 destination 3.3.10.11 interface GigabitEthernet1/0/1 protocol tcp-simple destination-port 10002
healthcheck name isp2_health
 destination 9.9.20.20 interface GigabitEthernet1/0/7 protocol tcp-simple destination-port 10003
 destination 9.9.20.21 interface GigabitEthernet1/0/7 protocol tcp-simple destination-port 10004
#
interface GigabitEthernet1/0/1
 ip address 1.1.1.1 255.255.255.0
 healthcheck isp1_health
 gateway 1.1.1.254
#
interface GigabitEthernet1/0/3
 ip address 10.3.0.1 255.255.255.0
#
interface GigabitEthernet1/0/7
 ip address 2.2.2.2 255.255.255.0
 healthcheck isp2_health
 gateway 2.2.2.254
#
firewall zone trust
  set priority 85
  add interface GigabitEthernet1/0/3
#
firewall zone untrust
 set priority 5
 add interface GigabitEthernet1/0/1
 add interface GigabitEthernet1/0/7
#
security-policy
 rule name policy_sec_local_untrust
  source-zone local
  destination-zone untrust
  destination-address 3.3.10.10 mask 255.255.255.255
  destination-address 3.3.10.11 mask 255.255.255.255
  destination-address 9.9.20.20 mask 255.255.255.255
  destination-address 9.9.20.21 mask 255.255.255.255
  service tcp 
  action permit      
 rule name policy_sec_trust_untrust
  source-zone trust
  destination-zone untrust
  source-address 10.3.0.0 mask 255.255.255.0
  action permit
#
interface-group 1 isp isp1_ifgroup
 add interface GigabitEthernet1/0/1
#
interface-group 2 isp isp2_ifgroup
 add interface GigabitEthernet1/0/7
#
return

相关推荐

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-03-12 08:34:05       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-03-12 08:34:05       100 阅读
  3. 在Django里面运行非项目文件

    2024-03-12 08:34:05       82 阅读
  4. Python语言-面向对象

    2024-03-12 08:34:05       91 阅读

热门阅读

  1. 华为机考:HJ2 计算某字符出现次数

    2024-03-12 08:34:05       46 阅读
  2. MFC中字符串string类型和CString类型互转方法

    2024-03-12 08:34:05       38 阅读
  3. AI大语言模型GPT & R 生态环境领域数据统计分析

    2024-03-12 08:34:05       42 阅读
  4. 单调栈的用法

    2024-03-12 08:34:05       46 阅读
  5. 初级爬虫实战——巴黎圣母院新闻

    2024-03-12 08:34:05       41 阅读
  6. 手写redis机制

    2024-03-12 08:34:05       42 阅读
  7. Spring Data访问 MongoDB(十六)----CDI集成

    2024-03-12 08:34:05       41 阅读
  8. 3.11笔记3

    2024-03-12 08:34:05       37 阅读
  9. 云原生周刊:Helm Charts 深入探究 | 2024.3.11

    2024-03-12 08:34:05       71 阅读