跳转到内容
Ask AI

Qos

此内容尚不支持你的语言。

This chapter provides examples on how to use Netconf to manage QoS on AsterNOS devices.

Request example to retrieve QoS via get-config with subtree filter.

<filter type="subtree">
<top>
<qos/>
</top>
</filter>

Response example

<data>
<top>
<qos xmlns="http://asterfusion.com/ns/yang/asternos-qos">
<qos-maps>
<dscp-tc-maps>
<dscp-tc-map>
<name>map1</name>
<mapping>
<dscp>1</dscp>
<tc>7</tc>
</mapping>
</dscp-tc-map>
</dscp-tc-maps>
<dot1p-tc-maps>
<dot1p-tc-map>
<name>map3</name>
<mapping>
<dot1p>0</dot1p>
<tc>1</tc>
</mapping>
</dot1p-tc-map>
</dot1p-tc-maps>
<tc-queue-maps>
<tc-queue-map>
<name>map5</name>
<mapping>
<tc>0</tc>
<queue>1</queue>
</mapping>
</tc-queue-map>
</tc-queue-maps>
<tc-dscp-maps>
<tc-dscp-map>
<name>map1</name>
<mapping>
<tc>0</tc>
<dscp>1</dscp>
</mapping>
</tc-dscp-map>
<tc-dscp-map>
<name>map2</name>
<mapping>
<tc>1</tc>
<dscp>0</dscp>
</mapping>
</tc-dscp-map>
<tc-dscp-map>
<name>map6</name>
<mapping>
<tc>0</tc>
<dscp>1</dscp>
</mapping>
</tc-dscp-map>
</tc-dscp-maps>
<switch-qos-map>
<tc-queue-map-name>map5</tc-queue-map-name>
</switch-qos-map>
</qos-maps>
<traffic-behaviors>
<traffic-behavior>
<name>test_sr_1</name>
<mode>sr-tcm</mode>
<meter-type>packets</meter-type>
<cir>5</cir>
<cbs>7500</cbs>
<yellow-packet-action>REMARK</yellow-packet-action>
<red-packet-action>FORWARD</red-packet-action>
<remark-dot1p>1</remark-dot1p>
<remark-dscp>3</remark-dscp>
<remark-tc>5</remark-tc>
</traffic-behavior>
<traffic-behavior>
<name>test_tr_1</name>
<mode>sr-tcm</mode>
<meter-type>bytes</meter-type>
<cir>5</cir>
<cbs>6400</cbs>
<yellow-packet-action>FORWARD</yellow-packet-action>
<red-packet-action>DROP</red-packet-action>
</traffic-behavior>
</traffic-behaviors>
<port-shapers/>
<schedulers>
<scheduler>
<name>Ethernet6</name>
<queue>2</queue>
<pir>1000</pir>
</scheduler>
</schedulers>
<limit-rates>
<limit-rate>
<port>Ethernet4</port>
<direction>ingress</direction>
<cir>5</cir>
<cbs>6000</cbs>
</limit-rate>
</limit-rates>
</qos>
</top>
</data>

This chapter provides examples on how to use Netconf to manage QoS Map, Port QoS Map and Switch QoS Map on AsterNOS devices.

Request example to create DSCP to TC qos map via edit-config.

<config>
<top>
<qos>
<qos-maps>
<dscp-tc-maps operation="create">
<dscp-tc-map>
<name>map1</name>
<mapping>
<dscp>1</dscp>
<tc>7</tc>
</mapping>
<mapping>
<dscp>3</dscp>
<tc>3</tc>
</mapping>
</dscp-tc-map>
</dscp-tc-maps>
</qos-maps>
</qos>
</top>
</config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:bf338ca0-e40d-46ad-96b3-3a583236dd8c">
<ok/>
</rpc-reply>

Request example to create Dot1p to TC qos map via edit-config.

<config>
<top>
<qos>
<qos-maps>
<dot1p-tc-maps operation="create">
<dot1p-tc-map>
<name>map3</name>
<mapping>
<dot1p>0</dot1p>
<tc>1</tc>
</mapping>
</dot1p-tc-map>
<dot1p-tc-map>
<name>map4</name>
<mapping>
<dot1p>1</dot1p>
<tc>0</tc>
</mapping>
</dot1p-tc-map>
</dot1p-tc-maps>
</qos-maps>
</qos>
</top>
</config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:bf338ca0-e40d-46ad-96b3-3a583236dd8c">
<ok/>
</rpc-reply>

