策略路由配置

策略路由分为4步骤

步骤1 配置匹配流分类信息

traffic classifier a20 
traffic classifier a30 
traffic classifier a40 

步骤2 配置匹配流分类信息后要执行的流行为

traffic behavior a20
 permit
traffic behavior a30
 permit
traffic behavior a40
 permit

步骤3 将流分类信息和流行为组合为流策略

traffic policy aaa
 classifier a20 behavior a20
 classifier a30 behavior a30
 classifier a40 behavior a40

步骤4 将流策略应用到接口、vlan、单板、全局

vlan 66
traffic-policy aaa inbound
quit

如何定义traffic policy 的优先级

traffic policy aaa
 classifier a20 behavior a20
 classifier a30 behavior a30
 classifier a40 behavior a40
默认classifier xx behavior xx 是没有提供precedence优先级参数。
那么如何可以实现呢???

是不是有人打技术支持电话,也告诉你S9306就是这么设计的,不知道怎么确定优先级。

我们首先来看一下traffic classifier 的优先级:

[9306]display traffic classifier user-defined a20 
    User Defined Classifier Information:
     Classifier: a20
        Precedence: 105      #优先级是105
        Operator: OR
        Rule(s) : -none- 

[zhonghai9306]display traffic classifier user-defined a30 
    User Defined Classifier Information:
     Classifier: a30
        Precedence: 108      #优先级是108
        Operator: OR
        Rule(s) : -none- 

[zhonghai9306]display traffic classifier user-defined a40
    User Defined Classifier Information:
     Classifier: a40
        Precedence: 110     #优先级是110
        Operator: OR
        Rule(s) : -none- 

traffice classifier xx 已经有了优先级。
我们试着修改:traffic classifier a30 修改成120
                traffic classifier a30 precedence 120

traffice policy的顺序就会跟着变化:

traffic policy aaa match-order config
     classifier a20 behavior a20
     classifier a40 behavior a40
     classifier a30 behavior a30

traffic classifier xx 优先级很重要

结束!