The Modular Quality of Service CLI (MQC) Review – Class Maps

September 23, 2015 at 5:11 pm

Ant_Keith_QoS

The MQC is king when it comes to almost all of our QoS configurations these days. Let’s review the first step – the Class Map step.

The Class Map step is where we take traffic forms and place them into pails. Notice I am avoiding the term bucket because we use that already for another QoS topic :-).

When you are learning your QoS configs, be sure to use context-sensitive help every step of the way. This helps you discover what is possible, and helps you avoid potential pitfalls and gotchas.

Well, let’s fire up Cisco VIRL and examine these important structures in great detail…

iosv-1(config)#class-map ?
WORD           class-map name
match-all      Logical-AND all matching statements under this classmap
match-any    Logical-OR all matching statements under this classmap
type                Configure CPL Class Map

We begin by examining the options after our class-map command to create the class map. Notice we can go right to naming it, or, most importantly, selecting whether we must match ALL of the criteria that follow or ANY of them in order to have the traffic fall within this pail. There is a default here, but I can never remember what it is, so I always pick match-all or match-any. Notice also we can configure a type of class map. This is because the MQC has been extended and called the Modular Policy Framework and can now do more than just QoS for us. Let’s create a match-any class map named CM_TEST.

iosv-1(config)#class-map match-any CM_TEST
iosv-1(config-cmap)#

Now we are in class map configuration mode where we use the match command to match on a ton of options – here are just some:

access-group                   Access group
any                                      Any packets
application                      Application to match
cac                                      Call Admission Control
class-map                        Class map
cos                                      IEEE 802.1Q/ISL class of service/user priority values
destination-address    Destination address
discard-class                  Discard behavior identifier
dscp                                   Match DSCP in IPv4 and IPv6 packets

Note that while we can use QoS to mark traffic, if our traffic is already marked, we can match on the Layer 2 or Layer 3 markings easily in the class map.

Here is the rest of my sample configuration based on these facts:

iosv-1(config-cmap)#match access-group 100
iosv-1(config-cmap)#match protocol icmp

The match access-group 100 matches an ACL (not shown) that specifies traffic we want, and the match protocol ICMP ensures that Network Based Application Recognition (NBAR) is at work to automatically recognize any ICMP traffic.

Remember, thanks to our match any logic, this class map will gather traffic that matches either of these or both!

I hope you enjoyed this review of class maps. Obviously the next post will review our second step of the MQC process – policy maps! Here is where we take action on the traffic that we have matched.

Questions, comments, hate mail? Use the comments below! 🙂