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 switch 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.
For details about precautions for each action, see the corresponding commands in the Command Reference.
Action
Command
Packet filtering
deny | permit
MQC-based re-marking
Re-marking the 802.1p priority in VLAN packets
For the CE12800 and CE12800E configured with ED-E, EG-E, and EGA-E series cards:
remark 8021p 8021p-value
For the CE12800E configured with FD-X series cards:
remark 8021p { 8021p-value | inner-8021p }
Re-marking the DSCP priority in IP packets
remark dscp { dscp-name | dscp-value }
Re-marking the internal priority in packets
remark local-precedence { local-precedence-name | local-precedence-value } [ green | yellow | red ]
Re-marking the VXLAN reserved field
remark vxlan reserved-value reserved-value
NOTE:Only the CE12800E supports this command.
Re-marking the local ID
remark qos-local-id qos-local-id
NOTE:Only the CE12800E configured with FD-X series cards supports this command.
Redirection
Redirecting packets to the CPU
redirect cpu
Redirecting packets to an interface
redirect interface interface-type interface-number [ fail-action forward ]
Redirecting packets to an observing port group
redirect observe-port group group-id
NOTE:The CE12800E does not support this command.
Redirecting IP packets to a public LSP
redirect lsp public dest-address
NOTE:The CE12800E does not support this command.
Redirecting packets to a GRE tunnel or an MPLS tunnel interface
redirect interface tunnel tunnel-id [ fail-action forward ]
NOTE:The CE12800E equipped with ED-E, EG-E, and EGA-E series cards does not support this command.
Redirecting packets to multiple MPLS TE tunnel interfaces
redirect load-balance interface tunnel { tunnel tunnel-id [ weight weight-value ] } &<1-64>
NOTE:The CE12800E does not support this command.
MQC-based traffic policing
For the CE12800E:
car cir cir-value [ kbps | mbps | gbps ] [ pir pir-value [ kbps | mbps | gbps ] ] [ cbs cbs-value [ bytes | kbytes | mbytes ] pbs pbs-value [ bytes | kbytes | mbytes ] ] [ share ] [ mode { color-blind | color-aware } ] [ green pass [ service-class class color color-value ] | yellow { discard | pass [ service-class class color color-value ] } | red { discard | pass [ service-class class color color-value ] } ] *
For the CE12800:
car cir cir-value [ kbps | mbps | gbps ] [ pir pir-value [ kbps | mbps | gbps ] ] [ cbs cbs-value [ bytes | kbytes | mbytes ] pbs pbs-value [ bytes | kbytes | mbytes ] ] [ share ] [ mode { color-blind | color-aware } ]
Hierarchical traffic policing
car car-name share
NOTE:The CE12800E equipped with FD-X series cards does not support this command.
MQC-based flow mirroring
For the CE12800:
mirroring observe-port observe-port-index &<1-8> [ random-packets random-packets ]
mirroring observe-port group group-id
For CE12800E series switches:
mirroring observe-port observe-port-index
Disabling URPF
ip urpf disable
NOTE:Only the CE12800E supports this command.
Unicast PBR
Redirecting packets to one next-hop IP address
redirect [ vpn-instance vpn-instance-name ] nexthop { ip-address [ track nqa admin-name test-name [ reaction probe-failtimes fail-times ] ] } &<1-16> [ fail-action discard ] [ low-precedence [ source vpn-instance vpn-instance-name ] ]
redirect ipv6 [ vpn-instance vpn-instance-name ] nexthop { ipv6-address [ track nqa admin-name test-name [ reaction probe-failtimes fail-times ] ] } &<1-16> [ fail-action discard ]
Redirecting packets to multiple next-hop IP addresses
redirect load-balance [ vpn-instance vpn-instance-name ] nexthop { ip-address [ track nqa admin-name test-name [ reaction probe-failtimes fail-times ] ] } &<1-16> [ fail-action discard ] [ low-precedence [ source vpn-instance vpn-instance-name ] ]
redirect load-balance ipv6 load-balance [ vpn-instance vpn-instance-name ] nexthop { ipv6-address [ track nqa admin-name test-name [ reaction probe-failtimes fail-times ] ] } &<1-16> [ fail-action discard ]
Redirect packets to the remote next hop
redirect remote [ vpn-instance vpn-instance-name ] ip-address [ track nqa admin-name test-name [ reaction probe-failtimes fail-times ] ] [ exact ] [ low-precedence [ source vpn-instance vpn-instance-name ] ]
redirect remote [ vpn-instance vpn-instance-name ] ipv6-address [ exact ]
Disabling MAC address learning
mac-address learning disable
MQC-based VLAN mapping
vlan-mapping { vlan vlan-id | inner-vlan inner-vlan-id }
NOTE:Only the CE12800E supports this command.
MQC-based selective QinQ
vlan-stacking vlan vlan-id
NOTE:Only the CE12800E supports this command.
Traffic statistics collection
statistics enable
- Run commit
The configuration is committed.