Priority Queuing assigns strict priorities to types of packets so that higher-priority traffic is sent before lower-priority traffic.
PQ can assign traffic into four queues on an interface: high, medium, normal, and low. Traffic that isn't explicitly classified falls into the normal queue.
A queue is serviced until it is emptied before moving to the next lower-priority queue.
Lower-priority queues can potentially be "starved," or never serviced, as long as there is data in the higher-priority queues.
Define one or more queue classifications to a priority list.
NOTE
For each packet, priority list commands are evaluated in sequential order (the order you enter them) until a matching condition is found. Therefore, order can be important.
Queue traffic according to protocol:
(global) priority-list list-number protocol protocol-name { high medium normal low } [ queue-keyword [ keyword-value ]]
The priority list is assigned a list-number (1 to 16). Traffic matching the protocol-name is placed in the specified queue ( high, medium, normal, or low ).
The protocol-name field can be aarp, apollo, appletalk, arp, bridge, clns, clns_es, clns_is, compressedtcp, cmns, decnet, decnet_node, decnet_router-l1, decnet_router-l2, dlsw (direct encapsulation only), ip, ipx, pad, rsrb (direct encapsulation only), stun (direct encapsulation only), vines, xns, or x25.
The queue-keyword can be fragments (noninitial fragmented IP packets), gt byte-count (a packet size greater than byte-count bytes), list list-number (packets permitted by access list list-number; for protocols appletalk, bridge, ip, ipx, vines, and xns ), lt byte-count (a packet size less than byte-count bytes), tcp port (to or from TCP port ), or udp port (to or from UDP port ).
Queue traffic according to the inbound interface:
(global) priority-list list-number interface type number { high medium normal low }
The priority list is assigned a list-number (1 to 16). Traffic entering on the interface type and number is assigned to the specified queue.
Queue all other traffic by default:
(global) priority-list list-number default { high medium normal low }
All unclassified traffic for list-number (1 to 16) is assigned to the specified queue.
(Optional) Set the maximum queue size:
(global) priority-list list-number queue-limit [ high-limit [ medium-limit [ normal-limit [ low-limit ]]]]
By default, the high queue is 20 packets deep, the medium queue is 40 packets deep, the normal queue is 60 packets deep, and the low queue is 80 packets deep. If you need to change the size of any or all of the queues for a given list-number (1 to 16), you can set each queue's limit in packets.
Apply the priority queue list to an interface:
(interface) priority-group list-number
Priority queuing is configured so that all IP traffic from host 67.2.21.5 is assigned to the high queue, all Telnet traffic (tcp 23) is assigned to the medium queue, and all HTTP and SMTP traffic is assigned to the low queue. All other unspecified traffic is assigned to the normal queue by default.
priority-list 2 protocol ip high list 1 priority-list 2 protocol ip medium tcp 23 priority-list 2 protocol ip low tcp 80 priority-list 2 protocol ip low tcp 25 access-list 1 permit 67.2.21.5 0.0.0.0 interface serial 8/1 priority-group 2