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

news2024/10/7 7:32:13

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

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

组网需求

如图1所示,FW作为安全网关部署在网络出口,企业分别从ISP1和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链路分别新建一个健康检查。

    <FW> system-view
    [FW] healthcheck enable
    [FW] healthcheck name isp1_health
    [FW-healthcheck-isp1_health] destination 3.3.10.10 interface GigabitEthernet 1/0/1 protocol tcp-simple destination-port 10001
    [FW-healthcheck-isp1_health] destination 3.3.10.11 interface GigabitEthernet 1/0/1 protocol tcp-simple destination-port 10002
    [FW-healthcheck-isp1_health] quit
    [FW] healthcheck name isp2_health
    [FW-healthcheck-isp2_health] destination 9.9.20.20 interface GigabitEthernet 1/0/7 protocol tcp-simple destination-port 10003
    [FW-healthcheck-isp2_health] destination 9.9.20.21 interface GigabitEthernet 1/0/7 protocol tcp-simple destination-port 10004
    [FW-healthcheck-isp2_health] quit

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

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

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

  2. 配置接口的IP地址和网关地址,并应用对应的健康检查。

    [FW] interface GigabitEthernet 1/0/1
    [FW-GigabitEthernet1/0/1] ip address 1.1.1.1 255.255.255.0
    [FW-GigabitEthernet1/0/1] gateway 1.1.1.254
    [FW-GigabitEthernet1/0/1] healthcheck isp1_health
    [FW-GigabitEthernet1/0/1] quit
    [FW] interface GigabitEthernet 1/0/3
    [FW-GigabitEthernet1/0/3] ip address 10.3.0.1 255.255.255.0
    [FW-GigabitEthernet1/0/3] quit
    [FW] interface GigabitEthernet 1/0/7
    [FW-GigabitEthernet1/0/7] ip address 2.2.2.2 255.255.255.0
    [FW-GigabitEthernet1/0/7] gateway 2.2.2.254
    [FW-GigabitEthernet1/0/7] healthcheck isp2_health
    [FW-GigabitEthernet1/0/7] quit

  3. 上传ISP地址文件到FW,可以使用SFTP方式进行传输,导入的ISP地址文件固定存放在根目录下名称为isp的文件夹内,具体步骤略。
  4. 为ISP1和ISP2分别创建运营商名称isp1_ifgrp和isp2_ifgrp,并关联对应的ISP地址文件。

    [FW] isp name isp1_ifgrp set filename isp1.csv
    [FW] isp name isp2_ifgrp set filename isp2.csv

  5. 为ISP1和ISP2分别新建一个ISP接口组,并将接口加入对应的ISP接口组,缺省下发对应的ISP路由。
    [FW] interface-group 1 isp isp1_ifgrp
    [FW-interface-isp-group-1] add interface GigabitEthernet 1/0/1
    [FW-interface-isp-group-1] quit
    [FW] interface-group 2 isp isp2_ifgrp
    [FW-interface-isp-group-2] add interface GigabitEthernet 1/0/7
    [FW-interface-isp-group-2] quit
     

  6. 将接口加入安全区域。

    [FW] firewall zone trust
    [FW-zone-trust] add interface GigabitEthernet 1/0/3
    [FW-zone-trust] quit
    [FW] firewall zone untrust
    [FW-zone-untrust] add interface GigabitEthernet 1/0/1
    [FW-zone-untrust] add interface GigabitEthernet 1/0/7
    [FW-zone-untrust] quit

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

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

    [FW] security-policy
    [FW-policy-security] rule name policy_sec_local_untrust
    [FW-policy-security-rule-policy_sec_local_untrust] source-zone local
    [FW-policy-security-rule-policy_sec_local_untrust] destination-zone untrust
    [FW-policy-security-rule-policy_sec_local_untrust] destination-address 3.3.10.10 32
    [FW-policy-security-rule-policy_sec_local_untrust] destination-address 3.3.10.11 32
    [FW-policy-security-rule-policy_sec_local_untrust] destination-address 9.9.20.20 32
    [FW-policy-security-rule-policy_sec_local_untrust] destination-address 9.9.20.21 32
    [FW-policy-security-rule-policy_sec_local_untrust] service tcp
    [FW-policy-security-rule-policy_sec_local_untrust] action permit
    [FW-policy-security-rule-policy_sec_local_untrust] quit

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

    [FW-policy-security] rule name policy_sec_trust_untrust
    [FW-policy-security-rule-policy_sec_trust_untrust] source-zone trust
    [FW-policy-security-rule-policy_sec_trust_untrust] destination-zone untrust
    [FW-policy-security-rule-policy_sec_trust_untrust] source-address 10.3.0.0 24
    [FW-policy-security-rule-policy_sec_trust_untrust] action permit
    [FW-policy-security-rule-policy_sec_trust_untrust] quit
    [FW-policy-security] quit