Request example to create TC To DSCP qos map via edit-config.

<config>
<top>
<qos>
<qos-maps>
<tc-dscp-maps operation="create">
<tc-dscp-map>
<name>map6</name>
<mapping>
<tc>0</tc>
<dscp>1</dscp>
</mapping>
<mapping>
<tc>2</tc>
<dscp>2</dscp>
</mapping>
</tc-dscp-map>
</tc-dscp-maps>
</qos-maps>
</qos>
</top>
</config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:bf338ca0-e40d-46ad-96b3-3a583236dd8c">
<ok/>
</rpc-reply>

Request example to create TC To Queue qos map via edit-config.

<config>
<top>
<qos>
<qos-maps>
<tc-queue-maps operation="create">
<tc-queue-map>
<name>map5</name>
<mapping>
<tc>0</tc>
<queue>1</queue>
</mapping>
<mapping>
<tc>2</tc>
<queue>2</queue>
</mapping>
</tc-queue-map>
</tc-queue-maps>
</qos-maps>
</qos>
</top>
</config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:bf338ca0-e40d-46ad-96b3-3a583236dd8c">
<ok/>
</rpc-reply>

Request example to modify DSCP to TC qos map via edit-config.

<config>
<top>
<qos>
<qos-maps>
<dscp-tc-maps operation="merge">
<dscp-tc-map>
<name>map1</name>
<mapping>
<dscp>1</dscp>
<tc>7</tc>
</mapping>
</dscp-tc-map>
</dscp-tc-maps>
</qos-maps>
</qos>
</top>
</config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:bf338ca0-e40d-46ad-96b3-3a583236dd8c">
<ok/>
</rpc-reply>

Request example to delete single DSCP to TC qos map via edit-config.

<config>
<top>
<qos>
<qos-maps>
<dscp-tc-maps>
<dscp-tc-map operation="delete">
<name>map1</name>
</dscp-tc-map>
</dscp-tc-maps>
</qos-maps>
</qos>
</top>
</config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:bf338ca0-e40d-46ad-96b3-3a583236dd8c">
<ok/>
</rpc-reply>

Request example to delete all DSCP to TC and Dot1p to TC qos map via edit-config.

<config>
<top>
<qos>
<qos-maps>
<dscp-tc-maps operation="delete"/>
<dot1p-tc-maps operation="delete"/>
</qos-maps>
</qos>
</top>
</config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:bf338ca0-e40d-46ad-96b3-3a583236dd8c">
<ok/>
</rpc-reply>

Request example to retrieve all DSCP to TC QosMap via get-config with subtree filter.

<filter type="subtree">
<top>
<qos>
<qos-maps>
<dscp-tc-maps/>
</qos-maps>
</qos>
</top>
</filter>

Response example

<data>
<top>
<qos xmlns="http://asterfusion.com/ns/yang/asternos-qos">
<qos-maps>
<dscp-tc-maps>
<dscp-tc-map>
<name>map1</name>
<mapping>
<dscp>1</dscp>
<tc>7</tc>
</mapping>
<mapping>
<dscp>3</dscp>
<tc>3</tc>
</mapping>
</dscp-tc-map>
</dscp-tc-maps>
</qos-maps>
</qos>
</top>
</data>

Request example to retrieve QosMap via rpc show-qos-map.

<show-qos-map>
<name>dscp_to_tc<name>
<show-qos-map>

Response example

<data xmlns="http://asterfusion.com/ns/yang/asternos-qos">
{
map1:{
1:7,
3:3
}
}
</data>

Request example to retrieve all QosMap via get-config with subtree filter.

<filter type="subtree">
<top>
<qos>
<qos-maps/>
</qos>
</top>
</filter>

Response example

<data>
<top>
<qos xmlns="http://asterfusion.com/ns/yang/asternos-qos">
<qos-maps>
<dot1p-tc-maps>
<dot1p-tc-map>
<name>map3</name>
<mapping>
<dot1p>0</dot1p>
<tc>1</tc>
</mapping>
</dot1p-tc-map>
</dot1p-tc-maps>
<tc-queue-maps>
<tc-queue-map>
<name>map5</name>
<mapping>
<tc>0</tc>
<queue>1</queue>
</mapping>
<mapping>
<tc>2</tc>
<queue>2</queue>
</mapping>
</tc-queue-map>
</tc-queue-maps>
<tc-dscp-maps>
<tc-dscp-map>
<name>map1</name>
<mapping>
<tc>0</tc>
<dscp>1</dscp>
</mapping>
<mapping>
<tc>2</tc>
<dscp>2</dscp>
</mapping>
</tc-dscp-map>
</tc-dscp-maps>
<switch-qos-map/>
</qos-maps>
</qos>
</top>
</data>

