Thanks for visiting! If you're new here, you may want to subscribe to my RSS feed. This blog posts regular tutorials, news, and study tips about networking, especially about Cisco CCIE related topics. Go ahead, subscribe to the rss feed! You can also receive updates from this blog via email. Thanks for visiting!
What is Congestion Management?
Priority Queuing is a QoS congestion management mechanism. What the hell is a congestion management mechanism I hear you ask? Congestion management is how a router deals with what happens when its output queue is full. A router can’t really do much to control traffic, all it does is collect frames, figure out what to do with them, and pass them down the correct interface (hopefully!). If the frames are coming too thick and fast for the router to handle, this output queue gets full and there is not enough room for the new frames that arrive. This is known as congestion.
Congestion Management is a strategy that the router uses to handle congestion. What happens if a really important frame arrives and finds that the output queue is full? Without Congestion Management the router might just decide to drop that frame (”Aaarraaggh” I’m too busy leave me alone). Or it could say, “alright Mr VIP frame you wait in this line here and as soon as there is a free spot your the first one in”. It could have a whole bunch of different “queues” and have different criteria on who gets to go in first etc. It could even accept reservations ahead of time. These are all examples of congestion management strategies.
There are a couple of different styles of congestion management, Priority Queuing (PQ), Custom Queuing (CQ), Weighted Fair Queue (WFQ) each with different strengths and weaknesses. This article focuses on Priority Queuing.
“OK, you get to go first”
The priority queuing congestion management strategy consists of four queues. These queues are creatively called the high, medium, normal and low queues. The way it works is this, whatever the router places in the high queue always gets served before the medium, normal, and low queues. Whatever the router places in the medium queue, always gets served before the normal and low queues but only if there is no stuff in the high queue. Whatever the router places in the normal queue always gets served before the low queue but only if there is no stuff in the medium and high queues. The Low queue gets served last as long as there is nothing in the other queues.
So frames in the high queue are given preferential treatment over other frames, which for VIP frames like voice is great. The problem with this method is that the other queues can suffer from starvation. Imagine a case where the high queue always has something in it (maybe a busy site with lots of voice traffic). If the high queue always has something in it, then the other queues will never get served!
So priority queuing is really great for high priority traffic, but all other traffic suffers in some scenarios because of traffic starvation. It is usually seen on very low bandwidth links. For the CCIE, the things that i would look for is the key word prioritise, or such and such protocol must take priority over another.
Priority Queue Configuration.
Lets have a look at how to configure it:
To configure priority queuing we need to figure out which traffic to put into the different queues. After we do this we define which interface to apply this congestion strategy to. Remember this is a congestion management strategy, so it will apply to outbound traffic.
The syntax for establishing a priority-list is:
priority-list list-number protocol protocol-name {high | medium | normal | low } queue-keyword keyword-value
Lets have a look at a few examples:
access-lists 101 permit ip any 150.1.1.0 0.0.0.127
priority-list 1 protocol ip high list 101
priority-list 1 protocol ip medium gt 120
priority-list 1 protocol cdp low
The configuration above has all traffic that matches access-list 101 (any ip traffic heading to the 150.1.1.0/25 subnet) put in the high queue. All ip traffic greater than 120 bytes is placed in the medium queue. All cdp traffic is placed in the low queue.
What about traffic that doesn’t match that stuff? We might want all other traffic to be placed in the normal queue. To do that we use the priority-list default command. The syntax for this command is:
priority-list list-number default { high | medium | normal | low}
Lets expand that example above and make all other traffic go into the normal queue:
access-lists 101 permit ip any 150.1.1.0 0.0.0.127
priority-list 1 protocol ip high list 101
priority-list 1 protocol ip medium gt 120
priority-list 1 protocol cdp low
priority-list 1 default normal
By default anything that doesn’t match a priority list is sent to the normal queue. The last line above is not really required, as that is the default.
The priority-list command not only allows deciding which protocols get to go in each of the queues, you can also decide which frames get to go into queues based on the interface it arrived on. This is done with the priority-list interface command:
priority-list list-number interface interface-type interface number { high | medium | normal | low }
Lets have a look at an example:
priority-list 1 int fa 0/0 medium
The above places all frames arriving on the fastethernet0/0 interface to the medium queue. Cool huh?
What about precedence? If you have both a priority-list interface command and a priority-list protocol command in a single priority queue. Like access-lists, priority-lists are read one line at a time until a match is found.
Example 1:
access-list 101 permit any 150.1.1.0 0.0.0.127
priority-list 1 protocol ip high list 101
priority-list 1 interface fa0/0 medium
Example 2:
access-list 101 permit any 150.1.1.0 0.0.0.127
priority-list 1 interface fa0/0 medium
priority-list 1 protocol ip high list 101
Let’s say you have this scenario: A frame arrives on fa0/0 and is destined for the 150.1.1.0/128 subnet. With the first example, it would be placed in the high queue. Using the second example it would be placed in the medium queue.
The priority-list queue-limit command is used to place limits on the number of packets that can be waiting in each of the priority queues (ie. the queue size).
priority-list list-number queue-limit high-limit medium-limit normal-limit low-limit
For example:
priority-list 1 queue-limit 20 40 60 80
This sets the maximum packets in the priority queues to 20 for the high queue, 40 for the medium queue, 60 for the normal queue, and 80 for the low queue. These are the defaults queue sizes for each of the queues.
Now that we’ve had a look at configuring the priority queue how do we apply it to an interface. To do this we use the priority-group command.
priority-group list-number
For example:
int fa0/0
priority-group 1
This applies the priority-list 1 defined above, to interface fa0/0. Don’t forget this is congestion management so it only applies in an outbound direction. You can create up to 16 different priority-lists each with a different set of the four queues, but only one of the lists can be applied to the interface.
Show me the PQ!
Now that we have gone through setting up priority queuing how do we verify that it has actually been set up the way we want? Show commands! The show queuing priority command is used to verify the priority queues.
show queuing priority
For example:
Router(config)#priority-list 1 protocol ip high list 101
Router(config)#priority-list 1 interface FastEthernet0/0 medium
Router(config)#priority-list 1 protocol ip low gt 1024
Router#sh queuing priority
Current DLCI priority queue configuration:
Current priority queue configuration:
List Queue Args
1 normal protocol ip list 101
1 medium interface FastEthernet0/0
1 low protocol ip gt 1024
Summary:
Thank you!
cool stuff. thanks