QoS Queuing Methods


Queuing in Cisco routers has been around for quite some time. Back then the command’s were not standardised and using some of the older methods requires that you memorise some really arcane commands. The new Modular Quality of service (MQC) makes life much easier. This is also sometimes referred to as Class Based Queuing.

FIFO – First in First Out

  • the most simplest
  • to configure

Just unconfigure all other methods

  • use “show int x/y | i que” to check method
  • change que length: hold-queue x out

PQ – Priority Queuing

  • not MQC enabled
  • good for low latency requirements
  • 4 queues – High, Medium, Normal, Low
  • always serve the high first, if empty then medium and so on
  • to configure

1) create a priority list: (config)# priority-list x ….

2) apply to interface: (config-if)# priority-group x

CQ – Custom Queuing

  • not MQC enabled
  • good for reserving bandwidth. There are some corner cases where this does not work. (See ODOM)
  • 16 queues – labelled 1 to 16
  • set to bytes to transmit per queue
  • service all queues in round robin fashion
  • this guarantees minimum bandwidth per queue
  • to configure

1) create que list: (config)# queue-list x que y (where x is list number and y is que number)

2) apply to interface: (config-if)# custom-que-list x

example :

  • R1(config)#queue-list 1 protocol ip 1 tcp www  (assigns http traffic to be in queue 1)
  • R1(config)#queue-list 1 protocol ip 2 tcp smtp (assigns smtp traffic to be in queue 2)
  • R1(config)#queue-list 1 protocol ip 3 tcp nntp (assigns nntp traffic to be in queue 3)
  • R1(config)#queue-list 1 default 4 ((assigns all other traffic to be in queue 4)
  • R1(config)#int fa 0/0
  • R1(config-if)#custom-queue-list 1   (applies custom queue to the interafce)
  • R1(config)#queue-list 1 queue 1 byte-count 5000  (allocates byte count for the queues)
    R1(config)#queue-list 1 queue 2 byte-count 2000
    R1(config)#queue-list 1 queue 3 byte-count 1000
    R1(config)#queue-list 1 queue 4 byte-count 2000

R1#sh queueing custom
Current custom queue configuration:

List   Queue  Args
1      4      default
1      1      protocol ip          tcp port www
1      2      protocol ip          tcp port smtp
1      3      protocol ip          tcp port nntp
1      1      byte-count 5000
1      3      byte-count 1000
1      4      byte-count 2000

R1#sh int fa 0/0
FastEthernet0/0 is up, line protocol is up
  Hardware is Gt96k FE, address is c20b.163c.0000 (bia c20b.163c.0000)
  Internet address is 10.10.10.1/8
  MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec,
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation ARPA, loopback not set
  Keepalive set (10 sec)
  Full-duplex, 100Mb/s, 100BaseTX/FX
  ARP type: ARPA, ARP Timeout 04:00:00
  Last input 00:00:08, output 00:00:03, output hang never
  Last clearing of “show interface” counters never
  Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
  Queueing strategy: custom-list 1
  Output queues: (queue #: size/max/drops)
     0: 0/20/0 1: 0/20/0 2: 0/20/0 3: 0/20/0 4: 0/20/0
     5: 0/20/0 6: 0/20/0 7: 0/20/0 8: 0/20/0 9: 0/20/0
     10: 0/20/0 11: 0/20/0 12: 0/20/0 13: 0/20/0 14: 0/20/0
     15: 0/20/0 16: 0/20/0
  5 minute input rate 0 bits/sec, 0 packets/sec
  5 minute output rate 0 bits/sec, 0 packets/sec
     2519 packets input, 923977 bytes
     Received 2519 broadcasts, 0 runts, 0 giants, 0 throttles
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
     0 watchdog
     0 input packets with dribble condition detected
     17244 packets output, 1741419 bytes, 0 underruns
     0 output errors, 0 collisions, 3 interface resets
     0 babbles, 0 late collision, 0 deferred
     0 lost carrier, 0 no carrier
     0 output buffer failures, 0 output buffers swapped out

MDRR – Modified Deficit Round Robin

  • 8 queues – labelled 0 -7
  • exactly like CQ but provides better bandwidth control
  • only available on GSRs (ie 12000 routers)

WFQ – Weighted Fair Queuing

  • default option
  • good for low volume flows
  • not MQC enabled
  • 4096 queues (unconfigurable)
  • based on classifying flows automatically
  • provides all flows with equal bandwidth
  • uses modified tail drop
  • to configure:

1) no need to create anything

2) apply to interface: (config-if)# fair-queue

CBWFQ – Class Based Weighted Fair Queuing

  • MQC enabled
  • 64 queues – each one is reference with a class statement in MQC speak
  • does not have the bandwidth issues like CQ
  • like CQ in that you can reserve bandwidth but in % not in bytes
  • only within the default queue you can use WFQ but all the rest use FIFO
  • the default queue can use tail drop or WRED. All other queues use tail drop. If you end up using WFQ then you will use modified tail drop.
  • to configure

create policy

(config)# class-map match-all x

(config)# policy-map xxx

class x

bw percent 50 (% of the number configured on the interface using the bw command)

class default

fair-que

apply to interface: (config-if)# service-policy out xxxx

LLQ – Low Latency Queuing

  • MQC enabled
  • this is just CBWFQ with the priority command turn on in one class
  • to configure

create policy

(config)# class-map match-all x

(config)# policy-map xxx

class x

priority bw (maximum bandwidth in kbps)

or priority percent 50 (% of the interface BW or based on the interfaces bw command)

class default

fair-que

apply to interface: (config-if)# service-policy out xxxx