Request example to modify switch qos map via edit-config.

<config>
<top>
<qos>
<qos-maps>
<switch-qos-map operation="merge">
<tc-queue-map-name>map5</tc-queue-map-name>
</switch-qos-map>
</qos-maps>
</qos>
</top>
</config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:bf338ca0-e40d-46ad-96b3-3a583236dd8c">
<ok/>
</rpc-reply>

Request example to delete switch qos map via edit-config.

<config>
<top>
<qos>
<qos-maps>
<switch-qos-map operation="delete">
<tc-queue-map-name>map5</tc-queue-map-name>
</switch-qos-map>
</qos-maps>
</qos>
</top>

Request example to retrieve all QosMap via get-config with subtree filter.

<filter type="subtree">
<top>
<qos>
<qos-maps>
<switch-qos-map/>
</qos-maps>
</qos>
</top>
</filter>

Response example

<data>
<top>
<qos xmlns="http://asterfusion.com/ns/yang/asternos-qos">
<qos-maps>
<switch-qos-map>
<tc-queue-map-name>map5</tc-queue-map-name>
</switch-qos-map>
</qos-maps>
</qos>
</top>
</data>

Request example to bind QoS map to port via edit-config.

<config>
<top>
<qos>
<qos-maps>
<port-qos-maps operation="create">
<port-qos-map>
<name>Ethernet2</name>
<dscp-tc-map-name>map1</dscp-tc-map-name>
<dot1p-tc-map-name>map3</dot1p-tc-map-name>
</port-qos-map>
</port-qos-maps>
</qos-maps>
</qos>
</top>
</config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:eb182e03-93a7-4a81-919a-18c25af177b2">
<ok/>
</rpc-reply>

Request example to modify port QoS map binding via edit-config.

<config>
<top>
<qos>
<qos-maps>
<port-qos-maps operation="merge">
<port-qos-map>
<name>Ethernet2</name>
<dot1p-tc-map-name>map4</dot1p-tc-map-name>
</port-qos-map>
</port-qos-maps>
</qos-maps>
</qos>
</top>
</config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:eb182e03-93a7-4a81-919a-18c25af177b2">
<ok/>
</rpc-reply>

Request example to delete port QoS map binding configuration via edit-config.

<config>
<top>
<qos>
<qos-maps>
<port-qos-maps>
<port-qos-map operation="delete">
<name>Ethernet2</name>
</port-qos-map>
</port-qos-maps>
</qos-maps>
</qos>
</top>
</config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:eb182e03-93a7-4a81-919a-18c25af177b2">
<ok/>
</rpc-reply>

Request example to retrieve port QoS map binding info via get-config with subtree filter.

<filter type="subtree">
<top>
<qos>
<qos-maps>
<port-qos-maps/>
</qos-maps>
</qos>
</top>
</filter>

Response example

<data>
<top>
<qos xmlns="http://asterfusion.com/ns/yang/asternos-qos">
<qos-maps>
<port-qos-maps>
<port-qos-map>
<name>Ethernet2</name>
<dscp-tc-map-name>map1</dscp-tc-map-name>
<dot1p-tc-map-name>map4</dot1p-tc-map-name>
</port-qos-map>
</port-qos-maps>
</qos-maps>
</qos>
</top>
</data>

Request example to retrieve port QosMap via rpc show-interface-qos-map-bind.

<show-interface-qos-map-bind/>

Response example

<data xmlns="http://asterfusion.com/ns/yang/asternos-qos">
{
Ethernet2:{
dot1p_to_tc_map:[DOT1P_TO_TC_MAP|map4]
}
}
</data>

This chapter provides examples on how to use Netconf to manage Qos traffic behavior on AsterNOS devices.

QoS Traffic Behavior Parameters