配置脚本
#
 isp name isp1_ifgrp set filename isp1.csv
 isp name isp2_ifgrp 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_ifgrp
 add interface GigabitEthernet1/0/1
#
interface-group 2 isp isp2_ifgrp
 add interface GigabitEthernet1/0/7
#
return

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1509452.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

Python机器学习预测+回归全家桶,新增TCN,BiTCN,TCN-GRU,BiTCN-BiGRU等组合模型预测...

截止到本期&#xff0c;一共发了4篇关于机器学习预测全家桶Python代码的文章。参考往期文章如下&#xff1a; 1.机器学习预测全家桶-Python&#xff0c;一次性搞定多/单特征输入&#xff0c;多/单步预测&#xff01;最强模板&#xff01; 2.机器学习预测全家桶-Python&#xff…

el-table中 el-popover 性能优化

场景&#xff1a;在 el-table 中使用 el-popover ,出现了 loading 加载卡顿的问题&#xff0c;接口返回的数据的时间大概是 140ms &#xff0c;所以不是接口慢的原因&#xff1b;通过对表中结构的逐步排查&#xff0c;发现是表中的 某一行 所影响的&#xff1b;并且 其中含有 e…

qt 汉字输出 中文输出 显示乱码 qDebug() 乱码 解决

要正确显示汉字&#xff0c;必须要先了解计算机文字编码相关知识&#xff0c;参考&#xff1a;unicode ucs2 utf16 utf8 ansi GBK GB2312 互转 及 渲染_ucs2编码转换-CSDN博客 1、汉字输出到 应用程序输出面板 qt 自定义的输出类qDebug() 、QDebug对象、QMessageLogger默认输…

单例模式及线程安全的实践

&#x1f31f; 欢迎来到 我的博客&#xff01; &#x1f308; &#x1f4a1; 探索未知, 分享知识 !&#x1f4ab; 本文目录 引言基本的单例模式长啥样&#xff1f;怎样才能线程安全&#xff1f;**懒汉模式** ( 双 重 检 查 ) &#x1f389;总结&#x1f389; 引言 单例模式是个…

WebPack自动吐出脚本

window.c c; window.res ""; window.flag false;c function (r) {if (flag) {window.res window.res "${r.toString()}" ":" (e[r] "") ",";}return window.c(r); }代码改进了一下&#xff0c;可以过滤掉重复的方…

酷开科技发力研发酷开系统,让家庭娱乐生活更加丰富多彩

在这个快节奏的社会&#xff0c;家庭娱乐已成为我们日常生活中不可或缺的一部分&#xff0c;为了给家庭带来更多欢笑与感动&#xff0c;酷开科技发力研发出拥有丰富内容和技术的智能电视操作系统——酷开系统&#xff0c;它集合了电影、电视剧、综艺、游戏、音乐等海量内容&…

腾讯云和阿里云4核8G云服务器多少钱一年和1个月费用对比

4核8G云服务器多少钱一年&#xff1f;阿里云ECS服务器u1价格955.58元一年&#xff0c;腾讯云轻量4核8G12M带宽价格是646元15个月&#xff0c;阿腾云atengyun.com整理4核8G云服务器价格表&#xff0c;包括一年费用和1个月收费明细&#xff1a; 云服务器4核8G配置收费价格 阿里…

6.S081的Lab学习——Lab1: Xv6 and Unix utilities

