This section provides a sample of configuring a QoS profile using the edit-config method.
Operation |
XPATH |
---|---|
edit-config |
|
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. |
<?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>
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>