ParameterTypeValid Values / FormatDescription
modeenumsr–tcm, tr–tcmPolicer mode
sr–tcm: Single Rate Three color marker, CIR and CBS, Green, Yellow and Red.
tr–tcm: Two Rate Three color marker, CIR, CBS, PIR and PBS, Green, Yellow and Red.
meter–typeenumpackets, bytesPolicer Meter Type
Policer Meter Type, default is bytes.
color–sourcestringAWAREPolicer Color Source, readonly.
cirinteger> 0 (in KBps or Kpps)Committed burst size
cbsinteger> 0 (in Bytes or packets)Committed information rate.
pirinteger> 0 (in KBps or Kpps)Peak Information Rate – It works when the mode is tr–tcm.
pbsinteger> 0 (in KBps or Kpps)Peak Burst Size – It works when the mode is tr–tcm.
yellow–packet–actionenumFORWARD, DROP or REMARKAction to take for Yellow color packets, default is FORWARD.
red–packet–actionenumFORWARD, DROP or REMARKAction to take for Red color packets, default is FORWARD.
remark–dot1pinteger0–7The value of dot1p for remark action, it works when yellow/red–packet–action is REMARK.
dscpinteger0–63The value of dscp for remark action, it works when yellow/red–packet–action is REMARK.
remark–tcinteger0–7The value of tc for remark action, it works when yellow/red–packet–action is REMARK.

Request example to create qos traffic behavior via edit-config.

<config>
<top>
<qos>
<traffic-behaviors operation="create">
<traffic-behavior>
<name>test_sr_1</name>
<mode>sr-tcm</mode>
<meter-type>packets</meter-type>
<cir>5</cir>
<cbs>7500</cbs>
<yellow-packet-action>REMARK</yellow-packet-action>
<red-packet-action>FORWARD</red-packet-action>
<remark-dot1p>1</remark-dot1p>
<remark-dscp>3</remark-dscp>
<remark-tc>5</remark-tc>
</traffic-behavior>
<traffic-behavior>
<name>test_tr_1</name>
<mode>tr-tcm</mode>
<meter-type>packets</meter-type>
<cir>5</cir>
<cbs>7500</cbs>
<pir>7</pir>
<pbs>10000</pbs>
<yellow-packet-action>FORWARD</yellow-packet-action>
<red-packet-action>REMARK</red-packet-action>
<remark-dot1p>1</remark-dot1p>
<remark-dscp>15</remark-dscp>
<remark-tc>3</remark-tc>
</traffic-behavior>
</traffic-behaviors>
</qos>
</top>
</config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:9c68d96e-3bdd-4b50-9161-060947d27bd5">
<ok/>
</rpc-reply>

Request example to modify qos traffic behavior via edit-config.

<config>
<top>
<qos>
<traffic-behaviors operation="merge">
<traffic-behavior>
<name>test_tr_1</name>
<mode>sr-tcm</mode>
<cir>5</cir>
</traffic-behavior>
</traffic-behaviors>
</qos>
</top>
</config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:9c68d96e-3bdd-4b50-9161-060947d27bd5">
<ok/>
</rpc-reply>

Request example to delete qos traffic behavior via edit-config.

<config>
<top>
<qos>
<traffic-behaviors>
<traffic-behavior operation="delete">
<name>test_tr_1</name>
</traffic-behavior>
</traffic-behaviors>
</qos>
</top>
</config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:9c68d96e-3bdd-4b50-9161-060947d27bd5">
<ok/>
</rpc-reply>

Request example to retrieve single qos traffic behavior via get-config with subtree filter.

<filter type="subtree">
<top>
<qos>
<traffic-behaviors>
<traffic-behavior>
<name>test_tr_1</name>
</traffic-behavior>
</traffic-behaviors>
</qos>
</top>
</filter>

Response example

<data>
<top>
<qos xmlns="http://asterfusion.com/ns/yang/asternos-qos">
<traffic-behaviors>
<traffic-behavior>
<name>test_tr_1</name>
<mode>sr-tcm</mode>
<meter-type>bytes</meter-type>
<cir>5</cir>
<cbs>6400</cbs>
<yellow-packet-action>FORWARD</yellow-packet-action>
<red-packet-action>DROP</red-packet-action>
</traffic-behavior>
</traffic-behaviors>
</qos>
</top>
</data>

Request example to retrieve all qos traffic behavior via get-config with subtree filter.

<filter type="subtree">
<top>
<qos>
<traffic-behaviors/>
</qos>
</top>
</filter>

Response example

