华为的策略路由配置

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了华为的策略路由配置相关的知识,希望对你有一定的参考价值。

配置步骤

技术分享图片

具体命令

<Huawei>sy————————(进入系统视图)

[Huawei]time-range access-time from 0:0 2018/1/1 to 23:59 2019/12/31  配置ACL生效时间段,该时间段是一个绝对时间段模式的时间段
[Huawei]time-range access-time 14:00 to 18:00 off-day  

[Huawei]acl 3000—————(进入acl视图,禁止端口属于扩展acl,编号范围为3000~3999)
[Huawei-acl-adv-3000]rule 10 permit 协议类型 destination 目的主机 0.0.0.0 destination-port eq目的端口号
[Huawei-acl-adv-3000]quit

[Huawei] traffic classifier test1——————配置流分类
[Huawei-classifier-test1] if-match acl3000———————————匹配ACL
[Huawei-classifier-test1]quit

[Huawei]traffic behavior test2——————配置流行为
[Huawei-behavior-test2]deny—————————————————流行为为拒绝
[Huawei-behavior-test2]quit

[Huawei] traffic policy test3———————配置流策略
[Huawei-trafficpolicy-test3] classifier test1 behavior test2————匹配流test1后行为为test2
[Huawei-trafficpolicy-test3] quit
[Huawei] traffic-policy test3 global inbound—————————在全局入方向调用流策略test3


[Switch] interface gigabitethernet 1/0/1
[Switch-GigabitEthernet1/0/1] traffic-policy test3 inbound  //流策略应用在接口入方向
[Switch-GigabitEthernet1/0/1] quit


display traffic-policy applied-record  查看流策略的应用信息
display traffic policy user-defined 查看流策略的配置信息

以上是关于华为的策略路由配置的主要内容,如果未能解决你的问题,请参考以下文章

华为路由器配置策略路由

华为交换机策略路由配置

华为策略路由应用案例

华为设备配置基于源地址的策略路由

华为的策略路由配置

华为USG6320做双线-基于源地址的策略路由