Router Output Queue

Output Queue

For the egress queue, router interface uses two queues. The first queue is, like Input queue, Output queue is a software queue. The default queuing mechanism is FIFO and it can be change to WFQ or CBWFQ. The default value for this queue is 40 packets.

Rack1R1#sh int e0/0 | i queue
  Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
  Output queue: 0/40 (size/max)
  
Rack1R1#    sh int e0/0 | i Queueing
  Queueing strategy: fifo


Using WFQ on Output Queue

Weighted Fair Queueing (WFQ) is flow-based queueing mechanism. A traffic “flow” (or conversation) is a unidirectional sequence of packets, defined based on the protocol type, source/destination IP addresses, source/destination ports numbers (when available), and partially on the IPv4 ToS byte value. 1 Telnet session is considered 1 flow while another HTTP session from particular source/destination is another flow. Non-Adaptive flow may defeat the bandwidth sharing logic of WFQ by claiming all available buffer space by creating more flows and starving other flows.

W for Weighted uses IP PREC (IPP). Higher IPP value will get lower/lighter weight => bigger bandwidth share.

Once the packets queued accordingly, it will use VIRTUAL SCHEDULING TIME to get the packet out of the Q. The Q with lowest VST will get the packet out first. Once the packet is out, the VST will recalculate the value and pick another queue or the same queue to get the packet out.

Each Q has limit and configurable via Congestive Discard Threshold (CDT) value. If a queue reaches CDT value, router starts dropping packets from the Q with MAX VST value and necessarily the Q that reaches the threshold. Similar to RED.

R1#sh int f0/0 | i Queueing
  Queueing strategy: fifo

R1(config-if)#int f0/0
 fair-queue 16 128 8 ! 16=CDT; 128=Flows; 8=RSVP
 
R1(config-if)#do sh int f0/0 | i Queueing
  Queueing strategy: weighted fair

Comparison

FIFO

sh int f0/0
  Queueing strategy: fifo
  Output queue: 0/40 (size/max)

NOTE. 40=HOLD-Q OUT

WFQ

sh int f0/0
  Queueing strategy: weighted fair
  Output queue: 0/1000/64/0 (size/max total/threshold/drops)
     Conversations  0/0/256 (active/max active/max total)
     Reserved Conversations 0/0 (allocated/max allocated)
     Available Bandwidth 7500 kilobits/sec 

NOTE.
Output queue … 64=threshold or CDT
Conversations … 256=max total or FLOWS
Available B/W … 7500 Kbps = 75% of 10000 Kbps

R1(config-if)#fair-queue 16 128 8
R1(config-if)#^Z
R1#sh int f0/0 | b Queueing
  Queueing strategy: weighted fair
  Output queue: 0/1000/16/0 (size/max total/threshold/drops)
     Conversations  0/0/128 (active/max active/max total)
     Reserved Conversations 0/0 (allocated/max allocated)
     Available Bandwidth 7500 kilobits/sec
R1#sh queueing fair int f0/0 ! if no WFQ used, this command won't work.
Current fair queue configuration:

  Interface           Discard    Dynamic  Reserved  Link    Priority
                      threshold  queues   queues    queues  queues
  FastEthernet0/0     16         128      8         8       1
  Serial0/0           64         256      0         8       1
  Serial0/1           64         256      0         8       1

R1(config)#int f0/0
R1(config-if)# fair-queue
R1#sh queueing interface f0/0
Interface FastEthernet0/0 queueing strategy: fair
  Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
  Queueing strategy: weighted fair
  Output queue: 0/1000/64/0 (size/max total/threshold/drops)
     Conversations  0/0/256 (active/max active/max total)
     Reserved Conversations 0/0 (allocated/max allocated)
     Available Bandwidth 7500 kilobits/sec


R1(config)#int f0/0
R1(config-if)#no fair
R1#sh queueing interface f0/0
Interface FastEthernet0/0 queueing strategy: none

The number of Reserved Queues is the number of flow-queues available to RSVP reservations (if any). These flows have a very small weight value, and thus are preferred above any other flows except Link queues.

Link Queues are the queues for routing protocol traffic and layer 2. It has highest preference above any other queues.

Weight rank

Qs (based on IPP) ! WORST
Reserved Qs       !
Link Qs           ! BEST

Finally, note that the interface bandwidth setting does not influence the WFQ algorithm directly. It only prompts the WFQ command to pick up optimal parameters matching the interface bandwidth. The bandwidth, however, is used for admission control with RSVP flows.

TX-Ring

TX-Ring is a hardware output queue. FIFO is the only queuing mechanism for this queue. Anything sent to this queue is a result of final send from software Output queue. This queue sits right after the software Output queue

Egress Queue ===>
+--------------+---------------+
| Output Queue | TX-Ring Queue |
+--------------+---------------+

If TX-ring value is full, then there no choice but to engage 1st queue queueing mechanism. Setting the TX-ring minimum will quickly engage the the 1st queue mechanism.

Leave a Reply