2020-10-02 10:44:48 -05:00
# LibreQoS
2020-10-02 14:16:30 -05:00
A simple way to shape hundreds of clients and reduce bufferbloat using fq_codel or CAKE. This is alpha software, please do not deploy in production.
2020-10-02 10:55:22 -05:00
2020-10-02 11:29:16 -05:00
## Lab Requirements
2020-10-02 11:33:45 -05:00
* Edge and Core routers with MTU 1500 on links between them
2020-10-02 11:29:16 -05:00
* OSPF primary link (low cost) through the server running LibreQoS
* OSPF backup link recommended
2020-10-02 12:06:06 -05:00
![Diagram ](docs/diagram.png?raw=true "Diagram" )
2020-10-02 11:29:16 -05:00
## Server Requirements
* VM or physical server
2020-10-02 11:35:03 -05:00
* One management network interface
* Two dedicated network interface cards, preferably SFP+ capable
2020-10-02 10:55:22 -05:00
* Python 3
2020-10-02 10:44:48 -05:00
* Recent Linux kernel
2020-10-02 14:16:30 -05:00
* tc (usually pre-installed)
2020-10-02 10:44:48 -05:00
2020-10-02 12:25:11 -05:00
## Server Spec Recommendations
* For up to 1Gbps
* 4+ CPU cores
2020-10-02 16:25:23 -05:00
* 4GB RAM
* 32GB Disk Space
* Passmark score of 13,000 or more (AMD Ryzen 5 2600 or better)
* For up to 2Gbps
* 6+ CPU cores
2020-10-02 12:25:11 -05:00
* 8GB RAM
* 32GB Disk Space
* Passmark score of 17,000 or more (AMD Ryzen 5 3600 or better)
* For up to 5Gbps
* 8+ CPU cores
* 16GB RAM
* 32GB Disk Space
* Passmark score of 23,000 or more (AMD Ryzen 7 3800X or better)
* For up to 10Gbps
* 16+ CPU cores
* 32GB RAM
* 32GB Disk Space
* Passmark score of 38,000 or more (AMD Ryzen 9 3950X or better)
2020-10-02 16:25:23 -05:00
https://www.cpubenchmark.net/high_end_cpus.html
2020-10-02 12:25:11 -05:00
2020-10-02 10:44:48 -05:00
## Features
2020-10-02 10:47:56 -05:00
* fq_codel
2020-10-02 14:16:30 -05:00
* Cake (Common Applications Kept Enhanced) [Experimental]
2020-10-02 10:55:22 -05:00
* HTB (Hierarchy Token Bucket)
* tc filters divided into groups with hashing filters to significantly increase efficiency
2020-10-02 10:44:48 -05:00
2020-10-02 10:59:58 -05:00
## How to use
2020-10-02 11:33:45 -05:00
* Add linux interface bridge br0 to the two dedicated interfaces
2020-10-02 12:15:16 -05:00
* For example on Ubuntu Server 20.04 which uses NetPlan, you would add the following to the .yaml file in /etc/netplan/
2020-10-02 12:13:24 -05:00
```
bridges:
br0:
interfaces:
- eth4
2020-10-02 12:15:16 -05:00
- eth5
2020-10-02 12:13:24 -05:00
```
2020-10-02 10:59:58 -05:00
* Modify setting parameters in LibreQoS.py to suit your environment
* Run:
2020-10-02 12:13:24 -05:00
```
2020-10-02 10:59:58 -05:00
sudo python3 ./LibreQoS.py
2020-10-02 12:13:24 -05:00
```
2020-10-02 10:59:58 -05:00
## Special Thanks
2020-10-02 12:30:32 -05:00
Thank you to the hundreds of contributors to the cake and fq_codel projects. Thank you to Phil Sutter, Bert Hubert, Gregory Maxwell, Remco van Mook, Martijn van Oosterhout, Paul B Schroeder, and Jasper Spaans for contributing to the guides and documentation listed below.
2020-10-02 10:59:58 -05:00
2020-10-02 11:33:45 -05:00
## References
* https://tldp.org/HOWTO/Adv-Routing-HOWTO/lartc.adv-filter.hashing.html
* http://linux-ip.net/gl/tc-filters/tc-filters.html
2020-10-02 10:44:48 -05:00
## License
2020-10-02 11:01:17 -05:00
Copyright (C) 2020 Robert Chacón
2020-10-02 10:44:48 -05:00
LibreQoS is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
2020-10-02 10:48:37 -05:00
LibreQoS is distributed in the hope that it will be useful,
2020-10-02 10:44:48 -05:00
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with LibreQoS. If not, see < http: / / www . gnu . org / licenses / > .