LibreQoE / LibreQoS

A Quality of Experience and Smart Queue Management system for ISPs. Leverage CAKE to improve network responsiveness, enforce bandwidth plans, and reduce bufferbloat.
https://libreqos.io/
GNU General Public License v2.0
464 stars 50 forks source link

Traffic not shaping #339

Closed felixkinaro closed 1 year ago

felixkinaro commented 1 year ago

Hello, we have a deployment setup done and traffic is going through the interfaces. We have gone over the config but traffic is still not shaping, although we are not getting any errors. We have 1 site in the network.json file. DL and UL statistics do not show up under tree. The site has one child site with multiple access points. For the child site and access points we are only getting the RTT latency stats. The attached clients show only the DL limit while UL limit reads NaN

image

image

Server setup:

CPU: 16 core Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz NIC 1 and 2: NetXtreme BCM5720 Gigabit Ethernet PCIe

ispConfig.py:

# 'fq_codel' or 'cake diffserv4'
 #sqm = 'fq_codel'
 sqm = 'cake diffserv4'

 # Used to passively monitor the network for before / after comparisons. Leave as False to
 # ensure actual shaping. After changing this value, run "sudo systemctl restart LibreQoS.service"
 monitorOnlyMode = False

 # How many Mbps are available to the edge of this network
 upstreamBandwidthCapacityDownloadMbps = 40000
 upstreamBandwidthCapacityUploadMbps = 40000

 # Devices in ShapedDevices.csv without a defined ParentNode will be placed under a generated
 # parent node, evenly spread out across CPU cores. Here, define the bandwidth limit for each
 # of those generated parent nodes.
 generatedPNDownloadMbps = 10000
 generatedPNUploadMbps = 10000

 # Interface connected to core router
 interfaceA = 'enp65s0f0'

 # Interface connected to edge router
 interfaceB = 'enp65s0f1'

 ## WORK IN PROGRESS. Note that interfaceA determines the "stick" interface
 ## I could only get scanning to work if I issued ethtool -K enp1s0f1 rxvlan off
 OnAStick = False
 # VLAN facing the core router
 #StickVlanA = 0
 # VLAN facing the edge router
 #StickVlanB = 0

 # Allow shell commands. False causes commands print to console only without being executed.
 # MUST BE ENABLED FOR PROGRAM TO FUNCTION
 enableActualShellCommands = True

 # Add 'sudo' before execution of any shell commands. May be required depending on distribution and environment.
 runShellCommandsAsSudo = False

 # Allows overriding queues / CPU cores used. When set to 0, the max possible queues / CPU cores are utilized. Please leave as 0.
 queuesAvailableOverride = 0

 # Some networks are flat - where there are no Parent Nodes defined in ShapedDevices.csv
 # For such flat networks, just define network.json as {} and enable this setting
 # By default, it balances the subscribers across CPU cores, factoring in their max bandwidth rates
 # Past 25,000 subsribers this algorithm becomes inefficient and is not advised
 useBinPackingToBalanceCPU = True

 # NMS/CRM Integration

# If a device shows a WAN IP within these subnets, assume they are behind NAT / un-shapable, and ignore them
 ignoreSubnets = ['10.202.240.0/20']
 allowedSubnets = ['0.0.0.0/0']

 # UISP integration
 automaticImportUISP = False
 uispAuthToken = ''
 # Everything before /nms/ on your UISP instance
 #UISPbaseURL = 'https://examplesite.com'
 # UISP Site - enter the name of the root site in your network tree
 # to act as the starting point for the tree mapping
 uispSite = ''
 # Strategy:
 # * "flat" - create all client sites directly off the top of the tree,
 #   provides maximum performance - at the expense of not offering AP,
 #   or site options.
 # * "full" - build a complete network map
 uispStrategy = "full"
 # List any sites that should not be included, with each site name surrounded by '' and seperated by commas
 excludeSites = []
 # If you use IPv6, this can be used to find associated IPv6 prefixes for your clients' IPv4 addresses, and match them to those devices
 findIPv6usingMikrotik = False
 # If you want to provide a safe cushion for speed test results to prevent customer complains, you can set this to 1.15 (15% above plan rate).
 # If not, you can leave as 1.0
 bandwidthOverheadFactor = 1.0
trendal commented 1 year ago

I had an issue on a development branch last night where it looked correct, traffic was flowing through the box, but there was nothing being reported in the gui. Restarting lqosd fixed it. I had been manipulating the network.json file. After a restart everything was stable, even after I continued editing the network file more.

rchac commented 1 year ago

Please try sudo systemctl restart lqosd sudo systemctl stop lqos_scheduler sudo python3 LibreQoS.py It should show if there was an error applying the network.json or ShapedDevices.csv. Once thats resolved you can start lqos_scheduler again.

felixkinaro commented 1 year ago

@rchac I have done this. Running shell sudo python3 LibreQoS.py did not return any error

image

rchac commented 1 year ago

Have you tried switching interfaceA and interfaceB values in ispconfig.py, then running reload?

dtaht commented 1 year ago

@felixkinaro - is this still an issue? If so, please join us in the #libreqos:matrix.org chat.

dtaht commented 1 year ago

It appears that the principal ip address was being natted.