Custom Queuing
Custom Queuing
Custom Queuing (CQ) is a Congestion Management technique which is round-robin like where frames from each queue are serviced until a byte-counter limit threshold is met. Once this threshold is met, the frames from next queue are serviced.
There are 17 queues in CQ- queue 0 is the System Queue while queues 1-16 are user-defined. Queue 0 is used for keepalives, some routing protocols whose traffic is generated by the router. These are ISIS Hellos, EIGRP/IGRP Hellos, OSPF Hellos, Spanning-tree keepalives, Router Syslog messages, SLARP address resolution, etc. Queue 0 is always serviced first. Queues 1 through 16 are then serviced in round-robin fashion.
Network topology:
We will use 4 different queues (although 16 queues can be used) and assign traffic to each queue-
- Using Iperf, TCP traffic will be generated from PC1 to PC2 on TCP Port 5001 - Queue 1
- Using Iperf, TCP traffic will be generated from PC1 to PC2 on TCP Port 5002 - Queue 2
- Using Iperf, TCP traffic will be generated from PC1 to PC2 on TCP Port 5003 - Queue 3
- ICMP traffic originating from PC1 to PC2 - Queue 4
Configuration:
CQ is configured using queue-list command from global configuration mode.
Allocating traffic to Queues
!---- Defining Access-Lists to match traffic
!
access-list 101 permit tcp host 192.168.1.10 host 192.168.2.10 eq 5001
!
access-list 102 permit tcp host 192.168.1.10 host 192.168.2.10 eq 5002
!
access-list 103 permit tcp host 192.168.1.10 host 192.168.2.10 eq 5003
!
access-list 104 permit icmp host 192.168.1.10 host 192.168.2.10
!
queue-list 1 protocol ip 1 list 101
queue-list 1 protocol ip 2 list 102
queue-list 1 protocol ip 3 list 103
queue-list 1 protocol ip 4 list 104
!
By default, the size of each queue is 20 packets. The size of a queue can be changed using queue-list <list-number> queue <queue-number> limit <value> global configuration command. The range of the "value" keyword is 0 to 32767 where 0 indicates unlimited size of the queue.
Changing Queue size
queue-list 1 queue 1 limit 40
queue-list 1 queue 2 limit 30
queue-list 1 queue 3 limit 20
queue-list 1 queue 4 limit 20
!
Now each queue is set with a byte-count threshold which specifies how many bytes the system allows to be delivered from a given queue during one cycle before servicing the next queue. By default, this value is 1500 bytes. To change this value, use queue-list <list-number> queue <queue-number> byte-count <byte-count-number> global configuration command.
Queue Byte-count
queue-list 1 queue 1 byte-count 1400
queue-list 1 queue 2 byte-count 1450
!
By default, Queue 0 is always served first (like High Queue in Priority Queuing). However, Cisco IOS allows user-defined queues to become priority queues. It is done using queue-list <list-number> lowest-custom <no._of_queues> global configuration command. The "number of queues" keyword specifies the number of queues to be considered Priority Queues including Queue 0. The range is 0 to 16.
Specifying PQ in Custom Queuing
queue-list 1 lowest-custom 2
!
Monitoring Custom Queuing:
The show queueing custom displays custom queuing on R1 router.
show queueing custom on R1
R1# show queueing custom
Current custom queue configuration:
List Queue Args
1 1 protocol ip list 101
1 2 protocol ip list 102
1 3 protocol ip list 103
1 4 protocol ip list 104
1 1 byte-count 1400 limit 40
1 2 byte-count 1450 limit 30
The show interface Serial 1/0 command shows CQ applied on the interface.
show interface serial 1/0
R1# show interface serial 1/0
Serial1/0 is up, line protocol is up
Hardware is M4T
Internet address is 10.1.1.1/30
MTU 1500 bytes, BW 128 Kbit/sec, DLY 20000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation HDLC, crc 16, loopback not set
Keepalive set (10 sec)
Restart-Delay is 0 secs
Last input 00:00:02, output 00:00:00, 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/40/0 2: 0/30/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
...
...output omitted