{"id":150,"date":"2018-01-07T16:04:05","date_gmt":"2018-01-07T16:04:05","guid":{"rendered":"https:\/\/www.kuncar.net\/blog\/?p=150"},"modified":"2018-01-07T16:04:05","modified_gmt":"2018-01-07T16:04:05","slug":"qos-on-huawei-equipment-custom-queunig","status":"publish","type":"post","link":"https:\/\/www.kuncar.net\/blog\/2018\/qos-on-huawei-equipment-custom-queunig\/","title":{"rendered":"QoS on Huawei equipment \u2013 Custom Queunig"},"content":{"rendered":"<div class=\"topContent\">\n<p style=\"text-align: justify;\"><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-thumbnail wp-image-149\" src=\"https:\/\/www.kuncar.net\/blog\/wp-content\/uploads\/2018\/01\/logo_huawei-150x150.jpg\" alt=\"\" width=\"150\" height=\"150\" srcset=\"https:\/\/www.kuncar.net\/blog\/wp-content\/uploads\/2018\/01\/logo_huawei-150x150.jpg 150w, https:\/\/www.kuncar.net\/blog\/wp-content\/uploads\/2018\/01\/logo_huawei-300x300.jpg 300w, https:\/\/www.kuncar.net\/blog\/wp-content\/uploads\/2018\/01\/logo_huawei-100x100.jpg 100w, https:\/\/www.kuncar.net\/blog\/wp-content\/uploads\/2018\/01\/logo_huawei.jpg 577w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/>After some time I have finally some energy to publish a bit more of some stuff about Huawei QoS. The following article will be concentrating on Custom Queuing as it is seen on VRP 3.40 on AR series routers (namely AR46 and AR28).<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">The first important thing to know is what the Custom Queuing actually does. CQ is a scheduling mechanism so it is in the center of simple QoS model ( classify &gt; schedule &gt; shape) and as all scheduling mechanisms it solves the maths of how much of what, \u00a0how and when will be dispatched.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">Ok so how the CQ actually works? The mechanism used is round robin with percentage (or as in our case queue byte count which is more precise) with dynamic resource allocation. \u00a0So let say we will have a scenario that we want to divide line bandwidth in 2:4 ratio. If there will be congestion the ratio will be taken in account and limits will be imposed. If there is no congestion and the \u201c4\u2033 queue is not using the whole assigned bandwidth the \u201c2\u2033 queue can occupy more than it\u2019s assigned proportion (i.e. 2,5).<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">The primary goal of this scheduling mechanisms is to redistribute bandwidth equally, but as you can define almost anything you can use it in more flexible manner.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">In the below described scenario we will consider two types of traffic \u2013 voice and data (what is case of most SMB companies).<\/span><\/p>\n<p><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">I. Find traffic of interest<\/span><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">As first step you should define how your traffic of interest will be recognized, I used just IP sources but you are limited just by the possibilities provided by any ACL type available.<\/span><\/p>\n<blockquote>\n<pre><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">#<\/span>\r\n<span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">acl number 3001<\/span>\r\n<span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">rule 5 permit ip source 1.1.1.1 0<\/span>\r\n<span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">acl number 3002<\/span>\r\n<span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">rule 5 permit ip source 2.2.2.2 0<\/span>\r\n\r\n<span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">#<\/span><\/pre>\n<\/blockquote>\n<p><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">II. Create CQ List (CQL)<\/span><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">In the CQL you will define the queues themselves and their behavior. We will use just two parameters which are queue lenhgt and serving. The firs parameter sets maximal length of the queue in the round-robin mechanism, the other defines how many bytes will be served when the queue will be accessed.<\/span><\/p>\n<blockquote>\n<pre><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">#<\/span>\r\n<span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">qos cql 1 queue 1 queue-length 100<\/span>\r\n<span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">qos cql 1 queue 1 serving 2000<\/span>\r\n<span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">qos cql 1 queue 2 queue-length 100<\/span>\r\n<span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">qos cql 1 queue 2 serving 4000<\/span>\r\n<span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">qos cql 1 protocol ip acl 3001 queue 1<\/span>\r\n<span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">qos cql 1 protocol ip acl 3002 queue 2<\/span>\r\n<span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">#<\/span><\/pre>\n<\/blockquote>\n<p><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">Small footnote here \u2013 CQ can be used only on IP or MPLS protocols as it does not recognize anything else. From the test I did it seems that\u00a0 IP over FR worked all right.<\/span><\/p>\n<p><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">IV. assign CQL to an interface<\/span><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">This step is very easy just remember the this should be inbound interface.<\/span><\/p>\n<blockquote>\n<pre><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">#<\/span>\r\n<span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">interface GigabitEthernet0\/0\/0<\/span>\r\n<span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">ip address dhcp-alloc<\/span>\r\n<span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">qos cq cql 1<\/span>\r\n<span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">#<\/span><\/pre>\n<\/blockquote>\n<p><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">V. shape outbound interface (optional)<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">As you might be in need of shaping (i.e. you use some reserved bandwidth for other purposes). You might need the shaper in place as otherwise the CQ will allow use of all available bandwidth. In my case I just needed a general traffic shaper. As the shaper below is rather non-intelligent you might want to do this in more granular fashion (i.e. create separate \u201cshaping\u201d QoS policy with another set of rules etc.)<\/span><\/p>\n<blockquote>\n<pre><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">#<\/span>\r\n<span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">interface GigabitEthernet0\/0\/0.1<\/span>\r\n<span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">ip address 192.168.1.2 255.255.255.252<\/span>\r\n<span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">qos gts acl 3001 cir 500000 cbs 250000 ebs 0 queue-length 50<\/span>\r\n<span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">#<\/span><\/pre>\n<\/blockquote>\n<p style=\"text-align: justify;\"><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">This config actually shapes the traffic matching ACL 3001 to 0.5mbps<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">And that is the whole thing. This is a very basic setup so you might want to tweak this as the shaping (and some other things) is bit bulky.<\/span><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>After some time I have finally some energy to publish a bit more of some stuff about Huawei QoS. The following article will be concentrating on Custom Queuing as it is seen on VRP 3.40 on AR series routers (namely AR46 and AR28). The first important thing to know is what the Custom Queuing actually &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.kuncar.net\/blog\/2018\/qos-on-huawei-equipment-custom-queunig\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;QoS on Huawei equipment \u2013 Custom Queunig&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,5,13],"tags":[],"class_list":["post-150","post","type-post","status-publish","format-standard","hentry","category-huawei","category-networks","category-recovered"],"_links":{"self":[{"href":"https:\/\/www.kuncar.net\/blog\/wp-json\/wp\/v2\/posts\/150","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kuncar.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kuncar.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kuncar.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kuncar.net\/blog\/wp-json\/wp\/v2\/comments?post=150"}],"version-history":[{"count":1,"href":"https:\/\/www.kuncar.net\/blog\/wp-json\/wp\/v2\/posts\/150\/revisions"}],"predecessor-version":[{"id":151,"href":"https:\/\/www.kuncar.net\/blog\/wp-json\/wp\/v2\/posts\/150\/revisions\/151"}],"wp:attachment":[{"href":"https:\/\/www.kuncar.net\/blog\/wp-json\/wp\/v2\/media?parent=150"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kuncar.net\/blog\/wp-json\/wp\/v2\/categories?post=150"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kuncar.net\/blog\/wp-json\/wp\/v2\/tags?post=150"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}