QoS Profile and SAC Profile
This section describes the configuration model of the QoS profile and SAC profile and provides examples of XML packets.
Data Model
The configuration model file matching the QoS profile is huawei-qos-profile.yang.
The configuration model files matching the SAC profile are huawei-aaa.yang and huawei-qos-profile.yang.
The /huawei-qos-profile:qos-profiles/profile/qos-para/remark-priority object can be configured only on the X series cards.
The /hw-qos-profile:flow-wred-profiles, /huawei-qos-profile:flow-queue-profiles, and /huawei-qos-profile:qos-profiles/profile/qos-para/user-queue objects can be configured only on the X1E series cards and X6H series cards.
An SAC profile can be configured only on the S12700E. That is, the /huawei-qos-profile:sac-profiles and /huawei-aaa:aaa/service-scheme/sac-profile objects can be configured only on the S12700E.
Object |
Description |
Value |
Remarks |
---|---|---|---|
/huawei-qos-profile:qos-profiles/profile/name |
Indicates the name of a QoS profile. |
The value is a string of 1 to 31 case-sensitive characters without spaces. If the string is enclosed in double quotation marks ("), the string can contain spaces. The value cannot be --. |
The switch supports a maximum of 64 QoS profiles. |
/huawei-qos-profile:qos-profiles/profile/qos-para/car-para/direction |
Indicates the direction of traffic policing. |
The value is of the enumerated type:
|
N/A |
/huawei-qos-profile:qos-profiles/profile/qos-para/car-para/cir |
Indicates the committed information rate (CIR), which is the guaranteed average transmission rate. |
The value is an integer in the range from 64 to 4294967295, in kbit/s. |
If traffic policing is configured in a QoS profile, this object must be configured. |
/huawei-qos-profile:qos-profiles/profile/qos-para/car-para/cbs |
Indicates the committed burst size (CBS), which is the average volume of burst traffic that can pass through an interface. |
The value is an integer in the range from 4000 to 4294967295, in bytes. If the peak information rate (PIR) is not set, the default CBS is 188 times the CIR. If the PIR is set, the default CBS is 125 times the CIR. |
This object must be configured together with the /huawei-qos-profile:qos-profiles/profile/qos-para/car-para/pbs object. |
/huawei-qos-profile:qos-profiles/profile/qos-para/car-para/pir |
Indicates the PIR, which is the maximum rate of traffic that can pass through an interface. |
The value is an integer in the range from 64 to 4294967295, in kbit/s. The PIR must be greater than or equal to the CIR. The default PIR is equal to the CIR. |
N/A |
/huawei-qos-profile:qos-profiles/profile/qos-para/car-para/pbs |
Indicates the peak burst size (PBS), which is the maximum volume of burst traffic that can pass through an interface. |
The value is an integer in the range from 4000 to 4294967295, in bytes. If the PIR is not set, the default PBS is 313 times the CIR. If the PIR is set, the default PBS is 125 times the PIR. |
This object must be configured together with the /huawei-qos-profile:qos-profiles/profile/qos-para/car-para/cbs object. |
/huawei-qos-profile:qos-profiles/profile/qos-para/remark-priority/direction |
Indicates the direction in which the priority of packets is re-marked. |
The value is of the enumerated type:
|
This object must be configured regardless of whether the 802.1p priority of VLAN packets or the DSCP priority of IP packets is re-marked. When the 802.1p priority of VLAN packets is re-marked, this object is meaningless. However, to ensure that other objects are configured successfully, you must set this object to inbound or outbound. In the configurations for re-marking the priority of 802.1p packets, if this object is set to inbound in one group of configuration and to outbound in another group of configuration, the re-marked priority must be the same in the two groups of configurations that are delivered concurrently. Otherwise, the configurations fail to be delivered. If you need to delete the configurations for re-marking the priority of packets, you must delete the two groups of configurations. |
/huawei-qos-profile:qos-profiles/profile/qos-para/remark-priority/priority-type |
Indicates the type of the priority to be re-marked for packets. |
The value is of the enumerated type:
|
N/A |
/huawei-qos-profile:qos-profiles/profile/qos-para/remark-priority/priority-value |
Indicates the value of the priority to be re-marked for packets. |
The value is an integer. A larger value indicates a higher priority. If the priority type is dscp, the value is an integer in the range from 0 to 63. If the priority type is 8021p, the value is an integer in the range from 0 to 7. |
If the packet priority is re-marked multiple times, the latest configuration takes effect. |
/huawei-qos-profile:qos-profiles/profile/qos-para/user-queue/pir |
Indicates the peak information rate (PIR) of a subscriber queue, which is the maximum rate of traffic that can pass through an interface. |
The value is an integer in the range from 64 to 10000000, in kbit/s. |
N/A |
/huawei-qos-profile:qos-profiles/profile/qos-para/user-queue/flow-queue-profile |
Indicates the name of the referenced flow queue profile. If the name of the referenced flow queue profile is not specified, the flow queue profile default is used. |
The value must be the name of an existing flow queue profile. |
N/A |
/huawei-qos-profile:flow-wred-profiles/flow-wred-profile/name |
Indicates the name of a flow queue WRED drop profile. |
The value is a string of 1 to 31 case-sensitive characters without spaces. If the string is enclosed in double quotation marks ("), the string can contain spaces. |
By default, the system predefines a flow queue WRED drop profile default. This profile cannot be modified or deleted. |
/huawei-qos-profile:flow-wred-profiles/flow-wred-profile/color |
Indicates the packet color. |
The value is of the enumerated type:
|
N/A |
/huawei-qos-profile:flow-wred-profiles/flow-wred-profile/low-limit |
Indicates the lower drop threshold. When the percentage of the packet count in a queue to the queue length reaches this value, the switch starts to discard packets. |
The value is an integer in the range from 0 to 100, in percentage. The default value is 100. |
N/A |
/huawei-qos-profile:flow-wred-profiles/flow-wred-profile/high-limit |
Indicates the upper drop threshold. When the percentage of the packet count in a queue to the queue length reaches this value, the switch discards all subsequent packets. |
The value is an integer in the range from 0 to 100, in percentage. The default value is 100. |
The upper drop threshold must be greater than or equal to the lower drop threshold. |
/huawei-qos-profile:flow-wred-profiles/flow-wred-profile/discard-percentage |
Indicates the maximum drop probability. |
The value is an integer in the range from 1 to 100, in percentage. The default value is 100. |
N/A |
/huawei-qos-profile:flow-wred-profiles/flow-wred-profile/queue-depth/queue-depth-value |
Indicates the length of a flow queue. |
The value is an integer in the range from 1024 to 67092480, in bytes. The default value is 1048576. |
N/A |
/huawei-qos-profile:flow-queue-profiles/flow-queue-profile/name |
Indicates the name of a flow queue profile. |
The value is a string of 1 to 31 case-sensitive characters without spaces. If the string is enclosed in double quotation marks ("), the string can contain spaces. |
By default, the system predefines a flow queue profile default. This profile cannot be modified or deleted. |
/huawei-qos-profile:flow-queue-profiles/flow-queue-profile/qos-queue-para/queue-index |
Indicates the index of a flow queue. |
The value is an integer in the range from 0 to 7. |
N/A |
/huawei-qos-profile:flow-queue-profiles/flow-queue-profile/qos-queue-para/shaping-info/shaping-value |
Indicates the traffic shaping rate. |
The value is an integer in the range from 64 to 10000000, in kbit/s. |
By default, the traffic shaping rate is the PIR of a subscriber queue. This object cannot be configured together with the huawei-qos-profile:flow-queue-profiles/flow-queue-profile/qos-queue-para/shaping-info/shaping-percent object. |
/huawei-qos-profile:flow-queue-profiles/flow-queue-profile/qos-queue-para/shaping-info/shaping-percent |
Indicates the traffic shaping percentage, that is, percentage of the traffic shaping rate to the PIR of a subscriber queue. |
The value is an integer in the range from 1 to 100. |
This object cannot be configured together with the /huawei-qos-profile:flow-queue-profiles/flow-queue-profile/qos-queue-para/shaping-info/shaping-value object. |
/huawei-qos-profile:flow-queue-profiles/flow-queue-profile/qos-queue-para/schedule-mode |
Indicates the scheduling mode of a flow queue. |
IdentityRef type. The options are as follows:
|
By default, a flow queue uses PQ scheduling. If this object is set to strict-priority-queuing, the /huawei-qos-profile:flow-queue-profiles/flow-queue-profile/qos-queue-para/weight object cannot be configured. If this object is set to weighted-fair-queuing, the /huawei-qos-profile:flow-queue-profiles/flow-queue-profile/qos-queue-para/weight object must be configured. |
/huawei-qos-profile:flow-queue-profiles/flow-queue-profile/qos-queue-para/weight |
Indicates the weight of WFQ scheduling. |
The value is an integer in the range from 1 to 100. |
N/A |
/huawei-qos-profile:flow-queue-profiles/flow-queue-profile/qos-queue-para/flow-wred-profile |
Indicates the name of a flow queue WRED drop profile. |
The value must be the name of an existing flow queue WRED drop profile. |
By default, the system predefines a flow queue WRED drop profile default. This profile cannot be modified or deleted. |
Object |
Description |
Value |
Remarks |
---|---|---|---|
/huawei-qos-profile:sac-profiles/profile/name |
Indicates the name of an SAC profile. |
The value is a string of 1 to 35 case-sensitive characters without spaces. |
N/A |
/huawei-qos-profile:sac-profiles/profile/policy/index |
Indicates the index. |
The value is an integer in the range from 0 to 63. |
A user ACL must have been configured in ietf-acl.yang before this object is set. The ACL is specified in the /ietf-acl:access-lists/ietf-acl:access-list/ietf-acl:access-control-list-name object. |
/huawei-qos-profile:sac-profiles/profile/policy/acl |
Indicates the name of a user ACL. |
The value must be an ACL configured in ietf-acl.yang. |
|
/huawei-qos-profile:sac-profiles/profile/policy/action |
Indicates the action to be taken on the packets that match an ACL rule. |
The value is of the enumerated type:
|
|
/huawei-qos-profile:sac-profiles/profile/policy/remark-vaule |
Indicates the re-marked priority. |
The value is an integer in the range from 0 to 7. |
|
/huawei-aaa:aaa/service-scheme/sac-profile |
Indicates the name of the SAC profile bound to the service scheme. |
The value must be the name of the SAC profile specified in the /huawei-qos-profile:sac-profiles/profile/name object. |
N/A |
Configuring a QoS Profile
This section provides a sample of configuring a QoS profile using the edit-config method.
Operation |
XPATH |
---|---|
edit-config |
|
Data Requirements
Item |
Data |
Description |
---|---|---|
Name of a QoS profile |
test |
Set the QoS profile name to test. |
Direction of traffic policing |
inbound |
Set the direction of traffic policing to inbound. |
CIR |
5000 |
Set the CIR to 5000, in kbit/s. |
CBS |
10240 |
Set the CBS to 10240, in bytes. |
PIR |
6000 |
Set the PIR to 6000, in kbit/s. |
PBS |
10240 |
Set the PBS to 10240, in bytes. |
Direction in which the priority of IP packets is re-marked |
inbound |
Re-mark the DSCP priority of incoming IP packets. |
Type of the priority to be re-marked for packets |
dscp |
Re-mark the DSCP priority of IP packets. |
Value of the priority to be re-marked for packets |
5 |
Re-mark the priority of IP packets as 5. |
Request Example
<?xml version='1.0' encoding='UTF-8'?> <rpc message-id="2" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <edit-config> <target> <running/> </target> <config> <hw-qos-profile:qos-profiles xmlns:hw-qos-profile="urn:huawei:params:xml:ns:yang:huawei-qos-profile"> <hw-qos-profile:profile> <hw-qos-profile:name>test</hw-qos-profile:name> <hw-qos-profile:qos-para> <hw-qos-profile:car-para> <hw-qos-profile:direction>inbound</hw-qos-profile:direction> <hw-qos-profile:cir>5000</hw-qos-profile:cir> <hw-qos-profile:cbs>10240</hw-qos-profile:cbs> <hw-qos-profile:pir>6000</hw-qos-profile:pir> <hw-qos-profile:pbs>10240</hw-qos-profile:pbs> </hw-qos-profile:car-para> <hw-qos-profile:remark-priority> <hw-qos-profile:direction>inbound</hw-qos-profile:direction> <hw-qos-profile:priority-type>dscp</hw-qos-profile:priority-type> <hw-qos-profile:priority-value>5</hw-qos-profile:priority-value> </hw-qos-profile:remark-priority> </hw-qos-profile:qos-para> </hw-qos-profile:profile> </hw-qos-profile:qos-profiles> </config> </edit-config> </rpc>
Response Example
Sample of successful response
<?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="2"> <ok/> </rpc-reply>
Sample of failed response
<?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="3"> <rpc-error> <error-app-tag>-1</error-app-tag> <error-message> The PIR value must be no less than the CIR value. </error-message> <error-info>Error on node /huawei-qos-profile:qos-profiles/profile[name="test"]/qos-para</error-info> </rpc-error> </rpc-reply>
Configuring an SAC Profile
This section provides a sample of configuring an SAC profile using the edit-config method.
Operation |
XPATH |
---|---|
edit-config |
|
Data Requirements
Item |
Data |
Description |
---|---|---|
ACL name |
aaa |
Set the ACL name to aaa. |
ACL type |
access-control-list:IP-access-control-list |
Set the ACL type to access-control-list:IP-access-control-list. |
ACL category |
ucl |
Specify a user ACL. |
SAC profile name |
huawei |
Set the SAC profile name to huawei. |
ACL index |
10 |
Set the ACL index to 10. |
Action for packets that match the ACL |
remark-local-precedence |
Re-mark the internal priority of packets that match the ACL. |
Priority value |
7 |
Set the priority value to 7. |
Name of the service scheme bound to the SAC profile |
test |
Bind the SAC profile to the service scheme named test. |
Name of a virtual system |
public |
Set the virtual system name to public. |
Request Example
<?xml version="1.0" encoding="utf-8"?> <rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="5"> <edit-config> <target> <running/> </target> <config> <access-control-list:access-lists xmlns:access-control-list="urn:ietf:params:xml:ns:yang:ietf-acl"> <access-control-list:access-list> <access-control-list:access-control-list-name>aaa</access-control-list:access-control-list-name> <access-control-list:access-control-list-type>access-control-list:IP-access-control-list</access-control-list:access-control-list-type> <hw-acl:acl-name-type xmlns:hw-acl="urn:huawei:params:xml:ns:yang:huawei-acl">ucl</hw-acl:acl-name-type> </access-control-list:access-list> </access-control-list:access-lists> <hw-qos-profile:sac-profiles xmlns:hw-qos-profile="urn:huawei:params:xml:ns:yang:huawei-qos-profile"> <hw-qos-profile:profile> <hw-qos-profile:name>huawei</hw-qos-profile:name> <hw-qos-profile:policy> <hw-qos-profile:index>10</hw-qos-profile:index> <hw-qos-profile:acl>aaa</hw-qos-profile:acl> <hw-qos-profile:action>remark-local-precedence</hw-qos-profile:action> <hw-qos-profile:remark-vaule>7</hw-qos-profile:remark-vaule> </hw-qos-profile:policy> </hw-qos-profile:profile> </hw-qos-profile:sac-profiles> <hw-aaa:aaa xmlns:hw-aaa="urn:huawei:params:xml:ns:yang:huawei-aaa"> <hw-aaa:service-scheme> <hw-aaa:name>test</hw-aaa:name> <hw-aaa:vsys>public</hw-aaa:vsys> <hw-aaa:sac-profile>huawei</hw-aaa:sac-profile> </hw-aaa:service-scheme> </hw-aaa:aaa> </config> </edit-config> </rpc>
Response Example
Sample of successful response
<?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="2"> <ok/> </rpc-reply>
Sample of failed response
<?xml version="1.0" encoding="utf-8"?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="6"> <rpc-error> <error-app-tag>-1</error-app-tag> <error-message>The configuration/operation does not support.</error-message> <error-info>Error on node /huawei-aaa:aaa/service-scheme[name="test",vsys="public"]/sac-profile</error-info> </rpc-error> </rpc-reply>