In this section I discuss Waighted Fair Queueing (WFQ) and before starting I would like to define the terminology.



Flow:A flow is a sequence of packets with a particular protocol type (e.g. TCP), source IP address and port (R1’s Lopback 0, port 55656), destination IP address and port (R4’s Loopback 0, port 110) and ToS value.



ToS Bits: 3 Bits in the IEEE Ethernet frame that define a value between 0-7 and we can use it to define the importance of that data frame.



Adaptive Flow: A flow that slows down when drop rate for that flow increases. This process uses multiple operators and I will discuss it later.

We call it Weighted because it checks the flow weight (read it importance!). We call it Fair because it tries to allocate a portion of the bandwidth to this flow and it tries to use the ratio that you have defined but in the mean time it tries to be fair.

Basically we focus on some important flows and allocate them a portion of the available bandwidth and then the rest of the bandwidth will be shared between other flows. Sometimes a flow has less traffic or no traffic and its portion is not used so we can distribute that portion between other flows (equally).

The result is: we allocate a portion of the bandwidth but a flow may receive more bandwidth when possible.

How weight is calculated?

The formula is WEIGHT = 32384 / (IPP + 1) Where IPP is the IP Precedence value (ToS Value). So with an IPP of 4 the weight is gonna be 8096 or with an IPP of 2 the weight is gonna be 16192.

Th following table lists the precedence values and common names plus the bit valus (although not important)

IP precedence values and common names Precedence name Value Relative share of bandwidth Bit Value Routine 0 1 000 Priority 1 2 001 Immediate 2 3 010 Flash 3 4 011 Flash Override 4 5 100 Critical 5 6 101 Internetwork Control 6 7 110 Network Control 7 8 111

How to configure?

Use fair-queue command ro configure WFQ. It is enabled by default on any interface which operates slower than 2Mb/s.

You may use three optional values (although not recommended):

Congestive Discard Threshold that tells the interface to start discarding packets if there are more than this number in the queue. The default is 64.

that tells the interface to start discarding packets if there are more than this number in the queue. The default is 64. Number Dynamic Conversation Queues that is a multiple of 16 (4096 max). The default s 256.

that is a multiple of 16 (4096 max). The default s 256. Number Reservable Conversation Queues that is the number of queues that router will reserve for RSVP

There are more to discuss on the theories behind WFQ and I prefer to be concise on this unless you want me to go to the details.

receive information about my video tutorials, you may join my Facebook Page or check my tutorials on Udemy Website!