<data>
<top>
<qos xmlns="http://asterfusion.com/ns/yang/asternos-qos">
<traffic-behaviors>
<traffic-behavior>
<name>test_sr_1</name>
<mode>sr-tcm</mode>
<meter-type>packets</meter-type>
<cir>5</cir>
<cbs>7500</cbs>
<yellow-packet-action>REMARK</yellow-packet-action>
<red-packet-action>FORWARD</red-packet-action>
<remark-dot1p>1</remark-dot1p>
<remark-dscp>3</remark-dscp>
<remark-tc>5</remark-tc>
</traffic-behavior>
<traffic-behavior>
<name>test_tr_1</name>
<mode>sr-tcm</mode>
<meter-type>bytes</meter-type>
<cir>5</cir>
<cbs>6400</cbs>
<yellow-packet-action>FORWARD</yellow-packet-action>
<red-packet-action>DROP</red-packet-action>
</traffic-behavior>
</traffic-behaviors>
</qos>
</top>
</data>

Request example to modify qos traffic behavior binding configuration via edit-config.

<config>
<top>
<interfaces>
<interface operation="merge">
<name>Ethernet3</name>
<ingress-policer-name>test_tr_1</ingress-policer-name>
</interface>
</interfaces>
</top>
</config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:9c68d96e-3bdd-4b50-9161-060947d27bd5">
<ok/>
</rpc-reply>

Request example to retrieve qos traffic behavior binding configuration via get-config with subtree filter.

<filter type="subtree">
<top>
<interfaces>
<interface>
<name>Ethernet3</name>
</interface>
</interfaces>
</top>
</filter>

Response example

<data>
<top>
<interfaces xmlns="http://asterfusion.com/ns/yang/asternos-interfaces">
<interface>
<name>Ethernet3</name>
<admin-status>true</admin-status>
<interface-mode>none</interface-mode>
<mtu>9216</mtu>
<ingress-policer-name>test_tr_1</ingress-policer-name>
<ethernet-config xmlns="http://asterfusion.com/ns/yang/asternos-ports">
<auto-negotiate>false</auto-negotiate>
<port-speed>SPEED_1G</port-speed>
</ethernet-config>
</interface>
</interfaces>
</top>
</data>

Request example to retrieve traffic behavior counters via rpc show-traffic-behavior-counters.

<show-traffic-behavior-counters/>

Response example

<data xmlns="http://asterfusion.com/ns/yang/asternos-qos">
PolicerId Forward(Packet/Byte) DROP(Packet/Byte) Remark-Forward(Packet/Byte) Meter_type
----------- ---------------------- ------------------- ----------------------------- ------------
test_sr_1 100 0 0 packets
test_tr_1 50 0 0 packets
</data>

This chapter provides examples on how to use Netconf to manage Qos Scheduler on AsterNOS devices.

QoS Scheduler Parameters

ParameterTypeValid Values / FormatDescription
queueinteger0 - 7Queue index
algorithmenumSTRICT, DWRRScheduling algorithm
weightinteger1 - 100Queue weight; only effective with weighted algorithms like DWRR.
pirintegerFor CX202P-16S, CX204Y-48S, CX206P-24S/48S:
1 - bandwidth (in Bps)
Others:
313000 - bandwidth (in Bps)Peak Information Rate - limits max traffic rate for the queue.
pbsintegerFor CX202P-16S, CX204Y-48S, CX206P-24S/48S:
1 – 16773120 (4095 * 4K)
Others:
1 – 4190208 (1023 * 4K)
Recommended step size:
4096 (i.e., multiples of 4K)Peak Burst Size - allows burst data transfer up to this size.

Request example to create qos scheduler via edit-config.

<config>
<top>
<qos>
<schedulers operation="create">
<scheduler>
<name>Ethernet1</name>
<queue>3</queue>
<algorithm>DWRR</algorithm>
<weight>30</weight>
<pir>750</pir>
<pbs>8192</pbs>
</scheduler>
<scheduler>
<name>Ethernet1</name>
<queue>4</queue>
<algorithm>DWRR</algorithm>
<weight>20</weight>
<pir>600</pir>
<pbs>8192</pbs>
</scheduler>
</schedulers>
</qos>
</top>
</config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:9c68d96e-3bdd-4b50-9161-060947d27bd5">
<ok/>
</rpc-reply>

Request example to modify qos scheduler via edit-config.

