Configuring a Traffic Behavior
Pre-configuration Tasks
Before configuring a traffic behavior, configure 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 collection.
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 view of an existing traffic behavior is displayed.
- Define actions in the traffic behavior. You can configure multiple non-conflicting actions 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 collection and flow mirroring.
For details on how to configure packet filtering, see Packet Filtering Configuration.
Priority re-marking
remark 8021p 8021p-value
remark dscp { dscp-name | dscp-value }
remark local-precedence { local-precedence-name | local-precedence-value }
remark ip-precedence ip-precedence
For details on how to configure MQC-based priority re-marking, see Configuring MQC-based Priority Re-marking.
Redirection
redirect interface interface-type interface-number
A traffic policy containing redirect interface can only be applied to the inbound direction.
For details on how to configure redirection, see Redirection Configuration.
Traffic policing
car [ aggregation ] cir cir-value [ pir pir-value ] [ cbs cbs-value pbs pbs-value ] [ green pass ] [ yellow { discard | pass [ remark-dscp dscp-value | remark-8021p 8021p-value ] } ] [ red { discard | pass [ remark-dscp dscp-value | remark-8021p 8021p-value ] } ]
For details on how to configure MQC-based traffic policing, see Configuring MQC to Implement Traffic Policing.
Flow mirroring
mirroring to observe-port observe-port-index
The switch does not support flow mirroring in the outbound direction.
For details on how to configure MQC-based flow mirroring, see Configuring MQC-based Local Traffic Mirroring in "Mirroring Configuration" in the S600-E V200R010C00 Configuration Guide - Network Management and Monitoring.
PBR
redirect ip-nexthop { ip-address [ track-nqa admin-name test-name ] } &<1-4> [ forced ]
redirect ipv6-nexthop { ipv6-address | link-local link-local-address interface interface-type interface-number } &<1-4> [ forced ]
The traffic policy containing PBR is only valid for IP packets.
For details on how to configure PBR, see Configuring PBR in "PBR Configuration" in the S600-E V200R010C00 Configuration Guide - IP Unicast Routing.
VLAN mapping
remark vlan-id vlan-id
For details on how to configure MQC-based VLAN mapping, see Configuring MQC-based VLAN Mapping in "VLAN Mapping Configuration" in the S600-E V200R010C00 Configuration Guide - Ethernet Switching.
Traffic statistics
statistic enable
For details on how to configure traffic statistics, see Traffic Statistics Configuration.
- Run:
quit
Exit from the traffic behavior view.