What is Modular Quality of Service CLI (MQC)?

Edgar C Francis
6 min readDec 3, 2023

--

Internetworks

The modular Quality of Service CLI (MQC) helps by defining a common set of configuration commands to configure many QOS features in a router or switch. https://qos.internetworks.in/2020/03/what-is-modular-quality-of-service-cli_21.html

MQC separates the classification function of a QOS tool from the action (PHB) that the QOS tool wants to perform. To do so, there are three major commands with MQC, with several subordinate commands:

Class maps

What traffic do we care about?

Each class is identified using a class map

A traffic class contains three major elements:

- A case-sensitive name

- A series of match command

- An instruction on how to evaluate the match command if more than one match command exists in the traffic class

Class maps can operate in two modes:

- Match all: all conditions have to succeed.

- Match any: at least one condition must succeed.

- The default mode is match all.

R1(config-cmap)#

Policy maps

What will be done to this traffic?

Define a traffic policy, which configures the QOS features associated with traffic class previously identified using a class map.

A traffic policy contains three major elements:

- A case-sensitive name

- A traffic class

- The QOS policy associate with that traffic class

Up to 256 traffic classes can be associated with a single traffic policy.

Multiple policy maps can be nested to influence the sequence of QOS actions.

Service policy

Where will this policy be implemented?

Attaches a traffic policy configured with a policy map an interface.

Service polices can be applied to an interface for inbound or outbound packets.

R1(config-pmap-c)#

Service policy

Where will this policy be implemented?

Attaches a traffic policy configured with a policy map an interface.

Service polices can be applied to an interface for inbound or outbound packets.

\

let see the configuration:

Topology:

TASK:

  • configure the topology as per the diagram
  • Assign IP addresses as per the diagram
  • configure OSPF and advertise all the directly connected interfaces
  • configure MQC policy on router 1 serial 3/2
  • traffic flows for ICMP between Router 1 and Router 3 serial 3/2 network (10.1.1.1 to 30.1.1.1) should be guaranteed 130 kbps.assign 70 kbps to HTTP traffic.

R1#show ip interface brief

Interface IP-Address OK? Method Status Protocol

FastEthernet0/0 10.1.1.1 YES manual up up

Serial3/0 1.1.1.1 YES manual up up

Serial3/2 3.3.3.2 YES manual up up

R2#show ip interface brief

Interface IP-Address OK? Method Status Protocol

FastEthernet0/0 20.1.1.1 YES manual up up

Serial3/0 1.1.1.2 YES manual up up

Serial3/1 2.2.2.1 YES manual up up

R3#show ip interface brief

Interface IP-Address OK? Method Status Protocol

FastEthernet0/0 30.1.1.1 YES manual up up

Serial3/1 2.2.2.2 YES manual up up

Serial3/2 3.3.3.1 YES manual up up

R1(config)#router ospf 1

R1(config-router)#network 10.0.0.0 0.255.255.255 area 0

R1(config-router)#network 1.0.0.0 0.255.255.255 area 0

R1(config-router)#network 3.0.0.0 0.255.255.255 area 0

R1(config-router)#exit

*Jan 5 23:40:32.179: %OSPF-5-ADJCHG: Process 1, Nbr 20.1.1.1 on Serial3/0 from LOADING to FULL, Loading Done

R2(config)#router ospf 1

R2(config-router)#network 20.0.0.0 0.255.255.255 area 0

R2(config-router)#network 2.0.0.0 0.255.255.255 area 0

R2(config-router)#network 1.0.0.0 0.255.255.255 area 0

R2(config-router)#exit

*Jan 5 23:40:31.891: %OSPF-5-ADJCHG: Process 1, Nbr 10.1.1.1 on Serial3/0 from LOADING to FULL, Loading Done

*Jan 5 23:41:07.539: %OSPF-5-ADJCHG: Process 1, Nbr 30.1.1.1 on Serial3/1 from LOADING to FULL, Loading Done

