Example Customized Qos - Forum.Ipfire.Org 1/13/21, 8:36 PM
Total Page:16
File Type:pdf, Size:1020Kb
Example Customized QoS - forum.ipfire.org 1/13/21, 8:36 PM forum.ipfire.org The old IPFire Forum Archive Search… ! " * Quick links # FAQ $ Login % Home ‹ Index ‹ English Area ‹ IPFire in General Example Customized QoS Post Reply & + , Search this topic… ! " 20 posts 1 2 ' Example Customized QoS / bloater99 . by bloater99 » May 18th, 2015, 7:05 pm Posts: 482 Joined: October 13th, 2014, 3:47 pm Now that I have a well-running QoS system in place for awhile, I am posting my customized QoS in case it can help anyone. I thought of adding it to the wiki, but I don't know if the devs want customized examples or if they prefer examples stick to the default Preset. Some notes: -We have a 10/2 Mbps cable connection. I dropped maximum rates by 5% (9.5/1.9 Mbps) within the classes to help prevent modem bu!ers from bloating. Thanks to N0man for his posts on bu!er bloat. -I had to delete/recreate many of the classes because you cannot edit a Class to change its priority. -When you delete/create Classes, the QoS graph will often break. Don't worry. Give it a minute and refresh the page and it will start working again. -Because the QoS graph uses consistent colors in sequential order, having the outbound and inbound classes line up by class # makes the colors match up in the graphs. Example: Web class is red on both outbound and inbound graphs; Email class is grey in both outbound and inbound graphs. I had to add a class (Ping) to Inbound in order to make this happen. By default, there is one fewer class in inbound than in outbound. -In my network, Web gets higher priority than VPN (the default presets are opposite). -I monitored maximal transfer rates in the Ping, DNS/RTP, and VPN inbound classes for a week and adjusted my guaranteed rates according to the observed maximal rates, so they were guaranteed at least the highest rate I observed. For example, Class 101 never got higher than 70.6 KB/sec (565 kbps) and typically was much lower (about half that) so I guaranteed 500 kbps and capped the Max to 700 kbps. -There is conflicting info about whether mail ports ever use UDP protocol or not, so I just threw UDP equivalents of all rules in to make sure I covered all bases. -Class 111/211 (Misc) consists of layer7 protocols that are discouraged on my network. I am unaware that they are even in use, but I set this class up just to observe if any of these protocols are detected, with intentionally low bandwidth restrictions in case anyone is trying to use them. ATTACHMENTS ipfire.qos-1.pdf (759.89 KiB) Downloaded 3777 times - Re: Example Customized QoS / . by furryfennec » May 23rd, 2015, 7:17 pm Just wanted to say thanks for this! I'm sure it will help folks out trying to understand the basics of QoS in IPFire. Very clear and concise presentation. furryfennec Posts: 6 Joined: September 13th, 2011, 12:54 am Location: Foster Brooks' house - Re: Example Customized QoS / dnl . by dnl » September 18th, 2015, 12:05 pm Posts: 375 Joined: June 28th, 2013, 11:03 am Hey bloater99 thanks for this! I've been investigating QoS for my network but do not seem to have any defaults, despite defaults being mentioned in the wiki page. Would you please be able to post a copy of the text files in the /var/ipfire/qos directory? These files mean that others can copy your configuration without having to enter it all manually: classes subclasses tosconfig portconfig level7config I like how you've aligned all the protocols. If you're comfortable working in a shell, it is easier to fix the order of things directly in the files. Thanks! IPFire 2.x (Latest Update) on x86_64 Intel Bay Trail CPU, 4GiB RAM, RED + GREEN + BLUE + ORANGE - Re: Example Customized QoS / bloater99 . by bloater99 » September 18th, 2015, 1:02 pm Posts: 482 Joined: October 13th, 2014, 3:47 pm dnl, I'll try to get those text files posted today. If not, then early next week. Of course since I posted this, I've tweaked qos a bit more, so my current settings don't match my original post. I do know I removed Class 111/211 because I was getting strange results on the qos graph. I'd get massive, impossible jumps in bandwidth (like 500 MB/sec on a 100Mbit network with 10Mbit internet) that seemed to go away when I removed 111/211. And these bandwidth jumps would only show on the qos graph, not on the network graphs at Status->Network. I also increased the guaranteed bandwidth on some of the lowest set classes to 100kbps because of kernel complaints (HTB: quantum of class 20202 is small. Consider r2q change.) I decided as long as my guaranteed bandwidths for all classes totaled less than my total bandwidth, it wouldn't hurt to bump these up a little bit and stop the kernel complaints. When I get the text files, I'll also post an updated PDF. - Re: Example Customized QoS / bloater99 . by bloater99 » September 18th, 2015, 7:18 pm Posts: 482 Joined: October 13th, 2014, 3:47 pm While going through the text files, I noticed something strange. In the 'settings' file there are two values: DEF_INC_SPD=9000 DEF_OUT_SPD=1800 These values do not match anything I have set through the GUI. I am guessing these are the speeds for class 210/110. But my speeds for these classes are 9500 and 1900. Anyone know what's going on? Rather than attaching text files, I will paste the text here, as I wanted to go through and edit out some private ports. classes imq0;200;1;100;100;;;8;Ping; imq0;202;2;100;1000;;;8;DNS/RTP; imq0;203;3;3000;9500;;;8;Web; imq0;204;4;100;7500;;;2;VPN; imq0;205;5;2000;9500;;;2;Email; imq0;210;6;100;9500;;;0;Default; red0;101;1;500;1000;;;8;Ping; red0;102;2;100;1000;;;8;DNS/RTP; red0;103;3;500;1900;;;8;Web; red0;104;4;500;1900;;;2;VPN; red0;105;5;200;1900;;;2;Email; red0;110;6;100;1900;;;0;Default; subclasses is empty... tosconfig is empty... portconfig 120;red0;udp;;465;;; 120;red0;udp;;587;;; 120;red0;udp;;;;25; 200;imq0;icmp;;;;; 202;imq0;tcp;;53;;; 202;imq0;udp;;53;;; 203;imq0;tcp;;443;;; 203;imq0;tcp;;80;;; 220;imq0;tcp;;110;;; 220;imq0;tcp;;993;;; 220;imq0;tcp;;995;;; 220;imq0;tcp;;;;110; 220;imq0;tcp;;;;993; 220;imq0;tcp;;;;995; 220;imq0;udp;;110;;; 220;imq0;udp;;993;;; 220;imq0;udp;;995;;; 220;imq0;udp;;;;110; 220;imq0;udp;;;;993; 220;imq0;udp;;;;995; 204;imq0;esp;;;;; 204;imq0;tcp;;1194;;; 204;imq0;tcp;;;;1194; 204;imq0;udp;;1194;;; 204;imq0;udp;;;;1194; 204;imq0;udp;;4500;;4500; 204;imq0;udp;;500;;500; 205;imq0;tcp;;110;;; 205;imq0;tcp;;993;;; 205;imq0;tcp;;995;;; 205;imq0;tcp;;;;110; 205;imq0;tcp;;;;993; 205;imq0;tcp;;;;995; 205;imq0;udp;;110;;; 205;imq0;udp;;993;;; 205;imq0;udp;;995;;; 205;imq0;udp;;;;110; 205;imq0;udp;;;;993; 205;imq0;udp;;;;995; level7config 102;red0;dns;;; 102;red0;rtp;;; 102;red0;skypetoskype;;; 103;red0;http;;; 103;red0;ssl;;; 104;red0;rdp;;; 104;red0;ssh;;; 104;red0;vnc;;; 105;red0;imap;;; 105;red0;smtp;;; 202;imq0;dns;;; 202;imq0;rtp;;; 202;imq0;skypetoskype;;; 203;imq0;http;;; 203;imq0;ssl;;; 204;imq0;rdp;;; 204;imq0;ssh;;; 204;imq0;vnc;;; 205;imq0;imap;;; 205;imq0;pop3;;; And lastly, a fresh PDF of the GUI page. ipfire.qos.091815.pdf (486.46 KiB) Downloaded 1136 times - Re: Example Customized QoS / dnl . by dnl » September 19th, 2015, 10:38 am Posts: 375 Joined: June 28th, 2013, 11:03 am Thanks! That's the information I was after! Thank you also for the tip about the kernel error, I'm seeing those also. I also have DEF_INC_SPD and DEF_OUT_SPD defined, and they are both 90% of the value of my Downlink and Uplink speeds. I guess they're calculated, but I'm not sure what the purpose is for. As an aside, I wonder if using level 7 filters is more CPU intensive than just using port filters? - Re: Example Customized QoS / bloater99 . by bloater99 » September 19th, 2015, 9:53 pm Posts: 482 Joined: October 13th, 2014, 3:47 pm Glad I could help! Yes, I noticed those two DEF_ lines were calculated at 90% of bandwidth limit too. I'm not sure what their purpose is either... I've read that level7 filters ARE more cpu intensive, but if they are, it's still low on my network. I rarely see the cpu climb over 10% during the busiest times of day. Cheers! - Wiki update & a home-specific class definition / dnl . by dnl » September 23rd, 2015, 1:43 am Posts: 375 Joined: June 28th, 2013, 11:03 am FYI: I've edited the QoS page in the wiki. It should be still technically accurate, but is now less confusing for a beginner. I removed the unhelpful DSL-specific table. People need to calculate their own bandwidth and not rely on the bandwidth their ISP reports. Can you quickly review the page and let me know if you think anything is incorrect? Also, I've been using your example but changed the order around. Here's a skeleton of the parent classes I'm thinking of switching to for a home connection.