diff --git a/docs/v2.0/design.md b/docs/v2.0/design.md index c215ddf6..0790b13a 100644 --- a/docs/v2.0/design.md +++ b/docs/v2.0/design.md @@ -1,54 +1,40 @@ -# Network Design Assumptions +# Deployment Scenarios -## Officially supported configuration +## Standard Inline Deployment -- LibreQoS is placed inline at the edge of your network, usually between the network's border router (NAT, firewall) and the core distribution router / switch. +LibreQoS is placed inline at the edge of your network, usually between the network's border router (NAT, firewall) and the core distribution router / switch. -![Offical Configuration](https://github.com/user-attachments/assets/e5914a58-3ec6-4eb1-b016-8a57582dd082) - -### Primary and Backup Paths - -We recommend using dynamic routing protocols such as OSPF to create a high cost and low cost path between the edge router and core distribution router/switch. The low cost path should pass "through" the LibreQoS shaper bridge interfaces to allow LibreQoS to observe and shape traffic. For example, a low cost OSPF path may be set to a value of 1. The high-cost (backup) link would completely bypass LibreQoS, being set to a higher cost (perhaps 100 for OSPF) to ensure that traffic only takes that path when the LibreQoS shaper bridge is not operational. - -### NAT/CG-NAT +#### NAT/CG-NAT If you use NAT/CG-NAT, please place LibreQoS inline prior to where NAT is applied, as LibreQoS needs to shape pre-NAT addresses (100.64.0.0/12) not public post-NAT IPs. -### MPLS/VPLS +#### MPLS/VPLS LibreQoS can parse MPLS traffic, however the traffic must follow the standard pattern: ``` (mpls tags)(optional vlan tags)(ip header) ``` If you use MPLS with a different tag pattern, you would ideally want to terminate MPLS traffic at the core distribution router / switch, before it reaches LibreQoS. -## Testbed configuration -When you are first testing out LibreQoS, we recommend deploying a small-scale testbed to see it in action. -![image](https://github.com/user-attachments/assets/6174bd29-112d-4b00-bea8-41314983d37a) +#### Dynamic Routing: Bypass path +- Primary path (low cost) *through* the server running LibreQoS +- Backup path (high cost) *bypassing* the server running LibreQoS. -### Network Interface Card +#### Diagram +![Offical Configuration](https://github.com/user-attachments/assets/e5914a58-3ec6-4eb1-b016-8a57582dd082) -```{note} -You must have one of these: -- single NIC with two interfaces, -- two NICs with single interface, -- 2x VLANs interface (using one or two NICs). -``` +### Option 1: Using Dynamic Routing (Strongly Recommended) -LibreQoS requires NICs to have 2 or more RX/TX queues and XDP support. While many cards theoretically meet these requirements, less commonly used cards tend to have unreported driver bugs which impede XDP functionality and make them unusable for our purposes. At this time we recommend the Intel x520, Intel x710, and Nvidia (ConnectX-5 or newer) NICs. We cannot guarantee compatibility with other cards. +We recommend using dynamic routing protocols such as OSPF to create a high cost and low cost path between the edge router and core distribution router/switch. The low cost path should pass "through" the LibreQoS shaper bridge interfaces to allow LibreQoS to observe and shape traffic. For example, a low cost OSPF path may be set to a value of 1. The high-cost (backup) link would completely bypass LibreQoS, being set to a higher cost (perhaps 100 for OSPF) to ensure that traffic only takes that path when the LibreQoS shaper bridge is not operational. -## Alternate configuration +### Option 2: Using Spanning Tree Protocol (Not Recommended) -This alternate configuration uses Spanning Tree Protocol (STP) to modify the data path in the event the LibreQoS device is offline for maintenance or another problem. +You can also use the Spanning Tree Protocol with path costs if OSPF or another dynamic routing protocol is not an option. ```{note} Most of the same considerations apply to the alternate configuration as they do to the officially supported configuation ``` -- LibreQoS is placed inline at the edge of your network, usually between the network's border router (NAT, firewall) and the core distribution router / switch. -- If you use NAT/CG-NAT, place LibreQoS inline prior to where NAT is applied, as LibreQoS needs to shape pre-NAT addresses (100.64.0.0/12) not public post-NAT IPs. -- For networks using MPLS: LibreQoS can parse MPLS traffic, but the traffic must follow the standard pattern (mpls tags)(optional vlan tags)(ip header). If you use MPLS with a different pattern, you would ideally want to terminate MPLS traffic at the core distribution router / switch, before it reaches LibreQoS. -- Spanning Tree primary link (low cost) through the server running LibreQoS -- Spanning Tree backup link (high cost, maybe 80 for example) - Keep in mind that if you use different bandwidth links, for example, 10 Gbps through LibreQoS, and 1 Gbps between core switch and edge router, you may need to be more intentional with your STP costs. -![image](https://github.com/user-attachments/assets/39247655-3bcf-4a0c-8cfb-1ed1a96d3c2d) +## Testbed Deployment (Optional) +When you are first testing out LibreQoS, you can deploy a small-scale testbed to see it in action on a test network. +![image](https://github.com/user-attachments/assets/6174bd29-112d-4b00-bea8-41314983d37a) -- knotmirror 0.0.1 From 40cb595e873d8085da9d6a9f6d53c1f17e17ec37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Chac=C3=B3n?= Date: Thu, 6 Nov 2025 16:31:13 -0700 Subject: [PATCH 2/3] Update configuration.md --- docs/v2.0/configuration.md | 87 ++++++++++++++++++++++++++++++++------ 1 file changed, 75 insertions(+), 12 deletions(-) diff --git a/docs/v2.0/configuration.md b/docs/v2.0/configuration.md index bc29b5fe..958458ad 100644 --- a/docs/v2.0/configuration.md +++ b/docs/v2.0/configuration.md @@ -1,7 +1,70 @@ # Configure LibreQoS -## Main Configuration File -### /etc/lqos.conf +## Initial Configuration Via Setup Tool (From the .deb installer) +setup_tool + +NOTES: +- The LibreQoS Setup Tool can only be controlled with a keyboard. Use the arrows to move around the tool, and click ```Enter``` to Select. +- Clicking the ```Q``` key will close the setup tool without saving. +- If you are in the process of using the setup tool and it closes beforehand, in order to launch again the setup tool you will have to run the following commands: + ``` + sudo apt remove libreqos + sudo apt install ./{deb_url_v1_5} + ``` + +The first step is to give a name to your Shaper Box (Node), by default it is named LibreQoS. +Then, you can use the arrow keys on your keyboard to go over the different setup sections, as follows: + +### Bridge Mode +bridge_mode + +By default, the Linux Bridge is selected. If you chose the XDP Bridge in previous step, please make the adjustment. + +NOTE: Single Interface mode, as it name implies, its for users that can only use 1 interface, and require special support. For more information regarding Single Interface mode, please vistit our [Zulip Chat]. + +### Interfaces +interfaces + +Following the recommended setup diagram mentioned above, the "To Internet" interface should be the one facing the Edge Router (and therefore, the Internet) and the "To Network" interface should be the one facing the Core Router. + +### Bandwidth +bandwidth + +In the context of bandwidth hired from your upstream provider, ```To Internet``` means the Upload Bandwidth, and ```To Network``` means the download bandwidth. + +### IP Range +ip_ranges + +In this section, you should specify all the ip ranges utilized by your customers' routers, including ranges for static IPs. By default, we include 4 common IP Ranges, as seen in the image above. + +*Tip: In this section, in order to remove an IP range, you have to highlight the IP range with the keyboard arrows, and then click the ```Tab``` key until `````` is highlighted, then click ```Enter```. + +### Web Users +web_users + +In this section, you can create users to access the LibreQoS Web Dashboard, with their respective roles. There's 2 different types of roles: ```Admin``` and ```Read Only```. +*** +After clicking on save file, you may see the following message on the terminal +``` +No VM guests are running outdated hypervisor (qemu) binaries on this host. +N: Download is performed unsandboxed as root as file '/home/libreqos/libreqos_1.5-RC2.202510052233-1_amd64.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied) +``` +This error is benign and does not reflect any issues. Please disregard it. + +### Next Steps + +Next, you will want to configure your [CRM or NMS integration](integrations.md) using the Web Interface Configuration page. If you do not use a supported CRM/NMS, you will need to create a script or process to produce the needed files for LibreQoS to shape traffic - specifically network.json and ShapedDevices.csv. The format of these files are explained in further detail in later sections of this page. + +## Configuration Via Web Interface + +Most LibreQoS shaper settings can be modified via the Configuration page on the WebUI (http://your_shaper_ip:9123/config_general.html). + +## Configuration via Command Line + +You can also modify settings using the command line. + +### Main Configuration File +#### /etc/lqos.conf The configuration for each LibreQoS shaper box is stored in the file `/etc/lqos.conf`. @@ -25,7 +88,7 @@ Note: If you find that traffic is not being shaped when it should, please make s After changing any part of `/etc/lqos.conf` it is highly recommended to always restart lqosd, using `sudo systemctl restart lqosd`. This re-parses any new values in lqos.conf, making those new values accessible to both the Rust and Python sides of the code. -### Netflow (optional) +#### Netflow (optional) To enable netflow, add the following `[flows]` section to the `/etc/lqos.conf` configuration file, setting the appropriate `netflow_ip`: ``` [flows] @@ -37,12 +100,12 @@ netflow_version = 5 do_not_track_subnets = ["192.168.0.0/16"] ``` -### CRM/NMS Integrations +#### CRM/NMS Integrations Learn more about [configuring integrations here](integrations.md). -## Network Hierarchy -### Network.json +### Network Hierarchy +#### Network.json Network.json allows ISP operators to define a Hierarchical Network Topology, or Flat Network Topology. @@ -58,7 +121,7 @@ For networks with no Parent Nodes (no strictly defined Access Points or Sites) e echo "{}" > network.json ``` -#### CSV to JSON conversion helper +##### CSV to JSON conversion helper You can use @@ -71,7 +134,7 @@ manualNetwork.csv can be copied from the template file, manualNetwork.template.c Note: The parent node name must match that used for clients in ShapedDevices.csv -## Circuits +### Circuits LibreQoS shapes individual devices by their IP addresses, which are grouped into "circuits". @@ -79,7 +142,7 @@ A circuit represents an ISP subscriber's internet service, which may have just o LibreQoS knows how to shape these devices, and what Node (AP, Site, etc) they are contained by, with the ShapedDevices.csv file. -### ShapedDevices.csv +#### ShapedDevices.csv The ShapedDevices.csv file correlates device IP addresses to Circuits (each internet subscriber's unique service). @@ -100,17 +163,17 @@ Here is an example of an entry in the ShapedDevices.csv file: If you are using one of our CRM integrations, this file will be automatically generated. If you are not using an integration, you can manually edit the file using either the WebUI or by directly editing the ShapedDevices.csv file through the CLI. -#### Multiple IPs per Circuit +##### Multiple IPs per Circuit If you need to list multiple IPv4s in the IPv4 field, or multiple IPv6s in the IPv6 field, add a comma between them. If you are editing with a CSV editor (LibreOffice Calc, Excel), the CSV editor will automatically wrap these comma-seperated items with quotes for you. If you are editing the file manually with a utility like notepad or nano, please add quotes surrounding the comma-seperated entries. ``` 2794,"6 Littleton Drive, Ringgold, GA 30736",5,Device 5,AP_11,,100.64.0.5,"fdd7:b724:0:500::/56,fdd7:b724:0:600::/56",1,1,105,18,"" ``` -#### Manual Editing by WebUI +##### Manual Editing by WebUI Navigate to the LibreQoS WebUI (http://a.b.c.d:9123) and select Configuration > Shaped Devices. -#### Manual Editing by CLI +##### Manual Editing by CLI - Modify the ShapedDevices.csv file using your preferred spreadsheet editor (LibreOffice Calc, Excel, etc), following the template file - ShapedDevices.example.csv - Circuit ID is required. The Circuit ID can be a number or string. This field must NOT include any number symbols (#). Every circuit requires a unique CircuitID - they cannot be reused. Here, circuit essentially refers to a customer's service. If a customer has multiple locations on different parts of your network, use a unique CircuitID for each of those locations. -- knotmirror 0.0.1 From 3f59a8701cf9fa9675b8e597a63e99d53ba61113 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Chac=C3=B3n?= Date: Thu, 6 Nov 2025 16:36:17 -0700 Subject: [PATCH 3/3] Update index.rst --- index.rst | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/index.rst b/index.rst index ec761e02..6daa34a2 100644 --- a/index.rst +++ b/index.rst @@ -12,20 +12,30 @@ Welcome to the LibreQoS documentation docs/v2.0/design docs/v2.0/requirements - -.. toctree:: - :maxdepth: 1 - :caption: Deploying LibreQoS (v1.5 to v2.0): - docs/v2.0/prereq docs/v2.0/ubuntu-server docs/v2.0/bridge docs/v2.0/quickstart + +.. toctree:: + :maxdepth: 1 + :caption: Managing LibreQoS (v1.5 to v2.0): + docs/v2.0/configuration - docs/v2.0/components docs/v2.0/integrations + docs/v2.0/components docs/v2.0/update docs/v2.0/troubleshooting + +.. toctree:: + :maxdepth: 1 + :caption: Insight Features + docs/v2.0/api + +.. toctree:: + :maxdepth: 1 + :caption: Misc: + docs/v2.0/cake docs/v2.0/extras