R3(config)#router ospf 1

R3(config-router)#network 30.0.0.0 0.255.255.255 area 0

R3(config-router)#network 3.0.0.0 0.255.255.255 area 0

R3(config-router)#network 2.0.0.0 0.255.255.255 area 0

R3(config-router)#exit

*Jan 5 23:41:07.835: %OSPF-5-ADJCHG: Process 1, Nbr 20.1.1.1 on Serial3/1 from LOADING to FULL, Loading Done

*Jan 6 00:21:31.051: %OSPF-5-ADJCHG: Process 1, Nbr 10.1.1.1 on Serial3/2 from LOADING to FULL, Loading Done

R1#show ip pro

*** IP Routing is NSF aware ***

Routing Protocol is “ospf 1”

Outgoing update filter list for all interfaces is not set

Incoming update filter list for all interfaces is not set

Router ID 10.1.1.1

Number of areas in this router is 1. 1 normal 0 stub 0 nssa

Maximum path: 4

Routing for Networks:

1.0.0.0 0.255.255.255 area 0

3.0.0.0 0.255.255.255 area 0

10.0.0.0 0.255.255.255 area 0

Routing Information Sources:

Gateway Distance Last Update

20.1.1.1 110 00:01:29

30.1.1.1 110 00:00:43

Distance: (default is 110)

R1#show ip route ospf

Gateway of last resort is not set

O 2.0.0.0/8 [110/128] via 1.1.1.2, 00:01:40, Serial3/0

O 20.0.0.0/8 [110/65] via 1.1.1.2, 00:01:40, Serial3/0

· 30.0.0.0/8 [110/129] via 1.1.1.2, 00:00:55, Serial3/0

R2#show ip pro

*** IP Routing is NSF aware ***

Routing Protocol is “ospf 1”

Outgoing update filter list for all interfaces is not set

Incoming update filter list for all interfaces is not set

Router ID 20.1.1.1

Number of areas in this router is 1. 1 normal 0 stub 0 nssa

Maximum path: 4

Routing for Networks:

1.0.0.0 0.255.255.255 area 0

2.0.0.0 0.255.255.255 area 0

20.0.0.0 0.255.255.255 area 0

Routing Information Sources:

Gateway Distance Last Update

10.1.1.1 110 00:02:02

30.1.1.1 110 00:01:25

Distance: (default is 110)

R2#show ip route ospf

Gateway of last resort is not set

O 3.0.0.0/8 [110/128] via 1.1.1.1, 00:02:09, Serial3/0

O 10.0.0.0/8 [110/65] via 1.1.1.1, 00:02:09, Serial3/0

· 30.0.0.0/8 [110/65] via 2.2.2.2, 00:01:31, Serial3/1

R3#show ip pro

*** IP Routing is NSF aware ***

Routing Protocol is “ospf 1”

Outgoing update filter list for all interfaces is not set

Incoming update filter list for all interfaces is not set

Router ID 30.1.1.1

Number of areas in this router is 1. 1 normal 0 stub 0 nssa

Maximum path: 4

Routing for Networks:

2.0.0.0 0.255.255.255 area 0

3.0.0.0 0.255.255.255 area 0

30.0.0.0 0.255.255.255 area 0

Routing Information Sources:

Gateway Distance Last Update

10.1.1.1 110 00:12:40

20.1.1.1 110 00:14:46

Distance: (default is 110)

R3#show ip route ospf

Gateway of last resort is not set

O 1.0.0.0/8 [110/128] via 3.3.3.2, 00:12:45, Serial3/2

[110/128] via 2.2.2.1, 00:14:52, Serial3/1

O 10.0.0.0/8 [110/65] via 3.3.3.2, 00:12:45, Serial3/2

O 20.0.0.0/8 [110/65] via 2.2.2.1, 00:53:04, Serial3/1

R1(config)#access-list 111 permit icmp host 10.1.1.1 host 30.1.1.1 echo

