QoS on Luci LeDe


#1

I have a Linksys with Luci connected to the internet provider's router...I would like to make on Linksys router a QoS configuration of this type: assign to each connected device a guaranteed minimum speed and a maximum speed (Mbps)...it's possible from gui?


#2

Yes. Install luci-app-qos.

Not sure this is done by Mbps, though.


#3

I have already configured the SQM QoS to combat bufferbloat and latency, can I enabled also this other qos?


#4

Sqm and qos on the same interface is not going to work well. You could try the new nft-qos package to at least set a per device upper limit.


#5

Only nft-qos package for Bufferbloat and for prioritation devices?


#6

Nah, keep sqm on the wan interface so bufferbloat is dealt with...

P.S.: I tried to quote you sentence and discourse unhelpfully decided that full-quotes are redundant. I am puzzled about the level of hand-holding discourse developers deem necessary and how badly this heuristic works with very short postings....


#7

I cannot find this package...the exact name is nft-qos?


#8

https://github.com/openwrt/packages/tree/master/net/nft-qos
Is the one I am thinking about. It might not be available in the 17.N and the 18.N builds but it should be in master as well as in the 19.N builds.


#9

Can I install this package from telnet?


#10

Well, assuming you have a master snapshot installed the following commends should get you started:

opkg update ; opkg install nft-qos

Technically I believe telnet is not going to work with any recent standard OpenWrt firmware you should use secure shell (ssh), see https://openwrt.org/docs/guide-quick-start/sshadministration for instructions in case you did not simply use "telnet" as short hand for secure shell :wink:


#12

What is a master snapshot? It's a snapshot openwrt firmware?


#13

Have a look at https://openwrt.org/releases/snapshot for what differentiates stable releases from snapshots of the current development tree, aka the master tree.

That said https://downloads.openwrt.org/snapshots/targets/ should lead you to the current snapshot build.

Now, before you go there you might want to optimize your sqm configuration... If you post the output of the following commands I would be happy to comment:
cat /etc/config/sqm
tc -s qdisc


#14

SSH is provided in recent versions OpenWrt, not telnet.


#15

So, what's this nft-qos stuff? How does it differ from the standard qos and sqm scripts?


#16

Command cat /etc/config/sqm:

config queue 'eth1'
        option qdisc_advanced '0'
        option debug_logging '0'
        option verbosity '5'
        option qdisc 'cake'
        option script 'piece_of_cake.qos'
        option linklayer 'ethernet'
        option overhead '8'
        option download '90000'
        option upload '18000'
        option enabled '1'
        option interface 'eth1.2'

Command tc -s qdisc

qdisc noqueue 0: dev lo root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc mq 0: dev eth1 root
 Sent 2050511 bytes 13614 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc fq_codel 0: dev eth1 parent :8 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth1 parent :7 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth1 parent :6 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth1 parent :5 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth1 parent :4 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth1 parent :3 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth1 parent :2 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth1 parent :1 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn
 Sent 2050511 bytes 13614 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc mq 0: dev eth0 root
 Sent 13533090178 bytes 9603767 pkt (dropped 0, overlimits 0 requeues 53)
 backlog 0b 0p requeues 53
qdisc fq_codel 0: dev eth0 parent :8 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth0 parent :7 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth0 parent :6 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth0 parent :5 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth0 parent :4 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth0 parent :3 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth0 parent :2 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth0 parent :1 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn
 Sent 13533090178 bytes 9603767 pkt (dropped 0, overlimits 0 requeues 53)
 backlog 0b 0p requeues 53
  maxpacket 9036 drop_overlimit 0 new_flow_count 14 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc noqueue 0: dev br-lan root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev eth0.1 root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc cake 8010: dev eth1.2 root refcnt 2 bandwidth 18Mbit besteffort triple-isolate nonat nowash no-ack-filter split-gso rtt 100.0ms noatm overhead 8
 Sent 2046574 bytes 13599 pkt (dropped 1, overlimits 2641 requeues 0)
 backlog 0b 0p requeues 0
 memory used: 58208b of 4Mb
 capacity estimate: 18Mbit
 min/max network layer size:           28 /    1492
 min/max overhead-adjusted size:       36 /    1500
 average network hdr offset:           14

                  Tin 0
  thresh         18Mbit
  target          5.0ms
  interval      100.0ms
  pk_delay        430us
  av_delay         37us
  sp_delay          1us
  backlog            0b
  pkts            13600
  bytes         2048080
  way_inds          110
  way_miss          957
  way_cols            0
  drops               1
  marks               0
  ack_drop            0
  sp_flows            1
  bk_flows            1
  un_flows            0
  max_len         13554
  quantum           549

