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.
Context
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
Packet filtering
deny | permit
Configure a QoS group that packets belong to
remark qos-group qos-group-value
Priority re-marking by MQC
remark 8021p 8021p-value
remark cvlan-8021p 8021p-value
remark dscp { dscp-name | dscp-value }
remark mpls-exp exp-value
remark fr-de fr-de-value
remark local-precedence local-precedence-value
NOTE:AR600 and AR1600 series do not support fr-de.
V300R019C10 and earlier versions: AR600 series does not support MPLS. V300R019C11 and later versions: AR611W, AR611W-LTE4CN, AR617VW, AR617VW-LTE4EA, AR617VW-LTE4, AR651C, and AR651F-Lite do not support MPLS.
If a traffic behavior contains remark 8021p, remark mpls-exp, or remark dscp, but not remark local-precedence, the device marks the local priority of packets with 0.
Traffic policing by MQC
car cir { cir-value | pct cir-percentage } [ pir { pir-value | pct pir-percentage } ] [ cbs cbs-value pbs pbs-value ] [ share ] [ mode { color-blind | color-aware } ] [ green { discard | pass [ remark-8021p 8021p-value | remark-dscp dscp-value | remark-mpls-exp exp-value ] } ] [ yellow { discard | pass [ remark-8021p 8021p-value | remark-dscp dscp-value | remark-mpls-exp exp-value ] } ] [ red { discard | pass [ remark-8021p 8021p-value | remark-dscp dscp-value | remark-mpls-exp exp-value ] } ]
NOTE:V300R019C10 and earlier versions: AR600 series does not support MPLS. V300R019C11 and later versions: AR611W, AR611W-LTE4CN, AR617VW, AR617VW-LTE4EA, AR617VW-LTE4, AR651C, and AR651F-Lite do not support MPLS.
Traffic shaping by MQC
gts cir { cir-value [ cbs cbs-value ] | pct pct-value } [ queue-length queue-length ]
Adaptive traffic shaping by MQC
gts adaptation-profile adaptation-profile-name
Congestion management by MQC
queue af bandwidth { bandwidth | [ remaining ] pct percentage }
queue ef bandwidth { bandwidth [ cbs cbs-value ] | pct percentage [ cbs cbs-value ] }
queue llq bandwidth { bandwidth [ cbs cbs-value ] | pct percentage [ cbs cbs-value ] }
queue wfq [ queue-number total-queue-number ]
queue-length { bytes bytes-value | packets packets-value }*
Congestion avoidance by MQC
drop-profile drop-profile-name
Unicast PBR
redirect ip-nexthop ip-address [ vpn-instance vpn-instance-name ] [ track { nqa admin-name test-name | ip-route ip-address { mask | mask-length } | vrrp vrid interface interface-type interface-number | interface interface-type interface-number } ] [ post-nat ] [ discard ] [ sfc-nsh spi spi-index si si-index ]
redirect ipv6-nexthop ipv6-address [ track { nqa nqa-admin nqa-name | ipv6-route ipv6–address mask-length } ] [ discard ]
redirect interface interface-type interface-number [ track { nqa admin-name test-name | bfd-session bfd-session | ip-route ip-address { mask | mask-length } weak | ipv6-route ipv6-address mask-length } ] [ discard ]
NOTE:V300R019C10 and later versions support weak parameter.
V300R019C13 and later versions support bfd-session bfd-session parameter.
redirect vpn-instance vpn-instance-name
NOTE:Layer 2 VE interfaces do not support this function.
redirect backup-nexthop ip-address [ [ vpn-instance vpn-instance-name ] [ track { interface interface-type interface-number | nqa admin-name test-name } ] ]
Sub traffic policy binding
traffic-policy policy-name
Traffic statistics
statistic enable
Configure MQC to implement URL filtering
url-filter-profile profile-name
Configure the device to add a VLAN tag to packets
add-tag vlan-id vlan-id
NOTE:Only the AR651-X8, AR651W-X4, and AR1610-X6 support this function.
When an interface is added to a network bridge, the traffic behavior that is configured on the interface in the inbound direction can only define the following actions:- Re-marking the 802.1p priority in VLAN packets.
- Configuring MQC to implement traffic policing.
- Traffic statistics.
- Run quit
Exit from the traffic behavior view.