Applying a Traffic Policy
Pre-configuration Tasks
Before applying a traffic policy, configure the traffic policy.
Procedure
For details about the configuration guidelines of applying traffic policies in different views on the CE12800, see Licensing Requirements and Limitations for MQC (CE12800).
For details about the configuration guidelines of applying traffic policies in different views on the CE12800E, see Licensing Requirements and Limitations for MQC (CE12800E).
For the CE12800 and the CE12800E equipped with FD-X series cards, run the display traffic-policy pre-state { global [ slot slot-id ] | interface { interface-type interface-number } | vlan vlan-id | bridge-domain bd-id } policy-name { inbound | outbound } command before committing the configuration to check the information about resources occupied by the traffic policy to be applied and determine whether the traffic policy can be successfully applied based on the information.
- If a traffic policy needs to be applied to multiple VLANs and interfaces or multiple traffic classifiers for matching packets from different source IP addresses need to be bound to the same traffic policy, you are advised to add these VLANs, source IP addresses, and interfaces to the same QoS group and apply the traffic policy to the QoS group.
- Applying a traffic policy to an interface
Run system-view
The system view is displayed.
Run interface interface-type interface-number
The interface view is displayed.
Run traffic-policy policy-name { inbound | outbound }
A traffic policy is applied to the interface.
Run commit
The configuration is committed.
- Applying a traffic policy to a VLAN
Run system-view
The system view is displayed.
Run vlan vlan-id
The VLAN view is displayed.
Run traffic-policy policy-name { inbound | outbound }
A traffic policy is applied to the VLAN.
The system applies traffic policing to the packets that belong to the VLAN and match traffic classification rules in the inbound or outbound direction.
Run commit
The configuration is committed.
- Applying a traffic policy to the system or an LPU
Run system-view
The system view is displayed.
Run traffic-policy policy-name global [ slot slot-id ] { inbound | outbound }
A traffic policy is applied to the system or an LPU.
Run commit
The configuration is committed.
- (For CE12800) Applying a traffic policy to a VSI
Run system-view
The system view is displayed.
Run vsi vsi-name
The VSI view is displayed.
Run traffic-policy policy-name { inbound | outbound }
A traffic policy is applied to the VSI.
Run commit
The configuration is committed.
- Applying a traffic policy in a VPN instance
Run system-view
The system view is displayed.
(Optional) Run qos port-group group-id
A QoS port group is created and the QoS port group view is displayed.
The CE12800E configured with ED-E, EG-E, and EGA-E series cards does not support the QoS interface group configuration.
(Optional) Run group-member { interface-type interface-number1 [ to interface-type interface-number2 ] }
The specified interfaces are added to the QoS interface group.
(Optional) Run quit
Exit from the QoS interface group view.
Run ip vpn-instance vpn-instance-name
A VPN instance is created and its view is displayed.
Run traffic-policy policy-name inbound [ exclude qos port-group group-id ]
A traffic policy is applied to the VPN instance.
Run commit
The configuration is committed.
- Applying a traffic policy to a QoS group
Run system-view
The system view is displayed.
Run qos group group-name
The QoS group view is displayed.
Run the following commands as required:
Run the group-member interface { interface-type interface-number1 [ to interface-type interface-number2 ] } &<1-8> command to add interfaces to the QoS group.
Run the group-member vlan { vlan-id1 [ to vlan-id2 ] } &<1-8> command to add VLANs to the QoS group.
(For CE12800E) Run the group-member ip source ip-address { mask | mask-length } command to add source IP addresses to the QoS group.
Run traffic-policy policy-name { inbound | outbound }
A traffic policy is applied to the QoS group.
Run commit
The configuration is committed.
- Applying a traffic policy to a BD
Run system-view
The system view is displayed.
Run bridge-domain bd-id
The BD view is displayed.
Run traffic-policy policy-name { inbound | outbound }
A traffic policy is applied to the BD.
Run commit
The configuration is committed.