Configuring a Traffic Behavior
Pre-configuration Tasks
Configuring link layer attributes of interfaces to ensure that the interfaces work properly
Background
The device supports actions including packet filtering, priority re-marking, redirection, traffic policing, and traffic statistics.
Procedure
- Run:
system-view
The system view is displayed.
- Run:
traffic behavior behavior-name
A traffic behavior is created and the traffic behavior view is displayed, or the existing traffic behavior view is displayed.
- Define actions in the traffic behavior. You can configure
actions that do not conflict in a traffic behavior.
Action
Command
Remarks
Packet filtering
deny | permit
In the same traffic behavior, the deny action cannot be used with other traffic actions except for traffic statistics and flow mirroring.
Priority re-marking
remark 8021p [ 8021p-value | inner-8021p ]
remark dscp { dscp-name | dscp-value }
remark ip-precedence ip-precedence
remark destination-mac mac-address
A traffic policy containing remark 8021p inner-8021p, remark local-precedence, remark ip-precedence, and remark destination-mac can be applied to the inbound direction only.
If a traffic policy containing remark 8021p is applied to the outbound direction on an interface, the VLAN of the interface must work in tag mode.
The remark 8021p and remark local-precedence commands cannot be used in the same traffic behavior.
In a traffic behavior, the remark destination-mac command cannot be used with the redirect ip-nexthop or redirect ip-multihop command.
Redirection
redirect cpu
redirect interface interface-type interface-number
The traffic policy containing redirect interface and redirect cpu can be applied to the inbound direction only.
Traffic policing
car [ aggregation ] cir cir-value cbs cbs-value(other S2700EI models except S2700-52P-EI and S2700-52P-PWR-EI)
car [ aggregation ] cir cir-value [ pir pir-value ] [ cbs cbs-value pbs pbs-value ] [ green { discard | pass [ remark-dscp dscp-value | remark-8021p 8021p-value ] } ] [ yellow { discard | pass [ remark-dscp dscp-value | remark-8021p 8021p-value ] } ] [ red { discard | pass [ remark-dscp dscp-value | remark-8021p 8021p-value ] } ](S2700-52P-EI, S2700-52P-PWR-EI, S2710SI, S3700SI, or S3700EI)
For the S3700EI, S3700SI, S2752P-EI, S2700EI, and S2710SI, if a traffic behavior defines the car command with remark-8021p 8021p-value specified, a traffic policy containing this traffic behavior can only be applied in the outbound direction.
Flow mirroring
mirroring to observe-port observe-port-index
-
PBR
redirect ip-nexthop ip-address &<1-4> [ forced ]
redirect ipv6-nexthop { ipv6-address | link-local link-local-address interface interface-type interface-number } &<1-4> [ forced ]
redirect ip-multihop { nexthop ip-address } &<2-4>
redirect ipv6-multihop { ipv6-address | link-local link-local-address interface interface-type interface-number } &<2-4>
In a traffic behavior, the PBR and remark destination-mac commands cannot be used simultaneou sly.
VLAN mapping
remark vlan-id vlan-id
-
Traffic statistics
statistic enable
-
- Run:
quit
The traffic behavior view is quitted.