QoS Configuration in NX-OS [MQC Explained and Configuration Example]

QoS Configuration in NX-OS [MQC Explained and Configuration Example]

Cisco Modular QoS CLI (MQC)

Cisco Modular Quality of Service Command Line Interface (MQC) provides a Standard CLI to define and configure QoS policies.

This diagram from CiscoLive illustrate what MQC is about:


The Qos configuration in Nexus 9000 can be achieved in 3 steps:

  1. Define traffic classes.
  2. Associate policies and actions with each traffic class.
  3. Attach policies to logical or physical interfaces.



Class-map

Classification is the separation of packets into traffic classes. You configure the device to take a specific action on the specified classified traffic, such as policing or marking down, or other actions

Cisco

We can use class-map mainly match and then classify traffic based on these parameters:

  • CoS
  • DSCP
  • IP Precedence
  • ACL


Configuration Examples:

  • Example1: Qos class-map:
    syntax: class-map type qos [match-any | match-allclass-name
    config example: class-map type qos MyClass
  • Example2: Queuing class-map
    syntax: class-map type qos [match-any | match-allclass-name
    Config example: class-map type queuing match-any c-out-q2


Policy-Map

Configure a Policy-map to match on the Class-map and define actions to perform on them: such as marking with DSCP, Cos, setting Qos-class , setting bandwitch, Policing, etc.

Configuration Examples:

  • Example1: Qos Policy-map
    syntax: policy-map type qos { [match-firstpolicy-map-name}
    config example: policy-map type qos MyPolicy
  • Example2: Queuing policy-map
    syntax: policy-map type queuing [match-any | match-allclass-name
    Config example: policy-map type queuing MyPol_queue


Service-Policy

To attach a policy map to an interface or VLAN, use the service-policy command. It will Apply the specified policy map to input or output packets on the interface.


Configuration Examples:

  • Example1: Apply Policy1 on interface 10
    syntax:
    Interface slot/port
    service-policy [type qos] {input | output} {policy-map-name} [no-stats]



Configuration Example

Let’s take first a simple example that will match on Cos 3 and set precedence 5 on the ingress interface Ethernet 1/5:

1- Class-map: Class1:

! create Policy-map Policy1
switch(config)# class-map Class1

! match on cos 3
switch(config-cmap-qos)# match cos 3


2- Policy-map: Policy1:

! create Policy-map Policy1
switch(config)# policy-map policy1

! match on class-map class1:
switch(config-pmap-qos)# class Class1

! setting precedence to 3:
switch(config-pmap-c-qos)# set precedence 3


3– Service-Policy:

interface ethernet 1/5
service-policy input Policy1


Bilel Ameur

Enthusiastic Network Engineer specializing in Cisco ACI, passionate about solving challenges. A lifelong learner who loves gaining and sharing knowledge. Profile: https://www.linkedin.com/in/bilel-ameur-71116b2b5
0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x