R1(config)#access-list 111 permit icmp host 10.1.1.1 host 30.1.1.1 echo-reply

R1(config)#access-list 122 permit tcp any any eq www

R1(config)#class-map icmp_tr

R1(config-cmap)#match access-group 111

R1(config-cmap)#exit

R1(config)#class-map web_tr

R1(config-cmap)#match access-group 122

R1(config-cmap)#exit

R1#show run class-map

Building configuration…

Current configuration : 111 bytes

!

class-map match-all web_tr

match access-group 122

class-map match-all icmp_tr

match access-group 111

end

R1(config)#policy-map internetworks

R1(config-pmap)#class icmp_tr

R1(config-pmap-c)#bandwidth 130

R1(config-pmap-c)#exit

R1(config-pmap)#class web_tr

R1(config-pmap-c)#bandwidth 70

R1(config-pmap-c)#exit

R1(config-pmap)#class class-default

R1(config-pmap-c)#exit

R1#show run policy-map

Building configuration…

Current configuration : 116 bytes

!

policy-map internetworks

class icmp_tr

bandwidth 130

class web_tr

bandwidth 70

class class-default

!

end

R1(config)#interface serial 3/2

R1(config-if)#service-policy output internetworks

R1(config-if)#end

R1#show policy-map interface serial 3/2

Serial/2

Service-policy output: internetworks

Class-map: icmp_tr (match-all)

0 packets, 0 bytes

5 minute offered rate 0000 bps, drop rate 0000 bps

Match: access-group 111

Queueing

queue limit 64 packets

(queue depth/total drops/no-buffer drops) 0/0/0

(pkts output/bytes output) 0/0

bandwidth 130 kbps

Class-map: web_tr (match-all)

0 packets, 0 bytes

5 minute offered rate 0000 bps, drop rate 0000 bps

Match: access-group 122

Queueing

queue limit 64 packets

(queue depth/total drops/no-buffer drops) 0/0/0

(pkts output/bytes output) 0/0

bandwidth 70 kbps

Class-map: class-default (match-any)

5 packets, 288 bytes

5 minute offered rate 0000 bps, drop rate 0000 bps

Match: any

queue limit 64 packets

(queue depth/total drops/no-buffer drops) 0/0/0

(pkts output/bytes output) 5/288

R1#PING 30.1.1.1 SOURCE 10.1.1.1 REPEAT 100

Type escape sequence to abort.

Sending 100, 100-byte ICMP Echos to 30.1.1.1, timeout is 2 seconds:

Packet sent with a source address of 10.1.1.1

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Success rate is 100 percent (100/100), round-trip min/avg/max = 20/29/44 ms

R1#show policy-map interface serial 3/2

Serial3/2

Service-policy output: INTERNETWORKS

Class-map: ICMP_TR (match-all)

100 packets, 10400 bytes

5 minute offered rate 0000 bps, drop rate 0000 bps

Match: access-group 111

Queueing

queue limit 64 packets

(queue depth/total drops/no-buffer drops) 0/0/0

(pkts output/bytes output) 100/10400

bandwidth 130 kbps

Class-map: WEB_TR (match-all)

0 packets, 0 bytes

5 minute offered rate 0000 bps, drop rate 0000 bps

Match: access-group 122

Queueing

queue limit 64 packets

(queue depth/total drops/no-buffer drops) 0/0/0

(pkts output/bytes output) 0/0

bandwidth 70 kbps

Class-map: class-default (match-any)

15 packets, 1153 bytes

5 minute offered rate 0000 bps, drop rate 0000 bps

Match: any

queue limit 64 packets

(queue depth/total drops/no-buffer drops) 0/0/0

(pkts output/bytes output) 15/1153

--

--

Edgar C Francis
Edgar C Francis

Written by Edgar C Francis

I am a CCIE Technical Instructor/Network consultant. I am having experience ranging from operating and maintaining PCs and peripherals to network control

No responses yet