{"id":571,"date":"2018-10-26T22:15:15","date_gmt":"2018-10-26T22:15:15","guid":{"rendered":"http:\/\/feralpacket.org\/?p=571"},"modified":"2018-10-26T22:15:15","modified_gmt":"2018-10-26T22:15:15","slug":"qos-weighted-fair-queueing-wfq-notes","status":"publish","type":"post","link":"https:\/\/feralpacket.org\/?p=571","title":{"rendered":"QoS Weighted Fair Queueing (WFQ) Notes"},"content":{"rendered":"<p><span style=\"font-weight: bold;\">QoS Weighted Fair Queueing (WFQ)<\/span><\/p>\n<p>\u00a0&#8211; Does not use MQC<\/p>\n<p>\u00a0&#8211; Uses packet flows<\/p>\n<p>\u00a0 \u00a0 \u00a0-&gt; The collection of packets with the same header information<\/p>\n<p>\u00a0 \u00a0 \u00a0-&gt; Source \/ destination IP addresses<\/p>\n<p>\u00a0 \u00a0 \u00a0-&gt; Source \/ destination port numbers<\/p>\n<p>\u00a0 \u00a0 \u00a0-&gt; Protocol<\/p>\n<p>\u00a0 \u00a0 \u00a0-&gt; Precedence value<\/p>\n<p>\u00a0&#8211; Every flow creates a software queue<\/p>\n<p>\u00a0&#8211; Maximum number of queues is 4096<\/p>\n<p>\u00a0&#8211; Flows are treated according to two things<\/p>\n<p>\u00a0 \u00a0 \u00a0-&gt; Precedence<\/p>\n<p>\u00a0 \u00a0 \u00a0-&gt; Packet length<\/p>\n<p>\u00a0&#8211; Higher precedence and smaller packets are preferred over lower precedence and bigger packets<\/p>\n<p>e.g. &#8211;<\/p>\n<p>\u00a0&#8211; Flow1<\/p>\n<p>\u00a0 \u00a0 \u00a0-&gt; src IP &#8211; 10.0.0.1<\/p>\n<p>\u00a0 \u00a0 \u00a0-&gt; dst IP &#8211; 15.0.0.1<\/p>\n<p>\u00a0 \u00a0 \u00a0-&gt; src port &#8211; 4001<\/p>\n<p>\u00a0 \u00a0 \u00a0-&gt; dst port &#8211; 80<\/p>\n<p>\u00a0 \u00a0 \u00a0-&gt; precedence &#8211; 5<\/p>\n<p>\u00a0&#8211; Flow2<\/p>\n<p>\u00a0 \u00a0 \u00a0-&gt; src IP &#8211; 10.0.0.1<\/p>\n<p>\u00a0 \u00a0 \u00a0-&gt; dst IP &#8211; 15.0.0.1<\/p>\n<p>\u00a0 \u00a0 \u00a0-&gt; src port &#8211; 5000<\/p>\n<p>\u00a0 \u00a0 \u00a0-&gt; dst port &#8211; 80<\/p>\n<p>\u00a0 \u00a0 \u00a0-&gt; precendence &#8211; 6<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/feralpacket.org\/wp-content\/uploads\/2018\/10\/0c1aefca7957fb225278e10af0277524.jpeg\" style=\"cursor: default;cursor: default;\" width=\"600\" height=\"\"\/><\/p>\n<p><span style=\"font-weight: bold;\">WFQ Schedular Mechanism<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/feralpacket.org\/wp-content\/uploads\/2018\/10\/0600ba2e8c7df2b7675c22e7c64ada1d.jpeg\" style=\"cursor: default;cursor: default;\" width=\"600\" height=\"\"\/><\/p>\n<p>Sequence Number (SN) (Finish time) = old sequence number + ( packet length * weight )<\/p>\n<p>\u00a0&#8211; Lower is better<\/p>\n<p>Weight = 32384 \/ IPP + 1<\/p>\n<p>Scheduler\u00a0selects the packet with the lowest sequence number among flows<\/p>\n<p>\u00a0&#8211; Within a flow, packets are FIFO<\/p>\n<p>\u00a0&#8211; Between flows, the scheduler selects the next packet based on sequence numbers<\/p>\n<p><span style=\"font-weight: bold;\">Congestive Discard Threshold (CDT)<\/span><\/p>\n<p>\u00a0&#8211; Drop mechanism for WFQ<\/p>\n<p>\u00a0&#8211; If the queue is full and a new packet arrives for the queuethe the sequence number is calculated for the packet and the following happens<\/p>\n<p>\u00a0 \u00a0 \u00a0-&gt; If the SN of the packet is the highest, then the packet is dropped<\/p>\n<p>\u00a0 \u00a0 \u00a0-&gt; If there is another in any queue having a higher SN, then the packet with the higher SN is dropped<\/p>\n<p>CDT value = queue length = 64 by default<\/p>\n<p>Dynamic queues = 256 by default<\/p>\n<p>RSVP queues = 0 by default<\/p>\n<p>\u00a0 \u00a0 \u00a0-&gt; Can be created to provide very low weight reserved queues for RSVP traffic<\/p>\n<p>WFQ Packet Limit = 4096 packets<\/p>\n<p>WFQ is the default for serial interfaces with clock rates lower than 2000kbps<\/p>\n<p>\u00a0&#8211; For other interfaces, FIFO is the default<\/p>\n<p><span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">int fa0\/0<\/span><\/p>\n<p><span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">\u00a0fair-queue [congestive-discard threshold [dynamic-queues [reservable-queues]]]<\/span><\/p>\n<p><span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">hold-queue &lt;number&gt; out<\/span><\/p>\n<p>\u00a0 \u00a0 \u00a0-&gt; Max number of packets that can be held in memory<\/p>\n<p><span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">sh queueing fair<\/span><\/p>\n<p><span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">sh int fa0\/0<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>QoS Weighted Fair Queueing (WFQ)<\/p>\n","protected":false},"author":1,"featured_media":569,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[31,45],"class_list":["post-571","post","type-post","status-publish","format-standard","hentry","category-ccie","tag-published","tag-qos"],"_links":{"self":[{"href":"https:\/\/feralpacket.org\/index.php?rest_route=\/wp\/v2\/posts\/571","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/feralpacket.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/feralpacket.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/feralpacket.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/feralpacket.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=571"}],"version-history":[{"count":1,"href":"https:\/\/feralpacket.org\/index.php?rest_route=\/wp\/v2\/posts\/571\/revisions"}],"predecessor-version":[{"id":610,"href":"https:\/\/feralpacket.org\/index.php?rest_route=\/wp\/v2\/posts\/571\/revisions\/610"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/feralpacket.org\/index.php?rest_route=\/wp\/v2\/media\/569"}],"wp:attachment":[{"href":"https:\/\/feralpacket.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=571"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/feralpacket.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=571"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/feralpacket.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=571"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}