<config>
<top>
<qos>
<schedulers>
<scheduler operation="merge">
<name>Ethernet1</name>
<queue>3</queue>
<algorithm>STRICT</algorithm>
<pir>500</pir>
<pbs>4096</pbs>
</scheduler>
</schedulers>
</qos>
</top>
</config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:9c68d96e-3bdd-4b50-9161-060947d27bd5">
<ok/>
</rpc-reply>

Request example to delete qos scheduler via edit-config.

<config>
<top>
<qos>
<schedulers>
<scheduler operation="delete">
<name>Ethernet1</name>
<queue>3</queue>
</scheduler>
</schedulers>
</qos>
</top>
</config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:9c68d96e-3bdd-4b50-9161-060947d27bd5">
<ok/>
</rpc-reply>

Request example to delete qos scheduler via edit-config.

<config>
<top>
<qos>
<schedulers operation="delete">
</schedulers>
</qos>
</top>
</config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:9c68d96e-3bdd-4b50-9161-060947d27bd5">
<ok/>
</rpc-reply>

Request example to retrieve single scheduler via get-config with subtree filter.

<filter type="subtree">
<top>
<qos>
<schedulers>
<scheduler>
<name>Ethernet1</name>
<queue>3</queue>
</scheduler>
</schedulers>
</qos>
</top>
</filter>

Response example

<data>
<top>
<qos xmlns="http://asterfusion.com/ns/yang/asternos-qos">
<schedulers>
<scheduler>
<name>Ethernet1</name>
<queue>3</queue>
<algorithm>STRICT</algorithm>
<pir>500000</pir>
<pbs>4096</pbs>
</scheduler>
</schedulers>
</qos>
</top>
</data>

Request example to retrieve qos scheduler via get-config with subtree filter.

<filter type="subtree">
<top>
<qos>
<schedulers/>
</qos>
</top>
</filter>

Response example

<data>
<top>
<qos xmlns="http://asterfusion.com/ns/yang/asternos-qos">
<schedulers>
<scheduler>
<name>Ethernet1</name>
<queue>3</queue>
<algorithm>STRICT</algorithm>
<pir>500000</pir>
<pbs>8192</pbs>
</scheduler>
<scheduler>
<name>Ethernet1</name>
<queue>4</queue>
<algorithm>DWRR</algorithm>
<weight>20</weight>
<pir>600000</pir>
<pbs>16384</pbs>
</scheduler>
</schedulers>
</qos>
</top>
</data>

Request example to retrieve scheduler configuration via rpc show-interface-uc-tx-queue.

<show-interface-uc-tx-queue/>

Response example

<data>
<name>Ethernet1</name>
<queue>4</queue>
<algorithm>DWRR</algorithm>
<weight>10</weight>
<pir>600000</pir>
<pbs>16384</pbs>
</data>

This chapter provides examples on how to use Netconf to manage Qos PortShaper on AsterNOS devices.

QoS PortShaper Parameters

ParameterTypeValid Values / FormatDescription
pirintegerFor CX202P-16S, CX204Y-48S, CX206P-24S/48S:
1 - bandwidth (in Bps)
Others:
313000 - bandwidth (in Bps)Peak Information Rate - limits max traffic rate for the queue.
pbsintegerFor CX202P-16S, CX204Y-48S, CX206P-24S/48S:
1 – 4095 (in 4KBytes)
Others:
1 – 1023 (in 4KBytes)Peak Burst Size - allows burst data transfer up to this size.

Request example to create qos portShaper via edit-config.

<config>
<top>
<qos>
<port-shapers operation="create">
<port-shaper>
<name>Ethernet3</name>
<pbs>125</pbs>
<pir>1000000</pir>
</port-shaper>
</port-shapers>
</qos>
</top>
</config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:4adf96bf-6345-47b5-80fd-981eafd62df5">
<ok/>
</rpc-reply>

Request example to modify qos portShaper via edit-config.

<config>
<top>
<qos>
<port-shapers operation="merge">
<port-shaper>
<name>Ethernet2</name>
<pbs>512</pbs>
<pir>800000</pir>
</port-shaper>
</port-shapers>
</qos>
</top>
</config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:4adf96bf-6345-47b5-80fd-981eafd62df5">
<ok/>
</rpc-reply>

Request example to delete qos portShaper via edit-config.

<config>
<top>
<qos>
<port-shapers>
<port-shaper operation="delete">
<name>Ethernet2</name>
</port-shaper>
</port-shapers>
</qos>
</top>
</config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:4adf96bf-6345-47b5-80fd-981eafd62df5">
<ok/>
</rpc-reply>