文章目录 前言一、启动xv6(难度&#xff1a;Easy)解析&#xff1a; 二、sleep(难度&#xff1a;Easy)解析&#xff1a; 三、pingpong&#xff08;难度&#xff1a;Easy&#xff09;解析&#xff1a; 四、Primes(素数&#xff0c;难度&#xff1a;Moderate/Hard)解析&#xff1a…

pymysql连不上mysql的原因

我试了两种解决办法。可以参考一下 第一种&#xff1a;查看有没有打开mysql服务 第二种&#xff1a;刷新 MySQL 用户权限 password改成自己的密码 GRANT ALL PRIVILEGES ON *.* TO root% IDENTIFIED BY password WITH GRANT OPTION;FLUSH PRIVILEGES; 第三种&#xff1a;检…

CSS3的一些常用语句以及解释

margin和padding position static 该关键字指定元素使用正常的布局行为&#xff0c;即元素在文档常规流中当前的布局位置。此时 top, right, bottom, left 和 z-index 属性无效。 relative 该关键字下&#xff0c;元素先放置在未添加定位时的位置&#xff0c;再在不改变页面…

C# 入门

教程&#xff1a; .NET | 构建。测试。部署。 (microsoft.com) C# 文档 - 入门、教程、参考。 | Microsoft Learn C# 数据类型 | 菜鸟教程 (runoob.com) IDE&#xff1a; Visual Studio: 面向软件开发人员和 Teams 的 IDE 和代码编辑器 (microsoft.com) Rider&#xff1a…

Net8 ABP VNext集成FreeSql、SqlSugar

ABP可以快速搭建开发架构&#xff0c;但是内置的是EFCore&#xff0c;国内中小企业使用FreeSql与SqlSugar还是较多&#xff0c;为新手提供使用提供参考 ABP、FreeSql、SqlSugar参考地址&#xff1a; ABP Framework | Open source web application framework for ASP.NET Core…

Buildroot 之二 详解构建架构、流程、external tree、示例

构建系统 Buildroot 中的构建系统使用的是从 Linux Kernel(4.17-rc2) 中移植的 Kconfig(配置) + Makefile & Kbuild(编译)这套构建系统,移植后的源码位于 support/kconfig/ 目录下。Buildroot 本身是一个构建系统,与直接编译源码不同,因此,它对这套系统进行了比较…

【恒源智享云】conda虚拟环境的操作指令

conda虚拟环境的操作指令 由于虚拟环境经常会用到&#xff0c;但是我总忘记&#xff0c;所以写个博客&#xff0c;留作自用。 在恒源智享云上&#xff0c;可以直接在终端界面输入指令&#xff0c;例如&#xff1a; 查看已经存在的虚拟环境列表 conda env list查看当前虚拟…

SpringDataRedis笔记

spring:application:name: springdataredisredis:host: 120.0.0.1port: 6379password: 123456lettuce:pool:#最大连接数 默认就是8max-active: 8#最大空闲连接 默认就是8max-idle: 8#最小空闲连接 默认是0min-idle: 0#连接等待时间 默认-1无限等待max-wait: 100RedisTemplate默…

es 进阶查询

准备数据 先准备一些数据 #指定ik分词器 PUT /es_db {"settings" : {"index" : {"analysis.analyzer.default.type": "ik_max_word"}} }# 创建文档,指定id PUT /es_db/_doc/1 { "name": "张三", "sex"…

【鸿蒙 HarmonyOS 4.0】Web组件

一、介绍 页面加载是Web组件的基本功能。根据页面加载数据来源可以分为三种常用场景&#xff0c;包括加载网络页面、加载本地页面、加载HTML格式的富文本数据。 二、加载网页 2.1、加载在线网页 Web组件的使用非常简单&#xff0c;只需要在Page目录下的ArkTS文件中创建一个…

ArcGIS学习(十六)基于交通网络的城市情景分析

ArcGIS学习(十六)基于交通网络的城市情景分析 本任务给大家带来一个非常重要的内容一一基于交通网络的城市情景分析。基于交通网络模拟交通出行并进行相关分析是ArcGIS里面一种常用的分析方法,大家一定要掌握!本任务包括三个关卡: 交通网络模型构建基于交通网络模型的基本…

mysql show profile 简单使用

mysql官网 http://dev.mysql.com/doc/refman/ 1、是否支持&#xff0c;看看当前的mysql版本是否支持 show variables like profiling;2、开启功能&#xff0c;默认是关闭&#xff0c;使用前需要开启 set profilingon;3、运行sql 4、查看结果&#xff0c;show profiles; 5、…

Acer宏碁非凡Swift SFG16-71工厂模式原厂Win11系统,预装OEM系统恢复开箱状态

宏基笔记本电脑SFG16-71原装出厂Windows11系统安装工厂包下载&#xff0c;带恢复重置功能 链接&#xff1a;https://pan.baidu.com/s/1JK02kBbwKG_cIBNlEOzrOw?pwdzdfm 提取码&#xff1a;zdfm 原装工厂包系统自带所有驱动、Office办公软件、出厂时自带主题壁纸图片、系统…