{"id":580,"date":"2010-03-24T13:33:37","date_gmt":"2010-03-24T11:33:37","guid":{"rendered":"http:\/\/brownian.org.ua\/?p=580"},"modified":"2011-07-01T11:16:38","modified_gmt":"2011-07-01T08:16:38","slug":"django-based-htb-shaper-configurator","status":"publish","type":"post","link":"https:\/\/brownian.org.ua\/?p=580","title":{"rendered":"Django-based HTB shaper configurator"},"content":{"rendered":"<p>I&#8217;ve decided to make it available after some nice people asked for this.<\/p>\n<p>Now i have no time and, let&#8217;s say, health to make it better, so please don&#8217;t complain :-)<\/p>\n<p>I guess it maybe would be better to make it available somewhere at code.google.com&#160;&#8212; i would like to work on this code later, surely.<\/p>\n<p>Anyway. Now&#160;&#8212; <a href=\"\/plain\/djshaper-20100324.tar.bz2\">as it now is<\/a>. With incomplete README:<\/p>\n<p><!--more \u00bb \u0427\u0438\u0442\u0430\u0442\u0438 \u0434\u0430\u043b\u0456\u2026 \u00bb--><\/p>\n<pre>Hi.\r\n\r\nSorry, this is a mess.\r\n\r\n\r\nLook at settings.py, of course. And there is one more file,\r\nshap_defaults.py, take a look, make changes.\r\n\r\nThis configurator assumes that you have a linux box with two network\r\ninterfaces connected in a bridge (two-ports Ethernet switch), and you\r\nwish to set up a <a href=\"http:\/\/luxik.cdi.cz\/ devik\/qos\/htb\/\" target=\"_blank\" title=\"HTB Home\"><strong>HTB<\/strong><\/a> shaper on each; and these shapers should be\r\nsymmetrical, one for incoming (destined to your IP(s)) and another for\r\noutgoing (from your IP(s)) traffic.\r\n\r\nThis configurator assumes that you already do have a script, which\r\nshould set up your shaper's \"basement\"&#160;&#8212; root qdisc and root\r\nclass(es). With their leaves (qdiscs and classes) possibly. With&#160;&#8212;\r\nimportant&#160;&#8212; hash tables for all your \/24s.\r\n\r\nAn i assume you can set up django and add this \"project\" to it .)\r\n\r\n\r\nThen you can set up (via django admin interface or using fixtures) your\r\nnetworks, all one by one, as \/24 prefixes (2 for \/23, 4 for \/22 etc..).\r\n\r\nYou can (and should, actually) configure:\r\n  -  \"QoS classes\" (in terms of \"which class should be a parent for this\r\n     client's class\" and \"which part of ceil should be guaranteed\").\r\n  -  contract types (to use identifiers for contracts in a form\r\n     \"&lt;letter_or_some_letters&gt;-&lt;digits&gt;&lt;optional_prefix&gt;\")\r\n  -  ?.. something else?.. Well, i will update this README, i hope.\r\n\r\nYou may configure:\r\n  -  \"own\" client's networks (which, for example, your client announces\r\n     to you via some of dynamic routing protocols, or which are set up\r\n     statically by you own)\r\n  -  network ranges delegations&#160;&#8212; ugly, \"incomplete\" (if smth else may\r\n     be considered as complete)\r\n\r\n\r\n\r\nNow&#160;&#8212; i am really sorry, *really* :-)&#160;&#8212; there is no gettext support,\r\nand there are a lot of comments and remarks in Ukrainian.\r\n\r\nNow there are a lot (no too much though) places with unused code or like\r\nthis&#160;&#8212; *this is a mess*.\r\n\r\nI am not a programmer, at all. I wish _you_ could help me to do this\r\nbetter.)\r\n\r\n\r\n\"AS IS\", surely, and this README&#160;&#8212; \"AS IS\".\r\n\r\nSorry.\r\n\r\n# .-)\r\n# vim: set tw=72:\r\n<\/pre>\n<p>I am not even  sure this can be deployed and used. <em>It works for me<\/em> though, works great. So i hope i will update it to some more usable state.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve decided to make it available after some nice people asked for this. Now i have no time and, let&#8217;s say, health to make it better, so please don&#8217;t complain :-) I guess it maybe would be better to make it available somewhere at code.google.com&#160;&#8212; &hellip; <a href=\"https:\/\/brownian.org.ua\/?p=580\" class=\"more-link\"><span>Continue reading<span class=\"screen-reader-text\">Django-based HTB shaper configurator<\/span><\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[38,54,1,60],"tags":[56,116,26,24,22],"_links":{"self":[{"href":"https:\/\/brownian.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/580"}],"collection":[{"href":"https:\/\/brownian.org.ua\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/brownian.org.ua\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/brownian.org.ua\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/brownian.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=580"}],"version-history":[{"count":0,"href":"https:\/\/brownian.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/580\/revisions"}],"wp:attachment":[{"href":"https:\/\/brownian.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=580"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/brownian.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=580"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/brownian.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=580"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}