# Create a behavior named behavior_dbserver, and configure the action of setting the local precedence
value to 4.
[Device] traffic behavior behavior_dbserver
[Device-behavior-behavior_dbserver] remark local-precedence 4
# Create a behavior named behavior_mserver, and configure the action of setting the local precedence
value to 3.
[Device] traffic behavior behavior_mserver
[Device-behavior-behavior_mserver] remark local-precedence 3
# Create a behavior named behavior_fserver, and configure the action of setting the local precedence
value to 2.
[Device] traffic behavior behavior_fserver
[Device-behavior-behavior_fserver] remark local-precedence 2
# Create a policy named policy_server, and associate classes with behaviors in the policy.
[Device] qos policy policy_server
[Device-qospolicy-policy_server] classifier classifier_dbserver behavior
[Device-qospolicy-policy_server] classifier classifier_mserver behavior
[Device-qospolicy-policy_server] classifier classifier_fserver behavior
# Apply the policy named policy_server to the incoming traffic of GigabitEthernet 1/0/1.
[Device] interface gigabitethernet 1/0/1
[Device-GigabitEthernet1/0/1] qos apply policy policy_server inbound
Local QoS ID marking configuration example
Local QoS ID marking is mainly used for re-classifying packets of multiple classes to perform a uniform
set of actions on them as a re-classified class.
Consider the case of limiting the total rate of packets with source MAC address 0001-0001-0001 and
packets with source IP address 184.108.40.206 to 128 kbps. Without QoS local ID marking, you can only assign
fixed bandwidth to the two classes by associating each of them with a rate-limit traffic behavior. With
QoS local ID marking, however, traffic limit applies to the two classes as a whole, allowing the switch to
dynamically assign the bandwidth to the two classes depending on their traffic size.
To configure local QoS ID marking to limit the total rate of the two classes, you need to mark packets of
the two classes with the same local QoS ID; create a class to match the QoS local ID, and associate this
class with the traffic policing action.
# Create ACL 2000 to match packets with source IP address 220.127.116.11.
[Sysname] acl number 2000
[Sysname-acl-basic-2000] rule permit source 18.104.22.168 0