LibreQoS/_readthedocs/html/docs/Quickstart/configuration.html
2023-05-19 14:17:54 -06:00

246 lines
16 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Configure LibreQoS &mdash; LibreQoE documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<!--[if lt IE 9]>
<script src="../../_static/js/html5shiv.min.js"></script>
<![endif]-->
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js"></script>
<script src="../../_static/doctools.js"></script>
<script src="../../_static/sphinx_highlight.js"></script>
<script src="../../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="LibreQoS daemons" href="services-and-run.html" />
<link rel="prev" title="Install LibreQoS 1.4" href="quickstart-libreqos-1.4.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../index.html" class="icon icon-home">
LibreQoE
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Readme:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../README.html">Sponsors</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../README.html#support-libreqos">Support LibreQoS</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../README.html#documentation">Documentation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../README.html#matrix-chat">Matrix Chat</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../README.html#features">Features</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Read me first!</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="networkdesignassumptions.html">Network Design Assumptions</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Change Notes:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../ChangeNotes/v1.4.html">LibreQoS v1.3.1 to v1.4 Change Summary</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Quickstart:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../SystemRequirements/Compute.html">System Requirements</a></li>
<li class="toctree-l1"><a class="reference internal" href="../SystemRequirements/Networking.html">Network Interface Requirements</a></li>
<li class="toctree-l1"><a class="reference internal" href="quickstart-prereq.html">Server Setup - Pre-requisites</a></li>
<li class="toctree-l1"><a class="reference internal" href="quickstart-libreqos-1.4.html">Install LibreQoS 1.4</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Configure LibreQoS</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#configure-lqos-conf">Configure lqos.conf</a></li>
<li class="toctree-l2"><a class="reference internal" href="#configure-ispconfig-py">Configure ispConfig.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="#network-json">Network.json</a></li>
<li class="toctree-l2"><a class="reference internal" href="#manual-setup">Manual Setup</a></li>
<li class="toctree-l2"><a class="reference internal" href="#shapeddevices-csv">ShapedDevices.csv</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#manual-editing">Manual Editing</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="services-and-run.html">LibreQoS daemons</a></li>
<li class="toctree-l1"><a class="reference internal" href="share.html">Share your before and after</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Updates:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Updates/update.html">Updating 1.4 To Latest Version</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Technical Documentation:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../TechnicalDocs/complex-install.html">Complex install (Not Recommended)</a></li>
<li class="toctree-l1"><a class="reference internal" href="../TechnicalDocs/troubleshooting.html">Troubleshooting</a></li>
<li class="toctree-l1"><a class="reference internal" href="../TechnicalDocs/integrations.html">Integrations</a></li>
<li class="toctree-l1"><a class="reference internal" href="../TechnicalDocs/extras.html">Extras</a></li>
<li class="toctree-l1"><a class="reference internal" href="../TechnicalDocs/performance-tuning.html">Performance Tuning</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Legacy:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Legacy/v1.3.1.html">LibreQoS v1.3.1</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../index.html">LibreQoE</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item active">Configure LibreQoS</li>
<li class="wy-breadcrumbs-aside">
<a href="../../_sources/docs/Quickstart/configuration.md.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<section id="configure-libreqos">
<h1>Configure LibreQoS<a class="headerlink" href="#configure-libreqos" title="Permalink to this heading"></a></h1>
<section id="configure-lqos-conf">
<h2>Configure lqos.conf<a class="headerlink" href="#configure-lqos-conf" title="Permalink to this heading"></a></h2>
<p>Copy the lqosd daemon configuration file to <code class="docutils literal notranslate"><span class="pre">/etc</span></code>:</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span><span class="nb">cd</span><span class="w"> </span>/opt/libreqos/src
sudo<span class="w"> </span>cp<span class="w"> </span>lqos.example<span class="w"> </span>/etc/lqos.conf
</pre></div>
</div>
<p>Now edit the file to match your setup with</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>nano<span class="w"> </span>/etc/lqos.conf
</pre></div>
</div>
<p>Change <code class="docutils literal notranslate"><span class="pre">enp1s0f1</span></code> and <code class="docutils literal notranslate"><span class="pre">enp1s0f2</span></code> to match your network interfaces. It doesnt matter which one is which. Notice, its paring the interfaces, so when you first enter enps0f<ins><strong>1</strong></ins> in the first line, the <code class="docutils literal notranslate"><span class="pre">redirect_to</span></code> parameter is enp1s0f<ins><strong>2</strong></ins> (replacing with your actual interface names).</p>
<ul class="simple">
<li><p>First Line: <code class="docutils literal notranslate"><span class="pre">name</span> <span class="pre">=</span> <span class="pre">&quot;enp1s0f1&quot;,</span> <span class="pre">redirect_to</span> <span class="pre">=</span> <span class="pre">&quot;enp1s0f2&quot;</span></code></p></li>
<li><p>Second Line: <code class="docutils literal notranslate"><span class="pre">name</span> <span class="pre">=</span> <span class="pre">&quot;enp1s0f2&quot;,</span> <span class="pre">redirect_to</span> <span class="pre">=</span> <span class="pre">&quot;enp1s0f1&quot;</span></code></p></li>
</ul>
<p>Then, if using Bifrost/XDP set <code class="docutils literal notranslate"><span class="pre">use_xdp_bridge</span> <span class="pre">=</span> <span class="pre">true</span></code> under that same <code class="docutils literal notranslate"><span class="pre">[bridge]</span></code> section.</p>
</section>
<section id="configure-ispconfig-py">
<h2>Configure ispConfig.py<a class="headerlink" href="#configure-ispconfig-py" title="Permalink to this heading"></a></h2>
<p>Copy ispConfig.example.py to ispConfig.py and edit as needed</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span><span class="nb">cd</span><span class="w"> </span>/opt/libreqos/src/
cp<span class="w"> </span>ispConfig.example.py<span class="w"> </span>ispConfig.py
nano<span class="w"> </span>ispConfig.py
</pre></div>
</div>
<ul class="simple">
<li><p>Set upstreamBandwidthCapacityDownloadMbps and upstreamBandwidthCapacityUploadMbps to match the bandwidth in Mbps of your networks upstream / WAN internet connection. The same can be done for generatedPNDownloadMbps and generatedPNUploadMbps.</p></li>
<li><p>Set interfaceA to the interface facing your core router (or bridged internal network if your network is bridged)</p></li>
<li><p>Set interfaceB to the interface facing your edge router</p></li>
<li><p>Set <code class="docutils literal notranslate"><span class="pre">enableActualShellCommands</span> <span class="pre">=</span> <span class="pre">True</span></code> to allow the program to actually run the commands.</p></li>
</ul>
</section>
<section id="network-json">
<h2>Network.json<a class="headerlink" href="#network-json" title="Permalink to this heading"></a></h2>
<p>Network.json allows ISP operators to define a Hierarchical Network Topology, or Flat Network Topology.</p>
<p>For networks with no Parent Nodes (no strictly defined Access Points or Sites) edit the network.json to use a Flat Network Topology with
<code class="docutils literal notranslate"><span class="pre">nano</span> <span class="pre">network.json</span></code>
setting the following file content:</p>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{}</span>
</pre></div>
</div>
<p>If you plan to use the built-in UISP or Splynx integrations, you do not need to create a network.json file quite yet.</p>
<p>If you plan to use the built-in UISP integration, it will create this automatically on its first run (assuming network.json is not already present). You can then modify the network.json to more accurately reflect your topology.</p>
<p>If you will not be using an integration, you can manually define the network.json following the template file - network.example.json</p>
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>+-----------------------------------------------------------------------+
| Entire Network |
+-----------------------+-----------------------+-----------------------+
| Parent Node A | Parent Node B | Parent Node C |
+-----------------------+-------+-------+-------+-----------------------+
| Parent Node D | Sub 3 | Sub 4 | Sub 5 | Sub 6 | Sub 7 | Parent Node F |
+-------+-------+-------+-------+-------+-------+-------+-------+-------+
| Sub 1 | Sub 2 | | | | Sub 8 | Sub 9 |
+-------+-------+-------+-----------------------+-------+-------+-------+
</pre></div>
</div>
</section>
<section id="manual-setup">
<h2>Manual Setup<a class="headerlink" href="#manual-setup" title="Permalink to this heading"></a></h2>
<p>You can use</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>python3<span class="w"> </span>csvToNetworkJSON.py
</pre></div>
</div>
<p>to convert manualNetwork.csv to a network.json file.
manualNetwork.csv can be copied from the template file, manualNetwork.template.csv</p>
<p>Note: The parent node name must match that used for clients in ShapedDevices.csv</p>
</section>
<section id="shapeddevices-csv">
<h2>ShapedDevices.csv<a class="headerlink" href="#shapeddevices-csv" title="Permalink to this heading"></a></h2>
<p>If you are using an integration, this file will be automatically generated. If you are not using an integration, you can manually edit the file.</p>
<section id="manual-editing">
<h3>Manual Editing<a class="headerlink" href="#manual-editing" title="Permalink to this heading"></a></h3>
<ul class="simple">
<li><p>Modify the ShapedDevices.csv file using your preferred spreadsheet editor (LibreOffice Calc, Excel, etc), following the template file - ShapedDevices.example.csv</p></li>
<li><p>Circuit ID is required. Must be a string of some sort (int is fine, gets parsed as string). Must NOT include any number symbols (#).</p></li>
<li><p>An IPv4 address or IPv6 address is required for each entry.</p></li>
<li><p>The Access Point or Site name should be set in the Parent Node field. Parent Node can be left blank for flat networks.</p></li>
<li><p>The ShapedDevices.csv file allows you to set minimum guaranteed, and maximum allowed bandwidth per subscriber.</p></li>
<li><p>The minimum allowed plan rates for Circuits are 2Mbit. Bandwidth min and max should both be above that threshold.</p></li>
<li><p>Recommendation: set the min bandwidth to something like 25/10 and max to 1.15X advertised plan rate by using bandwidthOverheadFactor = 1.15</p>
<ul>
<li><p>This way, when an AP hits its ceiling, users have any remaining AP capacity fairly distributed between them.</p></li>
<li><p>Ensure a reasonable minimum bandwidth minimum for every subscriber, allowing them to utilize up to the maximum provided when AP utilization is below 100%.</p></li>
</ul>
</li>
</ul>
<p>Note regarding SLAs: For customers with SLA contracts that guarantee them a minimum bandwidth, set their plan rate as the minimum bandwidth. That way when an AP approaches its ceiling, SLA customers will always get that amount.</p>
<p><img alt="image" src="https://user-images.githubusercontent.com/22501920/200134960-28709d0f-48fe-4129-b4fd-70b204cade2c.png" /></p>
<p>Once your configuration is complete. Youre ready to run the application and start the <a class="reference internal" href="services-and-run.html"><span class="std std-doc">Deamons</span></a></p>
</section>
</section>
</section>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="quickstart-libreqos-1.4.html" class="btn btn-neutral float-left" title="Install LibreQoS 1.4" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="services-and-run.html" class="btn btn-neutral float-right" title="LibreQoS daemons" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>&#169; Copyright 2023, LibreQoE.</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>