The policy command configures a traffic policy in a traffic policy profile.
The undo policy command deletes a traffic policy in a traffic policy profile.
By default, no traffic policy is configured in a traffic policy profile.
This command can only be executed on a parent switch.
policy policy-name remark { 8021p { 8021p-value | inner-8021p } | cvlan-id cvlan-id | dscp { dscp-value | dscp-name } | ip-precedence ip-precedence | local-precedence { local-precedence-value | local-precedence-name } [ green | yellow | red ] | vlan-id vlan-id | flow-id flow-id | destination-mac mac-address }* if-match acl acl-number
undo policy policy-name
Parameter | Description | Value |
---|---|---|
policy-name | Specifies the name of a traffic policy. |
The value is a string of 1 to 64 case-sensitive characters without spaces. If the string is enclosed in double quotation marks (" "), the string can contain spaces. |
remark | Specifies re-marking information. |
- |
8021p | Specifies the 802.1p priority of packets. |
- |
8021p-value | Specifies the 802.1p priority value of packets. |
The value is an integer in the range from 0 to 7. A larger value indicates a higher priority. |
inner-8021p | Inherits the 802.1p priority in the inner tag. |
- |
cvlan-id cvlan-id | Re-marks the inner VLAN tag in QinQ packets. |
The value is an integer in the range from 1 to 4094. |
dscp | Specifies the DSCP priority of packets. |
- |
dscp-value | Specifies the DSCP priority value of packets. |
The value is an integer in the range from 0 to 63. A larger value indicates a higher priority. |
dscp-name | Specifies the DSCP priority name of packets. |
The value can be: ef, af11, af12, af13, af21, af22, af23, af31, af32, af33, af41, af42, af43, cs1, cs2, cs3, cs4, cs5, cs6, cs7, or default. |
ip-precedence ip-precedence | Specifies the IP precedence. |
The value is an integer in the range from 0 to 7. A larger value indicates a higher priority. |
local-precedence | Specifies the local priority of packets. |
- |
local-precedence-value | Specifies the local priority value. |
The value is an integer in the range from 0 to 7. A larger value indicates a higher priority. |
local-precedence-name | Specifies the local priority name. |
The value can be: af1, af2, af3, af4, be, cs6, cs7, or ef. |
green | Indicates that the packet color corresponding to the local priority is green. |
- |
yellow | Indicates that the packet color corresponding to the local priority is yellow. |
- |
red | Indicates that the packet color corresponding to the local priority is red. |
- |
vlan-id vlan-id | Re-marks a VLAN ID in packets. |
The value is an integer in the range from 1 to 4094. |
flow-id flow-id | Specifies the value of a flow ID. |
The value is an integer in the range from 1 to 8. |
destination-mac mac-address | Re-marks the destination MAC address in packets. |
The value is in the format of H-H-H, in which H is a hexadecimal number of 1 to 4 digits. |
if-match | Specifies an ACL rule for matching packets. |
- |
acl acl-number | Specifies an ACL rule number. |
The value is an integer in the range from 3000 to 3900. |
Usage Scenario
After creating a traffic policy profile, you can configure traffic behaviors and traffic classifiers in the profile. After the profile is bound to an AS port, the traffic behaviors and traffic classifiers are automatically configured on the port.
# traffic classifier classifier-name operator or if-match acl-number # traffic behavior behavior-name remark xxxx #
#
traffic-policy profile-name inbound
#
Or: #
traffic-policy profile-name outbound
#
Precautions
A maximum of 64 traffic policies can be created in a traffic policy profile.