华为配置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。

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

配置脚本
javascript 复制代码
#
 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
相关推荐
少妇的美梦15 小时前
logstash教程
运维
chen94516 小时前
k8s集群部署vector日志采集器
运维
chen94516 小时前
aws ec2部署harbor,使用s3存储
运维
白帽黑客沐瑶21 小时前
【网络安全就业】信息安全专业的就业前景(非常详细)零基础入门到精通,收藏这篇就够了
网络·安全·web安全·计算机·程序员·编程·网络安全就业
christine-rr21 小时前
linux常用命令(4)——压缩命令
linux·服务器·redis
東雪蓮☆21 小时前
深入理解 LVS-DR 模式与 Keepalived 高可用集群
linux·运维·服务器·lvs
qq_2642208921 小时前
LVS负载均衡群集和LVS+Keepalived群集
运维·负载均衡·lvs
树码小子21 小时前
Java网络编程:(socket API编程:TCP协议的 socket API -- 回显程序的服务器端程序的编写)
java·网络·tcp/ip
乌萨奇也要立志学C++21 小时前
【Linux】进程概念(二):进程查看与 fork 初探
linux·运维·服务器
雨落Liy21 小时前
Nginx 从入门到进阶:反向代理、负载均衡与高性能实战指南
运维·nginx·负载均衡