Request example to delete qos portShaper via edit-config.

<config>
<top>
<qos>
<port-shapers operation="delete">
</port-shapers>
</qos>
</top>
</config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:4adf96bf-6345-47b5-80fd-981eafd62df5">
<ok/>
</rpc-reply>

Request example to retrieve single qos portShaper via get-config with subtree filter.

<filter type="subtree">
<top>
<qos>
<port-shapers>
<port-shaper>
<name>Ethernet2</name>
</port-shaper>
</port-shapers>
</qos>
</top>
</filter>

Response example

<data>
<top>
<qos xmlns="http://asterfusion.com/ns/yang/asternos-qos">
<port-shapers>
<port-shaper>
<name>Ethernet2</name>
<pir>800000</pir>
<pbs>512</pbs>
</port-shaper>
</port-shapers>
</qos>
</top>
</data>

Request example to retrieve all qos portShaper via get-config with subtree filter.

<filter type="subtree">
<top>
<qos>
<port-shapers/>
</qos>
</top>
</filter>

Response example

<data>
<top>
<qos xmlns="http://asterfusion.com/ns/yang/asternos-qos">
<port-shapers>
<port-shaper>
<name>Ethernet2</name>
<pir>800000</pir>
<pbs>512</pbs>
</port-shaper>
<port-shaper>
<name>Ethernet3</name>
<pir>1000000</pir>
<pbs>125</pbs>
</port-shaper>
</port-shapers>
</qos>
</top>
</data>

Request example to retrieve portShaper configuration via rpc show-interface-port-shaper.

<show-interface-port-shaper/>

Response example

<data xmlns="http://asterfusion.com/ns/yang/asternos-qos">
{
Ethernet2:{
SCHEDULER|port_shaper_scheduler.Ethernet2:{
pbs:2097152,
pir:800000
}
}
}
</data>

This chapter provides examples on how to use Netconf to manage Qos limit rate on AsterNOS devices.

QoS Limit Rate Parameters

ParameterTypeValid Values / FormatDescription
directionenumingress, egressApply rules to ingress or egress direction
cirinteger> 0 (in KBps)Committed information rate.
cbsinteger> 0 (in Bytes)Committed burst size.

Request example to create qos limit rate rules for port via edit-config.

<config>
<top>
<qos>
<limit-rates operation="create">
<limit-rate>
<port>Ethernet3</port>
<direction>ingress</direction>
<cir>3</cir>
<cbs>4000</cbs>
</limit-rate>
<limit-rate>
<port>Ethernet3</port>
<direction>egress</direction>
<cir>5</cir>
<cbs>6000</cbs>
</limit-rate>
</limit-rates>
</qos>
</top>
</config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:9c68d96e-3bdd-4b50-9161-060947d27bd5">
<ok/>
</rpc-reply>

Request example to modify qos limit rate rules for port via edit-config.

<config>
<top>
<qos>
<limit-rates operation="merge">
<limit-rate>
<port>Ethernet4</port>
<direction>ingress</direction>
<cir>5</cir>
<cbs>6000</cbs>
</limit-rate>
</limit-rates>
</qos>
</top>
</config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:9c68d96e-3bdd-4b50-9161-060947d27bd5">
<ok/>
</rpc-reply>

Request example to delete qos limit rate rules for ingress port via edit-config.

<config>
<top>
<qos>
<limit-rates>
<limit-rate operation="delete">
<port>Ethernet3</port>
<direction>ingress</direction>
</limit-rate>
</limit-rates>
</qos>
</top>
</config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:9c68d96e-3bdd-4b50-9161-060947d27bd5">
<ok/>
</rpc-reply>

Request example to delete qos limit rate rules for port via edit-config.

<config>
<top>
<qos>
<limit-rates>
<limit-rate operation="delete">
<port>Ethernet3</port>
</limit-rate>
</limit-rates>
</qos>
</top>
</config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:9c68d96e-3bdd-4b50-9161-060947d27bd5">
<ok/>
</rpc-reply>

Request example to retrieve qos limit rate rules for ingress port via get-config with subtree filter.

<filter type="subtree">
<top>
<qos>
<limit-rates>
<limit-rate>
<port>Ethernet3</port>
<direction>ingress</direction>
</limit-rate>
</limit-rates>
</qos>
</top>
</filter>

Response example

