Previous

Content

Next 


2.4.2.2 Prio queuing discipline  
Of course, using Fifo it's not possible to do what we want, this means, exercise some control over packets to establishing differentiated services on their flows. Its simple nature is very limited for doing that. Instead, using Prio queuing discipline we can start to create what we will call a discriminatory world. But let's begin looking first how it works.
Prio queuing discipline is a relative simple algorithm where it is possible to implement differentiated service classes. The recipe is easy; you need some Fifo queues, at least two, being three or four enough better. Then you assign to each of these queues a different priority, for example, having three, you could assign high, medium and low priority to them.
Next you need two ubiquitous mechanisms: 1.- A classifier that is in charge to snoop in packet header to decide in which of the queues to place the packet, and 2.- A scheduler that is in charge to empty the queues picking the packets starting with the higher priority queue, next the medium one, and finally the low one; i.e. as soon as there are packets in the high priority queue it must be served first until been empty, then the medium priority queue and finally the low one.
A diagram just now can save us trying to understand this. Here we have one stolen from Cisco. I added some color for better understanding; have a look to figure #5 below.

Great!! Now we have a queuing discipline that prioritize packet dispatching. Cisco Prio queuing discipline is called Priority Queuing (PQ). They use a four classes Prio queue being their names High, Medium, Normal and Low. Previously to enter the classifier all packets are showed as of gray color (we don't know what they are). After the classifier makes its job snooping the packet headers to classify them they are assigned to the different queues depending on this classification result. This is indicated above using green, yellow, blue and red color. Configuring PQ is a little bit confuse but let's try with the next example:

In the diagram network 192.168.1/24 to the left is the server network; network 192.168.2/24 to the right is the user network. Both networks are connected by a 2.048 Mbps link through two Cisco routers. There is also an Internet connection through a Linux NAT (Network Address Translation) router. We will set a PQ on router RT1's serial interface 0. Why over there? Because higher throughputs flow from servers to users and queues are implemented on output interfaces faced to the bottleneck link and as closer as possible to the sources to be controlled.
  We have four servers: SQL, WWW, MAIL and FTP server. According to their level of importance we want to assign the SQL server to the high priority queue, the WWW server to the medium priority queue, the MAIL and FTP servers to the normal priority queue and rest of traffic to the low priority queue.
On router RT1 we need to create first some access lists. Access List (ACL) is a mechanism implemented by Cisco to select flows based on information contained in packet headers. Typical criteria you define in access lists are packet source or destination address, or upper-layer protocol of the packet. Then we have:

This way ACL 10, 20, 30 and 40 will correspond to SQL, WWW, MAIL and FTP servers respectively.
Next, we have to create what Cisco calls a Priority List. The priority list specifies which queue a packet will be placed in. In this case, our commands will be:

The priority-list commands are read in order of appearance until a match is found; when done the packet is assigned to the selected queue and the search ends. Packets that do not match any rule are assigned to the default queue. Well, first two commands assign ACL 10 to the high priority queue and ACL 20 to the medium priority queue. ACL 10 and ACL 20 happen to be the SQL and WWW server respectively. Commands three and four assign ACL 30 and ACL 40 to the normal priority queue. ACL 30 and ACL 40 happen to be the MAIL and FTP server respectively. Finally rest of traffic (not matching any other rule) is assigned to the low priority queue that we selected as default using fifth command above.
Okay, we have our access list and priority list already assembled. Next step is to assign them to the router RT1's serial interface 0. We do that using the priority-group command in interface configuration mode:

Eureka!! We've finished our first QoS example. Let's step ahead studying now the Custom Queing discipline (CQ).
Warning: As I told before do not try to implement these examples on your on-production network. First, check your ideas on a model or prototype. Also, do not hope that things are as easier as they appear. Do not experiment with your on-production network if you don't know very well what you are doing. Side effects occur. For example, PQ high priority queue assigned traffic could starve traffic from lower priority queues if you don't take some other providences to put high priority traffic under an upper-limit control. Then, until you are more than enough sure do not put on risk your network, users, customers and your own job.

   


Previous

Content

Next