QoS default class cannot get the correct default bandwidth auto (the same with percent 50%)
When bandwidth is not set for the class, it uses the default value auto, but tc class can not calculate it correctly and uses rate rate -1000000
Initial configuration:
set qos interface eth0 egress 'test' set qos policy shaper test bandwidth '330mbit' set qos policy shaper test class 23 match 10 ip destination address '192.168.122.11' set qos policy shaper test default bandwidth '300mbit' set qos policy shaper test default queue-type 'fair-queue'
optional:
set qos policy shaper test class 23 bandwidth 50%
Debug:
DEBUG/QoS: tc qdisc replace dev eth0 root handle 1: htb r2q 206 default 18 DEBUG/QoS: tc class replace dev eth0 parent 1: classid 1:1 htb rate 330000000 WARNING: Interface speed cannot be determined (assuming 10 Mbit/s) DEBUG/QoS: tc class replace dev eth0 parent 1:1 classid 1:17 htb rate -1000000 burst 15k quantum 1514 DEBUG/QoS: tc qdisc replace dev eth0 parent 1:17 sfq {'bandwidth': '330mbit', 'class': {'23': {'bandwidth': 'auto', 'burst': '15k', 'codel_quantum': '1514', 'flows': '1024', 'interval': '100', 'match': {'10': {'ip': {'destination': {'address': '192.168.122.11'}}}}, 'queue_type': 'fq-codel', 'target': '5'}}, 'default': {'bandwidth': '300mbit', 'burst': '15k', 'codel_quantum': '1514', 'flows': '1024', 'interval': '100', 'priority': '20', 'queue_type': 'fair-queue', 'target': '5'}}
Speed
vyos@r14# sudo cat /sys/class/net/eth0/speed -1 [edit] vyos@r14#