<data>
<top>
<qos xmlns="http://asterfusion.com/ns/yang/asternos-qos">
<limit-rates>
<limit-rate>
<port>Ethernet3</port>
<direction>ingress</direction>
<cir>3</cir>
<cbs>4000</cbs>
</limit-rate>
</limit-rates>
</qos>
</top>
</data>

Request example to retrieve qos limit rate rules for port via get-config with subtree filter.

<filter type="subtree">
<top>
<qos>
<limit-rates>
<limit-rate>
<port>Ethernet3</port>
</limit-rate>
</limit-rates>
</qos>
</top>
</filter>

Response example

<data>
<top>
<qos xmlns="http://asterfusion.com/ns/yang/asternos-qos">
<limit-rates>
<limit-rate>
<port>Ethernet3</port>
<direction>ingress</direction>
<cir>3</cir>
<cbs>4000</cbs>
</limit-rate>
<limit-rate>
<port>Ethernet3</port>
<direction>egress</direction>
<cir>5</cir>
<cbs>6000</cbs>
</limit-rate>
</limit-rates>
</qos>
</top>
</data>

This chapter provides examples on how to use Netconf to manage queue counters on AsterNOS devices.

Request example to retrieve queue counters for specific interface via rpc show-queue-counters.

<show-queue-counters>
<interface_num>2</interface_num>
</show-queue-counters>

Response example

<data xmlns="http://asterfusion.com/ns/yang/asternos-qos">For namespace :
Port TxQ Counter/pkts Counter/bytes Drop/pkts Drop/bytes
--------- ----- -------------- --------------- ----------- ------------
Ethernet2 ALL0 0 0 0 0
Ethernet2 ALL1 0 0 0 0
Ethernet2 ALL2 0 0 0 0
Ethernet2 ALL3 0 0 0 0
Ethernet2 ALL4 0 0 0 0
Ethernet2 ALL5 0 0 0 0
Ethernet2 ALL6 0 0 0 0
Ethernet2 ALL7 0 0 0 0
</data>

Request example to retrieve all queue counters via edit-config.

<show-queue-counters/>

Response example

<data xmlns="http://asterfusion.com/ns/yang/asternos-qos">
Port RxQ Counter/pkts Drop/pkts Rate/pkts
------ ----- -------------- ----------- -----------
CPU ALL0 16664 0 0.00/s
CPU ALL1 0 0 0.00/s
CPU ALL2 8 0 0.00/s
CPU ALL3 0 0 0.00/s
CPU ALL4 63760 0 0.00/s
CPU ALL5 0 0 0.00/s
CPU ALL6 0 0 0.00/s
CPU ALL7 0 0 0.00/s
<!-- The counters in the middle have been omitted -->
For namespace :
Port TxQ Counter/pkts Counter/bytes Drop/pkts Drop/bytes
---------- ----- -------------- --------------- ----------- ------------
Ethernet77 ALL0 0 0 0 0
Ethernet77 ALL1 0 0 0 0
Ethernet77 ALL2 0 0 0 0
Ethernet77 ALL3 0 0 0 0
Ethernet77 ALL4 0 0 0 0
Ethernet77 ALL5 0 0 0 0
Ethernet77 ALL6 0 0 0 0
Ethernet77 ALL7 0 0 0 0
</data>

Request example to clear all queue counters via rpc clear-queue-counters.

<show-queue-counters>
<interface_num>2</interface_num>
</show-queue-counters>

Response example

<data xmlns="http://asterfusion.com/ns/yang/asternos-qos">
Clear and update saved counters for CPU
Clear and update saved counters for Ethernet1
<!-- The output in the middle have been omitted -->
Clear and update saved counters for Ethernet77
</data>

Request example to retrieve CPU queue counters for specific interface via rpc show-queue-cpu-port.

<show-queue-cpu-port/>

Response example

<data xmlns="http://asterfusion.com/ns/yang/asternos-qos">
Port RxQ Counter/pkts Drop/pkts Rate/pkts
------ ----- -------------- ----------- -----------
CPU ALL0 104 0 2.00/s
CPU ALL1 0 0 0.00/s
CPU ALL2 0 0 0.00/s
CPU ALL3 0 0 0.00/s
CPU ALL4 0 0 0.00/s
CPU ALL5 0 0 0.00/s
CPU ALL6 0 0 0.00/s
CPU ALL7 0 0 0.00/s
</data>