qdisc ingress ffff: dev eth1.2 parent ffff:fff1 ----------------
 Sent 18345081 bytes 19001 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc mq 0: dev wlan1 root
 Sent 6163973054 bytes 4912458 pkt (dropped 0, overlimits 0 requeues 185)
 backlog 0b 0p requeues 185
qdisc fq_codel 0: dev wlan1 parent :4 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev wlan1 parent :3 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn
 Sent 6163881658 bytes 4911995 pkt (dropped 0, overlimits 0 requeues 185)
 backlog 0b 0p requeues 185
  maxpacket 1392 drop_overlimit 0 new_flow_count 4 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev wlan1 parent :2 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev wlan1 parent :1 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn
 Sent 91396 bytes 463 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc cake 8011: dev ifb4eth1.2 root refcnt 2 bandwidth 90Mbit besteffort triple-isolate nonat wash no-ack-filter split-gso rtt 100.0ms noatm overhead 8
 Sent 18754795 bytes 19001 pkt (dropped 0, overlimits 13425 requeues 0)
 backlog 0b 0p requeues 0
 memory used: 141214b of 4500000b
 capacity estimate: 90Mbit
 min/max network layer size:           46 /    1492
 min/max overhead-adjusted size:       54 /    1500
 average network hdr offset:           14

                  Tin 0
  thresh         90Mbit
  target          5.0ms
  interval      100.0ms
  pk_delay         13us
  av_delay          6us
  sp_delay          1us
  backlog            0b
  pkts            19001
  bytes        18754795
  way_inds           46
  way_miss          933
  way_cols            0
  drops               0
  marks               0
  ack_drop            0
  sp_flows            1
  bk_flows            1
  un_flows            0
  max_len          8956
  quantum          1514

Now what do I do? Do I install the firmware snapshot? Can I upgrade directly from openwrt luci?


#17

Thanks, have a look at https://openwrt.org/docs/guide-user/network/traffic-shaping/sqm-details especially the "sing and dance" section.

I can almost guarantee that this is probably too small, what kind of internet link do you use (cable, real fiber, or VDSL)? And what speed is actually provisioned by your ISP?

I believe you should be able to upgrade from the GUI, most likely you should not try to keep your configuration but make a copy of /etc from your router for reference and then after updating to a snapshot manually configure all services again (use the old backup as reference). Keep in mind that snapshots will be updated nightly/rapid and any kernel module will need to exactly match your kernel, so immediately after upgrading install all desired kernel modules as once a new snap shot exists the new kernel-module packages will not be installable onto your older snapshot....


#18

This is a package that uses nftables to bandwidth limit based on IP addresses, or so I believe, I have not tried it myself (as it does not match my use case). Also I have no clue how well it keeps bufferbloat under control for the limited flows.


#19

Fiber FTTC...the speed is 100/20 Mbit/s

Ok :+1:


#20

In other words, VDSL - despite the marketing term, it's just VDSL(2) to the outdoor DSLAM.


#21

Before going off and installing snapshots and configuring nft-qos I encourage you to describe your use-case here a little better. Unless you're selling bandwidth to individual people and therefore need to guarantee each one gets a certain quantity, or you have a situation where you're mitigating denial of service attacks or similar, it seems unlikely that your best scenario is to set up this kind of individual device QoS but rather to enforce some kind of fair sharing across the different devices, which SQM already is capable of.