Configuring QoS Class Maps
The following examples pertain specifically to QoS class maps.
Configuring or Modifying a Class Map
Configuring or Modifying a Class Map
POST http://<IP_Address>/api/mo/sys/ipqos/dflt/c.json
{
"ipqosCMapEntity": {
"children": [
{
"ipqosCMapInst": {
"attributes": {
"matchType": "match-all",
"name": "class1"
}}}]}}
{
imdata:[]
}
<System>
<ipqos-items>
<dflt-items>
<c-items>
<name-items>
<CMapInst-list>
<name>class1</name>
<matchType>match-all</matchType>
</CMapInst-list>
</name-items>
</c-items>
</dflt-items>
</ipqos-items>
</System>
You can create or modify a class map then reference class maps in policy maps.
Note: You cannot create a queuing class map; you must use one of the system-defined queuing class maps.
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
class-map type qos class1
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide
https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html
Applying Descriptions to MQC Objects
Applying Descriptions to MQC Objects
POST http://<IP_Address>/api/mo/sys/ipqos/dflt.json
{
"ipqosEntity": {
"children": [
{
"ipqosDefaultQoS": {
"children": [
{
"ipqosCMapEntity": {
"children": [
{
"ipqosCMapInst": {
"attributes": {
"matchType": "match-all",
"name": "class1"
},
"children": [
{
"ipqosDescription": {
"attributes": {
"val": "This is a description of the class-map"
}}}]}}]}},
{
"ipqosPMapEntity": {
"children": [
{
"ipqosPMapInst": {
"attributes": {
"matchType": "match-all",
"name": "pol1"
},
"children": [
{
"ipqosDescription": {
"attributes": {
"val": "This is a description of the policy-map"
}}}]}}]}}]}}]}}
{
imdata:[]
}
<System>
<ipqos-items>
<dflt-items>
<c-items>
<name-items>
<CMapInst-list>
<name>class1</name>
<matchType>match-all</matchType>
<Description-items>
<val>This is a description of the class-map</val>
</Description-items>
</CMapInst-list>
</name-items>
</c-items>
<p-items>
<name-items>
<PMapInst-list>
<name>pol1</name>
<matchType>match-all</matchType>
<Description-items>
<val>This is a description of the policy-map</val>
</Description-items>
</PMapInst-list>
</name-items>
</p-items>
</dflt-items>
</ipqos-items>
</System>
You can use the description command to add a description to a MQC object. The description can be up to 200 alphanumeric characters.
Note: You cannot modify the description of system-defined queuing class maps.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
class-map type qos class1
description This is a description of the class-map
policy-map pol1
description This is a description of the policy-map
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide
https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html
Configuring a Policy Class
Configuring a Policy Class
POST http://<IP_Address>/api/mo/sys/ipqos/dflt.json
{
"ipqosPMapInst": {
"attributes": {
"matchType": "match-all",
"name": "p1"
},
"children": [
{
"ipqosMatchCMap": {
"attributes": {
"name": "class2",
"userSetBit": "1"
}}}]}}
{
imdata:[]
}
<System>
<ipqos-items>
<dflt-items>
<p-items>
<name-items>
<PMapInst-list>
<name>p1</name>
<matchType>match-all</matchType>
<cmap-items>
<MatchCMap-list>
<name>class2</name>
<userSetBit>1</userSetBit>
</MatchCMap-list>
</cmap-items>
</PMapInst-list>
</name-items>
</p-items>
</dflt-items>
</ipqos-items>
</System>
This example creates a named object that represents a set of policies that are to be applied to a set of traffic classes and associates a class map with the policy map and enters the configuration mode for the specified system class.
Note: The associated class map must be the same type as the policy map type.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
policy-map type qos p1
class type qos class2
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide
https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html
Configuring ACL Classification
Configuring ACL Classification
POST http://<IP_Address>/api/mo/sys/ipqos/dflt/c/name-class1.json
{
"ipqosCMapInst": {
"attributes": {
"matchType": "match-all",
"name": "class1"
},
"children": [
{
"ipqosAcl": {
"attributes": {
"name": "foo"
}}}]}}
{
imdata:[]
}
<System>
<ipqos-items>
<dflt-items>
<c-items>
<name-items>
<CMapInst-list>
<name>class1</name>
<matchType>match-all</matchType>
<acl-items>
<Acl-list>
<name>Access_Name</name>
</Acl-list>
</acl-items>
</CMapInst-list>
</name-items>
</c-items>
</dflt-items>
</ipqos-items>
</System>
You can classify traffic by matching packets based on existing ACLs. The permit and deny ACL keywords are ignored in the matching. QoS does not use the permit-deny functions of ACLs. You can classify by either IPv4, IPv6, or MAC address.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
class-map type qos class1
match access-group foo
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide
https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html
Configuring CoS Classification
Configuring CoS Classification
POST http://<IP_Address>/api/mo/sys/ipqos/dflt/c/name-class_cos.json
{
"ipqosCMapInst": {
"attributes": {
"matchType": "match-all",
"name": "class_cos"
},
"children": [
{
"ipqosCos": {
"attributes": {
"val": "4"
}}}]}}
{
imdata:[]
}
<System>
<ipqos-items>
<dflt-items>
<c-items>
<name-items>
<CMapInst-list>
<name>class_cos</name>
<matchType>match-all</matchType>
<cos-items>
<Cos-list>
<val>4</val>
</Cos-list>
</cos-items>
</CMapInst-list>
</name-items>
</c-items>
</dflt-items>
</ipqos-items>
</System>
You can classify traffic based on the class of service (CoS) in the IEEE 802.1Q header. This 3-bit field is defined in IEEE 802.1p to support QoS traffic classes. CoS is encoded in the high order 3 bits of the VLAN ID Tag field and is referred to as user_priority.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
class-map class_cos
match cos 4
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide
https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html
Configuring DSCP Classification
Configuring DSCP Classification
POST http://<IP_Address>/api/mo/sys/ipqos/dflt.json
{
"ipqosDefaultQoS": {
"children": [
{
"ipqosCMapEntity": {
"children": [
{
"ipqosCMapInst": {
"attributes": {
"matchType": "match-all",
"name": "class_cos"
},
"children": [
{
"ipqosDscp": {
"attributes": {
"val": "af21"
}}}]}}]}}]}}
{
imdata:[]
}
<System>
<ipqos-items>
<dflt-items>
<c-items>
<name-items>
<CMapInst-list>
<name>class_cos</name>
<matchType>match-all</matchType>
<dscp-items>
<Dscp-list>
<val>af21</val>
</Dscp-list>
</dscp-items>
</CMapInst-list>
</name-items>
</c-items>
</dflt-items>
</ipqos-items>
</System>
This example configures the traffic class by matching packets based on
dscp-values.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
class-map class_cos
match dscp af21
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide
https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html
Configuring IP RTP Classification
Configuring IP RTP Classification
POST http://<IP_Address>/api/mo/sys/ipqos/dflt/c/name-class_cos.json
{
"ipqosCMapInst": {
"attributes": {
"matchType": "match-all",
"name": "class_cos"
},
"children": [
{
"ipqosIpRtp": {
"attributes": {
"range": "3000"
}}}]}}
{
imdata:[]
}
<System>
<ipqos-items>
<dflt-items>
<c-items>
<name-items>
<CMapInst-list>
<name>class_cos</name>
<matchType>match-all</matchType>
<ipRtp-items>
<range>3000</range>
</ipRtp-items>
</CMapInst-list>
</name-items>
</c-items>
</dflt-items>
</ipqos-items>
</System>
The IP Real-time Transport Protocol (RTP) is a transport protocol for real-time applications that transmit data such as audio or video and is defined by RFC 3550. Although RTP does not use a common TCP or UDP port, you typically configure RTP to use ports 16384 to 32767. UDP communications uses an even-numbered port and the next higher odd-numbered port is used for RTP Control Protocol (RTCP) communications.
You can configure classification based on UDP port ranges, which are likely to target applications using RTP.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
class-map class_cos
match IP rtp 3000
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide
https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html
Matching an MPLS Experimental Label
Matching an MPLS Experimental Label
POST http://<IP_Address>/api/mo/sys/ipqos/dflt/c/name-class_c1.json
{
"ipqosCMapInst": {
"attributes": {
"matchType": "match-all",
"name": "class_c1"
},
"children": [
{
"ipqosMPLSExperimental": {
"attributes": {
"val": "3"
}}}]}}
{
imdata:[]
}
<System>
<ipqos-items>
<dflt-items>
<c-items>
<name-items>
<CMapInst-list>
<name>class_c1</name>
<matchType>match-all</matchType>
<mplsExperimental-items>
<MPLSExperimental-list>
<val>3</val>
</MPLSExperimental-list>
</mplsExperimental-items>
</CMapInst-list>
</name-items>
</c-items>
</dflt-items>
</ipqos-items>
</System>
The match mpls experimental topmost command classifies traffic on the basis of the EXP value in the topmost label header.
CLI Commands
These CLI commands and options are equivalent to the payload examples displayed in the pane on the right.
class-map class_c1
match mpls experimental topmost 3
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide
https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html
Deleting CoS Matches
Deleting CoS Matches
POST http://<IP_Address>/api/mo/sys/ipqos/dflt/c/name-class_c1.json
{
"ipqosCMapInst": {
"attributes": {
"matchType": "match-all",
"name": "class_c1"
},
"children": [
{
"ipqosNotCos": {
"attributes": {
"val": "4"
}}}]}}
{
imdata:[]
}
<System>
<ipqos-items>
<dflt-items>
<c-items>
<name-items>
<CMapInst-list>
<name>class_c1</name>
<matchType>match-all</matchType>
<cosNot-items>
<NotCos-list>
<val>4</val>
</NotCos-list>
</cosNot-items>
</CMapInst-list>
</name-items>
</c-items>
</dflt-items>
</ipqos-items>
</System>
This example removes a specified class of service value as a match criteria.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
class-map class_c1
match not cos 4
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide
https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html
Deleting Packet Length Matches
Deleting Packet Length Matches
POST http://<IP_Address>/api/mo/sys/ipqos/dflt/c/name-class_c1.json
{
"ipqosCMapInst": {
"attributes": {
"matchType": "match-all",
"name": "class_c1"
},
"children": [
{
"ipqosNotPacketLength": {
"attributes": {
"range": "100"
}}}]}}
{
imdata:[]
}
<System>
<ipqos-items>
<dflt-items>
<c-items>
<name-items>
<CMapInst-list>
<name>class_c1</name>
<matchType>match-all</matchType>
<packetLengthNot-items>
<range>100</range>
</packetLengthNot-items>
</CMapInst-list>
</name-items>
</c-items>
</dflt-items>
</ipqos-items>
</System>
This example removes a specified Layer 3 packet length in bytes as a match criteria.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
class-map class_c1
match not packet length 100
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide
https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html
Deleting MPLS Experimental Label Matches
Deleting MPLS Experimental Label Matches
POST http://<IP_Address>/api/mo/sys/ipqos/dflt/c/name-class_c1.json
{
"ipqosCMapInst": {
"attributes": {
"matchType": "match-all",
"name": "class_c1"
},
"children": [
{
"ipqosNotMPLSExperimental": {
"attributes": {
"val": "3"
}}}]}}
{
imdata:[]
}
<System>
<ipqos-items>
<dflt-items>
<c-items>
<name-items>
<CMapInst-list>
<name>class_co1</name>
<matchType>match-all</matchType>
<mplsExperimentalNot-items>
<NotMPLSExperimental-list>
<val>3</val>
</NotMPLSExperimental-list>
</mplsExperimentalNot-items>
</CMapInst-list>
</name-items>
</c-items>
</dflt-items>
</ipqos-items>
</System>
This example removes specified MPLS experimental label values as a match criteria.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
class-map class_co1
match not mpls experimental topmost 3
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide
https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html
Deleting DSCP Matches
Deleting DSCP Matches
POST http://<IP_Address>/api/mo/sys/ipqos/dflt/c/name-class_c1.json
{
"ipqosCMapInst": {
"attributes": {
"matchType": "match-all",
"name": "class_c1"
},
"children": [
{
"ipqosNotDscp": {
"attributes": {
"val": "af21"
}}}]}}
{
imdata:[]
}
<System>
<ipqos-items>
<dflt-items>
<c-items>
<name-items>
<CMapInst-list>
<name>class_c1</name>
<matchType>match-all</matchType>
<dscpNot-items>
<NotDscp-list>
<val>af21</val>
</NotDscp-list>
</dscpNot-items>
</CMapInst-list>
</name-items>
</c-items>
</dflt-items>
</ipqos-items>
</System>
This example removes specified DSCP values as a match criteria.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
class-map class_c1
match not dscp af21
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide
https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html
Deleting Precedence Matches
Deleting Precedence Matches
POST http://<IP_Address>/api/mo/sys/ipqos/dflt/c/name-class_c1.json
{
"ipqosCMapInst": {
"attributes": {
"matchType": "match-all",
"name": "class_c1"
},
"children": [
{
"ipqosNotPrecedence": {
"attributes": {
"val": "critical"
}}}]}}
{
imdata:[]
}
<System>
<ipqos-items>
<dflt-items>
<c-items>
<name-items>
<CMapInst-list>
<name>class_c1</name>
<matchType>match-all</matchType>
<precedenceNot-items>
<NotPrecedence-list>
<val>critical</val>
</NotPrecedence-list>
</precedenceNot-items>
</CMapInst-list>
</name-items>
</c-items>
</dflt-items>
</ipqos-items>
</System>
This example removes a specified precedence value as a match criteria.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
class-map class_c1
match not precedence critical
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide
https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html
Deleting Protocol Matches
Deleting Protocol Matches
POST http://<IP_Address>/api/mo/sys/ipqos/dflt/c/name-class_c1.json
{
"ipqosCMapInst": {
"attributes": {
"matchType": "match-all",
"name": "class_c1"
},
"children": [
{
"ipqosNotProtocol": {
"attributes": {
"val": "arp"
}}}]}}
{
imdata:[]
}
<System>
<ipqos-items>
<dflt-items>
<c-items>
<name-items>
<CMapInst-list>
<name>class_c1</name>
<matchType>match-all</matchType>
<protocolNot-items>
<NotProtocol-list>
<val>arp</val>
</NotProtocol-list>
</protocolNot-items>
</CMapInst-list>
</name-items>
</c-items>
</dflt-items>
</ipqos-items>
</System>
This example matches on protocols that do not match the specified protocol.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
class-map class_c1
match not protocol arp
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide
https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html
Configuring Layer 3 Packet Length Classification
Configuring Layer 3 Packet Length Classification
POST http://<IP_Address>/api/mo/sys/ipqos/dflt/c/name-class_c1.json
{
"ipqosCMapInst": {
"attributes": {
"matchType": "match-all",
"name": "class_c1"
},
"children": [
{
"ipqosPacketLength": {
"attributes": {
"range": "100"
}}}]}}
{
imdata:[]
}
<System>
<ipqos-items>
<dflt-items>
<c-items>
<name-items>
<CMapInst-list>
<name>class_c1</name>
<matchType>match-all</matchType>
<packetLength-items>
<range>100</range>
</packetLength-items>
</CMapInst-list>
</name-items>
</c-items>
</dflt-items>
</ipqos-items>
</System>
This example configures the traffic class by matching packets based on various packet lengths (bytes). Values can range from 1 to 9198.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
class-map class_c1
match packet length 100
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide
https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html
Configuring IP Precedence Marking
Configuring IP Precedence Marking
POST http://<IP_Address>/api/mo/sys/ipqos/dflt/c/name-class_c1.json
{
"ipqosCMapInst": {
"attributes": {
"matchType": "match-all",
"name": "class_c1"
},
"children": [
{
"ipqosPrecedence": {
"attributes": {
"val": "critical"
}}}]}}
{
imdata:[]
}
<System>
<ipqos-items>
<dflt-items>
<c-items>
<name-items>
<CMapInst-list>
<name>class_c1</name>
<matchType>match-all</matchType>
<precedence-items>
<Precedence-list>
<val>critical</val>
</Precedence-list>
</precedence-items>
</CMapInst-list>
</name-items>
</c-items>
</dflt-items>
</ipqos-items>
</System>
This example configures the traffic class by matching packets based on precedence-values.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
class-map class_c1
match precedence critical
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html