Why Does a Traffic Policy Containing User-defined ACL Rules Fail to Be Applied i

m7g
m7g  Diamond  (1)
7 years 10 months ago  View: 1578  Reply: 0
1F
        The cause is that the offset values of user-defined ACLs in the traffic policy are different. In a traffic policy, offset values of user-defined ACLs must be the same. 


The configuration procedure is as follows:

  •  Configure user-defined ACL rules.
[HUAWEI]acl number 5000
[HUAWEI-acl-user-5000]rule 5 permit l4-head 0x00000868 0x0000ffff 0 //The offset is 0.
[HUAWEI-acl-user-5000]rule 10 permit l4-head 0x00060000 0x00ff0000 24 //The offset is 24.

[HUAWEI-acl-user-5000]quit


  •  Configure a traffic classifier.
[HUAWEI]traffic classifier c5000 operator or
[HUAWEI-classifier-c5000]if-match acl 5000

[HUAWEI-classifier-c5000]quit


  •  Configure a traffic behavior.
[HUAWEI]traffic behavior b5000
[HUAWEI-behavior-b5000]redirect interface GigabitEthernet 0/0/4

[HUAWEI-behavior-b5000]quit


  •  Configure a traffic policy and apply the traffic policy to the inbound direction of an interface.
[HUAWEI]traffic policy p5000
[HUAWEI-trafficpolicy-p5000]classifier c5000 behavior b5000
[HUAWEI-trafficpolicy-p5000]quit
[HUAWEI]interface GigabitEthernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1]traffic-policy p5000 inbound

Info: This operation maybe take a long time, please wait for a moment.


  •  The following error message is displayed:
Error:Add rule failed, slot 0, policy p5000, class c5000, behavior b5000 acl 5000, rule 10, on interface GigabitEthernet0/0/1.