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
445 stars 48 forks source link

I'm getting some errors and shapping is not working #34

Closed marsalans closed 2 years ago

marsalans commented 2 years ago

dmesg

kfdskfodsfsfr32

python3 ./LibreQoS.py

kdo09qweddaasdsa

tc filter delete dev enp5s0f0 Error: Class doesn't support blocks. We have an error talking to the kernel tc filter delete dev enp5s0f0 root Error: Specified class doesn't exist. We have an error talking to the kernel tc qdisc delete dev enp5s0f0 root tc qdisc delete dev enp5s0f0 Error: Failed to find qdisc with specified handle. tc filter delete dev enp5s0f0 Error: Class doesn't support blocks. We have an error talking to the kernel tc filter delete dev enp5s0f0 root Error: Specified class doesn't exist. We have an error talking to the kernel tc qdisc delete dev enp5s0f0 root Error: Cannot delete qdisc with handle of zero. tc qdisc delete dev enp5s0f0 Error: Failed to find qdisc with specified handle. This Network Interface Card has 24 queues avaialble. ./xdp-cpumap-tc/bin/xps_setup.sh -d enp5s0f0 --default --disable ./xdp-cpumap-tc/bin/xps_setup.sh -d enp5s0f0 --default --disable ./xdp-cpumap-tc/src/xdp_iphash_to_cpu --dev enp5s0f0 --lan libbpf: Error loading BTF: Invalid argument(22) libbpf: magic: 0xeb9f version: 1 flags: 0x0 hdr_len: 24 type_off: 0 type_len: 504 str_off: 504 str_len: 1730 btf_total_size: 2258 [1] PTR (anon) type_id=2 [2] STRUCT xdp_md size=24 vlen=6 data type_id=3 bits_offset=0 data_end type_id=3 bits_offset=32 data_meta type_id=3 bits_offset=64 ingress_ifindex type_id=3 bits_offset=96 rx_queue_index type_id=3 bits_offset=128 egress_ifindex type_id=3 bits_offset=160 [3] TYPEDEF __u32 type_id=4 [4] INT unsigned int size=4 bits_offset=0 nr_bits=32 encoding=(none) [5] FUNC_PROTO (anon) return=6 args=(1 ctx) [6] INT int size=4 bits_offset=0 nr_bits=32 encoding=SIGNED [7] FUNC xdp_program type_id=5 [8] STRUCT bpf_map_def size=24 vlen=6 type type_id=4 bits_offset=0 key_size type_id=4 bits_offset=32 value_size type_id=4 bits_offset=64 max_entries type_id=4 bits_offset=96 map_flags type_id=4 bits_offset=128 inner_map_idx type_id=4 bits_offset=160 [9] VAR map_ip_hash type_id=8 linkage=1 [10] VAR map_txq_config type_id=8 linkage=1 [11] VAR map_ifindex_type type_id=8 linkage=1 [12] VAR cpu_map type_id=8 linkage=1 [13] VAR cpus_available type_id=8 linkage=1 [14] INT char size=1 bits_offset=0 nr_bits=8 encoding=SIGNED [15] ARRAY (anon) type_id=14 index_type_id=16 nr_elems=4 [16] INT ARRAY_SIZE_TYPE size=4 bits_offset=0 nr_bits=32 encoding=(none) [17] VAR _license type_id=15 linkage=1 [18] DATASEC license size=0 vlen=1 size == 0

libbpf: Error loading ELF section .BTF: -22. Ignored and continue. TC workaround for mapname: map_ifindex_type map_fd:7

Added CPU:0 queue_size:2048

Added CPU:1 queue_size:2048

Added CPU:2 queue_size:2048

Added CPU:3 queue_size:2048

Added CPU:4 queue_size:2048

Added CPU:5 queue_size:2048

Added CPU:6 queue_size:2048

Added CPU:7 queue_size:2048

Documentation:

XDP: Lookup IPv4 and redirect to CPU hash

This program loads the XDP eBPF program into the kernel.

Use the cmdline tool for add/removing dest IPs to the hash

./xdp-cpumap-tc/src/xdp_iphash_to_cpu --dev enp5s0f0 --wan libbpf: Error loading BTF: Invalid argument(22) libbpf: magic: 0xeb9f version: 1 flags: 0x0 hdr_len: 24 type_off: 0 type_len: 504 str_off: 504 str_len: 1730 btf_total_size: 2258 [1] PTR (anon) type_id=2 [2] STRUCT xdp_md size=24 vlen=6 data type_id=3 bits_offset=0 data_end type_id=3 bits_offset=32 data_meta type_id=3 bits_offset=64 ingress_ifindex type_id=3 bits_offset=96 rx_queue_index type_id=3 bits_offset=128 egress_ifindex type_id=3 bits_offset=160 [3] TYPEDEF __u32 type_id=4 [4] INT unsigned int size=4 bits_offset=0 nr_bits=32 encoding=(none) [5] FUNC_PROTO (anon) return=6 args=(1 ctx) [6] INT int size=4 bits_offset=0 nr_bits=32 encoding=SIGNED [7] FUNC xdp_program type_id=5 [8] STRUCT bpf_map_def size=24 vlen=6 type type_id=4 bits_offset=0 key_size type_id=4 bits_offset=32 value_size type_id=4 bits_offset=64 max_entries type_id=4 bits_offset=96 map_flags type_id=4 bits_offset=128 inner_map_idx type_id=4 bits_offset=160 [9] VAR map_ip_hash type_id=8 linkage=1 [10] VAR map_txq_config type_id=8 linkage=1 [11] VAR map_ifindex_type type_id=8 linkage=1 [12] VAR cpu_map type_id=8 linkage=1 [13] VAR cpus_available type_id=8 linkage=1 [14] INT char size=1 bits_offset=0 nr_bits=8 encoding=SIGNED [15] ARRAY (anon) type_id=14 index_type_id=16 nr_elems=4 [16] INT ARRAY_SIZE_TYPE size=4 bits_offset=0 nr_bits=32 encoding=(none) [17] VAR _license type_id=15 linkage=1 [18] DATASEC license size=0 vlen=1 size == 0

libbpf: Error loading ELF section .BTF: -22. Ignored and continue. TC workaround for mapname: map_ifindex_type map_fd:7

Added CPU:0 queue_size:2048

Added CPU:1 queue_size:2048

Added CPU:2 queue_size:2048

Added CPU:3 queue_size:2048

Added CPU:4 queue_size:2048

Added CPU:5 queue_size:2048

Added CPU:6 queue_size:2048

Added CPU:7 queue_size:2048

Documentation:

XDP: Lookup IPv4 and redirect to CPU hash

This program loads the XDP eBPF program into the kernel.

Use the cmdline tool for add/removing dest IPs to the hash

./xdp-cpumap-tc/src/xdp_iphash_to_cpu_cmdline --clear iphash_modify() IP:10.168.0.100 key:0x6400A80A TC-handle:0x0 key: 0x6400A80A

./xdp-cpumap-tc/src/tc_classify --dev-egress enp5s0f0 TC: Control program for tc_classify_kern.o

Dev:enp5s0f0 -- Loading: TC-clsact egress

./xdp-cpumap-tc/src/tc_classify --dev-egress enp5s0f0 TC: Control program for tc_classify_kern.o

Dev:enp5s0f0 -- Loading: TC-clsact egress

tc qdisc replace dev enp5s0f0 root handle 7FFF: mq tc qdisc add dev enp5s0f0 parent 7FFF:1 handle 1: htb default 2 tc class add dev enp5s0f0 parent 1: classid 1:1 htb rate 1000mbit ceil 1000mbit tc qdisc add dev enp5s0f0 parent 1:1 cake diffserv4 tc class add dev enp5s0f0 parent 1:1 classid 1:2 htb rate 125.0mbit ceil 500mbit prio 5 tc qdisc add dev enp5s0f0 parent 1:2 cake diffserv4 tc qdisc add dev enp5s0f0 parent 7FFF:2 handle 2: htb default 2 tc class add dev enp5s0f0 parent 2: classid 2:1 htb rate 1000mbit ceil 1000mbit tc qdisc add dev enp5s0f0 parent 2:1 cake diffserv4 tc class add dev enp5s0f0 parent 2:1 classid 2:2 htb rate 125.0mbit ceil 500mbit prio 5 tc qdisc add dev enp5s0f0 parent 2:2 cake diffserv4 tc qdisc add dev enp5s0f0 parent 7FFF:3 handle 3: htb default 2 tc class add dev enp5s0f0 parent 3: classid 3:1 htb rate 1000mbit ceil 1000mbit tc qdisc add dev enp5s0f0 parent 3:1 cake diffserv4 tc class add dev enp5s0f0 parent 3:1 classid 3:2 htb rate 125.0mbit ceil 500mbit prio 5 tc qdisc add dev enp5s0f0 parent 3:2 cake diffserv4 tc qdisc add dev enp5s0f0 parent 7FFF:4 handle 4: htb default 2 tc class add dev enp5s0f0 parent 4: classid 4:1 htb rate 1000mbit ceil 1000mbit tc qdisc add dev enp5s0f0 parent 4:1 cake diffserv4 tc class add dev enp5s0f0 parent 4:1 classid 4:2 htb rate 125.0mbit ceil 500mbit prio 5 tc qdisc add dev enp5s0f0 parent 4:2 cake diffserv4 tc qdisc add dev enp5s0f0 parent 7FFF:5 handle 5: htb default 2 tc class add dev enp5s0f0 parent 5: classid 5:1 htb rate 1000mbit ceil 1000mbit tc qdisc add dev enp5s0f0 parent 5:1 cake diffserv4 tc class add dev enp5s0f0 parent 5:1 classid 5:2 htb rate 125.0mbit ceil 500mbit prio 5 tc qdisc add dev enp5s0f0 parent 5:2 cake diffserv4 tc qdisc add dev enp5s0f0 parent 7FFF:6 handle 6: htb default 2 tc class add dev enp5s0f0 parent 6: classid 6:1 htb rate 1000mbit ceil 1000mbit tc qdisc add dev enp5s0f0 parent 6:1 cake diffserv4 tc class add dev enp5s0f0 parent 6:1 classid 6:2 htb rate 125.0mbit ceil 500mbit prio 5 tc qdisc add dev enp5s0f0 parent 6:2 cake diffserv4 tc qdisc add dev enp5s0f0 parent 7FFF:7 handle 7: htb default 2 tc class add dev enp5s0f0 parent 7: classid 7:1 htb rate 1000mbit ceil 1000mbit tc qdisc add dev enp5s0f0 parent 7:1 cake diffserv4 tc class add dev enp5s0f0 parent 7:1 classid 7:2 htb rate 125.0mbit ceil 500mbit prio 5 tc qdisc add dev enp5s0f0 parent 7:2 cake diffserv4 tc qdisc add dev enp5s0f0 parent 7FFF:8 handle 8: htb default 2 tc class add dev enp5s0f0 parent 8: classid 8:1 htb rate 1000mbit ceil 1000mbit tc qdisc add dev enp5s0f0 parent 8:1 cake diffserv4 tc class add dev enp5s0f0 parent 8:1 classid 8:2 htb rate 125.0mbit ceil 500mbit prio 5 tc qdisc add dev enp5s0f0 parent 8:2 cake diffserv4 tc qdisc add dev enp5s0f0 parent 7FFF:9 handle 9: htb default 2 tc class add dev enp5s0f0 parent 9: classid 9:1 htb rate 1000mbit ceil 1000mbit tc qdisc add dev enp5s0f0 parent 9:1 cake diffserv4 tc class add dev enp5s0f0 parent 9:1 classid 9:2 htb rate 125.0mbit ceil 500mbit prio 5 tc qdisc add dev enp5s0f0 parent 9:2 cake diffserv4 tc qdisc add dev enp5s0f0 parent 7FFF:10 handle 10: htb default 2 tc class add dev enp5s0f0 parent 10: classid 10:1 htb rate 1000mbit ceil 1000mbit tc qdisc add dev enp5s0f0 parent 10:1 cake diffserv4 tc class add dev enp5s0f0 parent 10:1 classid 10:2 htb rate 125.0mbit ceil 500mbit prio 5 tc qdisc add dev enp5s0f0 parent 10:2 cake diffserv4 tc qdisc add dev enp5s0f0 parent 7FFF:11 handle 11: htb default 2 tc class add dev enp5s0f0 parent 11: classid 11:1 htb rate 1000mbit ceil 1000mbit tc qdisc add dev enp5s0f0 parent 11:1 cake diffserv4 tc class add dev enp5s0f0 parent 11:1 classid 11:2 htb rate 125.0mbit ceil 500mbit prio 5 tc qdisc add dev enp5s0f0 parent 11:2 cake diffserv4 tc qdisc add dev enp5s0f0 parent 7FFF:12 handle 12: htb default 2 tc class add dev enp5s0f0 parent 12: classid 12:1 htb rate 1000mbit ceil 1000mbit tc qdisc add dev enp5s0f0 parent 12:1 cake diffserv4 tc class add dev enp5s0f0 parent 12:1 classid 12:2 htb rate 125.0mbit ceil 500mbit prio 5 tc qdisc add dev enp5s0f0 parent 12:2 cake diffserv4 tc qdisc add dev enp5s0f0 parent 7FFF:13 handle 13: htb default 2 tc class add dev enp5s0f0 parent 13: classid 13:1 htb rate 1000mbit ceil 1000mbit tc qdisc add dev enp5s0f0 parent 13:1 cake diffserv4 tc class add dev enp5s0f0 parent 13:1 classid 13:2 htb rate 125.0mbit ceil 500mbit prio 5 tc qdisc add dev enp5s0f0 parent 13:2 cake diffserv4 tc qdisc add dev enp5s0f0 parent 7FFF:14 handle 14: htb default 2 tc class add dev enp5s0f0 parent 14: classid 14:1 htb rate 1000mbit ceil 1000mbit tc qdisc add dev enp5s0f0 parent 14:1 cake diffserv4 tc class add dev enp5s0f0 parent 14:1 classid 14:2 htb rate 125.0mbit ceil 500mbit prio 5 tc qdisc add dev enp5s0f0 parent 14:2 cake diffserv4 tc qdisc add dev enp5s0f0 parent 7FFF:15 handle 15: htb default 2 tc class add dev enp5s0f0 parent 15: classid 15:1 htb rate 1000mbit ceil 1000mbit tc qdisc add dev enp5s0f0 parent 15:1 cake diffserv4 tc class add dev enp5s0f0 parent 15:1 classid 15:2 htb rate 125.0mbit ceil 500mbit prio 5 tc qdisc add dev enp5s0f0 parent 15:2 cake diffserv4 tc qdisc add dev enp5s0f0 parent 7FFF:16 handle 16: htb default 2 tc class add dev enp5s0f0 parent 16: classid 16:1 htb rate 1000mbit ceil 1000mbit tc qdisc add dev enp5s0f0 parent 16:1 cake diffserv4 tc class add dev enp5s0f0 parent 16:1 classid 16:2 htb rate 125.0mbit ceil 500mbit prio 5 tc qdisc add dev enp5s0f0 parent 16:2 cake diffserv4 tc qdisc add dev enp5s0f0 parent 7FFF:17 handle 17: htb default 2 tc class add dev enp5s0f0 parent 17: classid 17:1 htb rate 1000mbit ceil 1000mbit tc qdisc add dev enp5s0f0 parent 17:1 cake diffserv4 tc class add dev enp5s0f0 parent 17:1 classid 17:2 htb rate 125.0mbit ceil 500mbit prio 5 tc qdisc add dev enp5s0f0 parent 17:2 cake diffserv4 tc qdisc add dev enp5s0f0 parent 7FFF:18 handle 18: htb default 2 tc class add dev enp5s0f0 parent 18: classid 18:1 htb rate 1000mbit ceil 1000mbit tc qdisc add dev enp5s0f0 parent 18:1 cake diffserv4 tc class add dev enp5s0f0 parent 18:1 classid 18:2 htb rate 125.0mbit ceil 500mbit prio 5 tc qdisc add dev enp5s0f0 parent 18:2 cake diffserv4 tc qdisc add dev enp5s0f0 parent 7FFF:19 handle 19: htb default 2 tc class add dev enp5s0f0 parent 19: classid 19:1 htb rate 1000mbit ceil 1000mbit tc qdisc add dev enp5s0f0 parent 19:1 cake diffserv4 tc class add dev enp5s0f0 parent 19:1 classid 19:2 htb rate 125.0mbit ceil 500mbit prio 5 tc qdisc add dev enp5s0f0 parent 19:2 cake diffserv4 tc qdisc add dev enp5s0f0 parent 7FFF:20 handle 20: htb default 2 tc class add dev enp5s0f0 parent 20: classid 20:1 htb rate 1000mbit ceil 1000mbit tc qdisc add dev enp5s0f0 parent 20:1 cake diffserv4 tc class add dev enp5s0f0 parent 20:1 classid 20:2 htb rate 125.0mbit ceil 500mbit prio 5 tc qdisc add dev enp5s0f0 parent 20:2 cake diffserv4 tc qdisc add dev enp5s0f0 parent 7FFF:21 handle 21: htb default 2 tc class add dev enp5s0f0 parent 21: classid 21:1 htb rate 1000mbit ceil 1000mbit tc qdisc add dev enp5s0f0 parent 21:1 cake diffserv4 tc class add dev enp5s0f0 parent 21:1 classid 21:2 htb rate 125.0mbit ceil 500mbit prio 5 tc qdisc add dev enp5s0f0 parent 21:2 cake diffserv4 tc qdisc add dev enp5s0f0 parent 7FFF:22 handle 22: htb default 2 tc class add dev enp5s0f0 parent 22: classid 22:1 htb rate 1000mbit ceil 1000mbit tc qdisc add dev enp5s0f0 parent 22:1 cake diffserv4 tc class add dev enp5s0f0 parent 22:1 classid 22:2 htb rate 125.0mbit ceil 500mbit prio 5 tc qdisc add dev enp5s0f0 parent 22:2 cake diffserv4 tc qdisc add dev enp5s0f0 parent 7FFF:23 handle 23: htb default 2 tc class add dev enp5s0f0 parent 23: classid 23:1 htb rate 1000mbit ceil 1000mbit tc qdisc add dev enp5s0f0 parent 23:1 cake diffserv4 tc class add dev enp5s0f0 parent 23:1 classid 23:2 htb rate 125.0mbit ceil 500mbit prio 5 tc qdisc add dev enp5s0f0 parent 23:2 cake diffserv4 tc qdisc add dev enp5s0f0 parent 7FFF:24 handle 24: htb default 2 tc class add dev enp5s0f0 parent 24: classid 24:1 htb rate 1000mbit ceil 1000mbit tc qdisc add dev enp5s0f0 parent 24:1 cake diffserv4 tc class add dev enp5s0f0 parent 24:1 classid 24:2 htb rate 125.0mbit ceil 500mbit prio 5 tc qdisc add dev enp5s0f0 parent 24:2 cake diffserv4 tc qdisc replace dev enp5s0f0 root handle 7FFF: mq tc qdisc add dev enp5s0f0 parent 7FFF:1 handle 1: htb default 2 Error: Exclusivity flag on, cannot modify. tc class add dev enp5s0f0 parent 1: classid 1:1 htb rate 1000mbit ceil 1000mbit RTNETLINK answers: File exists tc qdisc add dev enp5s0f0 parent 1:1 cake diffserv4 RTNETLINK answers: Invalid argument tc class add dev enp5s0f0 parent 1:1 classid 1:2 htb rate 125.0mbit ceil 500mbit prio 5 RTNETLINK answers: File exists tc qdisc add dev enp5s0f0 parent 1:2 cake diffserv4 Error: Exclusivity flag on, cannot modify. tc qdisc add dev enp5s0f0 parent 7FFF:2 handle 2: htb default 2 Error: Exclusivity flag on, cannot modify. tc class add dev enp5s0f0 parent 2: classid 2:1 htb rate 1000mbit ceil 1000mbit RTNETLINK answers: File exists tc qdisc add dev enp5s0f0 parent 2:1 cake diffserv4 RTNETLINK answers: Invalid argument tc class add dev enp5s0f0 parent 2:1 classid 2:2 htb rate 125.0mbit ceil 500mbit prio 5 RTNETLINK answers: File exists tc qdisc add dev enp5s0f0 parent 2:2 cake diffserv4 Error: Exclusivity flag on, cannot modify. tc qdisc add dev enp5s0f0 parent 7FFF:3 handle 3: htb default 2 Error: Exclusivity flag on, cannot modify. tc class add dev enp5s0f0 parent 3: classid 3:1 htb rate 1000mbit ceil 1000mbit RTNETLINK answers: File exists tc qdisc add dev enp5s0f0 parent 3:1 cake diffserv4 RTNETLINK answers: Invalid argument tc class add dev enp5s0f0 parent 3:1 classid 3:2 htb rate 125.0mbit ceil 500mbit prio 5 RTNETLINK answers: File exists tc qdisc add dev enp5s0f0 parent 3:2 cake diffserv4 Error: Exclusivity flag on, cannot modify. tc qdisc add dev enp5s0f0 parent 7FFF:4 handle 4: htb default 2 Error: Exclusivity flag on, cannot modify. tc class add dev enp5s0f0 parent 4: classid 4:1 htb rate 1000mbit ceil 1000mbit RTNETLINK answers: File exists tc qdisc add dev enp5s0f0 parent 4:1 cake diffserv4 RTNETLINK answers: Invalid argument tc class add dev enp5s0f0 parent 4:1 classid 4:2 htb rate 125.0mbit ceil 500mbit prio 5 RTNETLINK answers: File exists tc qdisc add dev enp5s0f0 parent 4:2 cake diffserv4 Error: Exclusivity flag on, cannot modify. tc qdisc add dev enp5s0f0 parent 7FFF:5 handle 5: htb default 2 Error: Exclusivity flag on, cannot modify. tc class add dev enp5s0f0 parent 5: classid 5:1 htb rate 1000mbit ceil 1000mbit RTNETLINK answers: File exists tc qdisc add dev enp5s0f0 parent 5:1 cake diffserv4 RTNETLINK answers: Invalid argument tc class add dev enp5s0f0 parent 5:1 classid 5:2 htb rate 125.0mbit ceil 500mbit prio 5 RTNETLINK answers: File exists tc qdisc add dev enp5s0f0 parent 5:2 cake diffserv4 Error: Exclusivity flag on, cannot modify. tc qdisc add dev enp5s0f0 parent 7FFF:6 handle 6: htb default 2 Error: Exclusivity flag on, cannot modify. tc class add dev enp5s0f0 parent 6: classid 6:1 htb rate 1000mbit ceil 1000mbit RTNETLINK answers: File exists tc qdisc add dev enp5s0f0 parent 6:1 cake diffserv4 RTNETLINK answers: Invalid argument tc class add dev enp5s0f0 parent 6:1 classid 6:2 htb rate 125.0mbit ceil 500mbit prio 5 RTNETLINK answers: File exists tc qdisc add dev enp5s0f0 parent 6:2 cake diffserv4 Error: Exclusivity flag on, cannot modify. tc qdisc add dev enp5s0f0 parent 7FFF:7 handle 7: htb default 2 Error: Exclusivity flag on, cannot modify. tc class add dev enp5s0f0 parent 7: classid 7:1 htb rate 1000mbit ceil 1000mbit RTNETLINK answers: File exists tc qdisc add dev enp5s0f0 parent 7:1 cake diffserv4 RTNETLINK answers: Invalid argument tc class add dev enp5s0f0 parent 7:1 classid 7:2 htb rate 125.0mbit ceil 500mbit prio 5 RTNETLINK answers: File exists tc qdisc add dev enp5s0f0 parent 7:2 cake diffserv4 Error: Exclusivity flag on, cannot modify. tc qdisc add dev enp5s0f0 parent 7FFF:8 handle 8: htb default 2 Error: Exclusivity flag on, cannot modify. tc class add dev enp5s0f0 parent 8: classid 8:1 htb rate 1000mbit ceil 1000mbit RTNETLINK answers: File exists tc qdisc add dev enp5s0f0 parent 8:1 cake diffserv4 RTNETLINK answers: Invalid argument tc class add dev enp5s0f0 parent 8:1 classid 8:2 htb rate 125.0mbit ceil 500mbit prio 5 RTNETLINK answers: File exists tc qdisc add dev enp5s0f0 parent 8:2 cake diffserv4 Error: Exclusivity flag on, cannot modify. tc qdisc add dev enp5s0f0 parent 7FFF:9 handle 9: htb default 2 Error: Exclusivity flag on, cannot modify. tc class add dev enp5s0f0 parent 9: classid 9:1 htb rate 1000mbit ceil 1000mbit RTNETLINK answers: File exists tc qdisc add dev enp5s0f0 parent 9:1 cake diffserv4 RTNETLINK answers: Invalid argument tc class add dev enp5s0f0 parent 9:1 classid 9:2 htb rate 125.0mbit ceil 500mbit prio 5 RTNETLINK answers: File exists tc qdisc add dev enp5s0f0 parent 9:2 cake diffserv4 Error: Exclusivity flag on, cannot modify. tc qdisc add dev enp5s0f0 parent 7FFF:10 handle 10: htb default 2 Error: Exclusivity flag on, cannot modify. tc class add dev enp5s0f0 parent 10: classid 10:1 htb rate 1000mbit ceil 1000mbit RTNETLINK answers: File exists tc qdisc add dev enp5s0f0 parent 10:1 cake diffserv4 RTNETLINK answers: Invalid argument tc class add dev enp5s0f0 parent 10:1 classid 10:2 htb rate 125.0mbit ceil 500mbit prio 5 RTNETLINK answers: File exists tc qdisc add dev enp5s0f0 parent 10:2 cake diffserv4 Error: Exclusivity flag on, cannot modify. tc qdisc add dev enp5s0f0 parent 7FFF:11 handle 11: htb default 2 Error: Exclusivity flag on, cannot modify. tc class add dev enp5s0f0 parent 11: classid 11:1 htb rate 1000mbit ceil 1000mbit RTNETLINK answers: File exists tc qdisc add dev enp5s0f0 parent 11:1 cake diffserv4 RTNETLINK answers: Invalid argument tc class add dev enp5s0f0 parent 11:1 classid 11:2 htb rate 125.0mbit ceil 500mbit prio 5 RTNETLINK answers: File exists tc qdisc add dev enp5s0f0 parent 11:2 cake diffserv4 Error: Exclusivity flag on, cannot modify. tc qdisc add dev enp5s0f0 parent 7FFF:12 handle 12: htb default 2 Error: Exclusivity flag on, cannot modify. tc class add dev enp5s0f0 parent 12: classid 12:1 htb rate 1000mbit ceil 1000mbit RTNETLINK answers: File exists tc qdisc add dev enp5s0f0 parent 12:1 cake diffserv4 RTNETLINK answers: Invalid argument tc class add dev enp5s0f0 parent 12:1 classid 12:2 htb rate 125.0mbit ceil 500mbit prio 5 RTNETLINK answers: File exists tc qdisc add dev enp5s0f0 parent 12:2 cake diffserv4 Error: Exclusivity flag on, cannot modify. tc qdisc add dev enp5s0f0 parent 7FFF:13 handle 13: htb default 2 Error: Exclusivity flag on, cannot modify. tc class add dev enp5s0f0 parent 13: classid 13:1 htb rate 1000mbit ceil 1000mbit RTNETLINK answers: File exists tc qdisc add dev enp5s0f0 parent 13:1 cake diffserv4 RTNETLINK answers: Invalid argument tc class add dev enp5s0f0 parent 13:1 classid 13:2 htb rate 125.0mbit ceil 500mbit prio 5 RTNETLINK answers: File exists tc qdisc add dev enp5s0f0 parent 13:2 cake diffserv4 Error: Exclusivity flag on, cannot modify. tc qdisc add dev enp5s0f0 parent 7FFF:14 handle 14: htb default 2 Error: Exclusivity flag on, cannot modify. tc class add dev enp5s0f0 parent 14: classid 14:1 htb rate 1000mbit ceil 1000mbit RTNETLINK answers: File exists tc qdisc add dev enp5s0f0 parent 14:1 cake diffserv4 RTNETLINK answers: Invalid argument tc class add dev enp5s0f0 parent 14:1 classid 14:2 htb rate 125.0mbit ceil 500mbit prio 5 RTNETLINK answers: File exists tc qdisc add dev enp5s0f0 parent 14:2 cake diffserv4 Error: Exclusivity flag on, cannot modify. tc qdisc add dev enp5s0f0 parent 7FFF:15 handle 15: htb default 2 Error: Exclusivity flag on, cannot modify. tc class add dev enp5s0f0 parent 15: classid 15:1 htb rate 1000mbit ceil 1000mbit RTNETLINK answers: File exists tc qdisc add dev enp5s0f0 parent 15:1 cake diffserv4 RTNETLINK answers: Invalid argument tc class add dev enp5s0f0 parent 15:1 classid 15:2 htb rate 125.0mbit ceil 500mbit prio 5 RTNETLINK answers: File exists tc qdisc add dev enp5s0f0 parent 15:2 cake diffserv4 Error: Exclusivity flag on, cannot modify. tc qdisc add dev enp5s0f0 parent 7FFF:16 handle 16: htb default 2 Error: Exclusivity flag on, cannot modify. tc class add dev enp5s0f0 parent 16: classid 16:1 htb rate 1000mbit ceil 1000mbit RTNETLINK answers: File exists tc qdisc add dev enp5s0f0 parent 16:1 cake diffserv4 RTNETLINK answers: Invalid argument tc class add dev enp5s0f0 parent 16:1 classid 16:2 htb rate 125.0mbit ceil 500mbit prio 5 RTNETLINK answers: File exists tc qdisc add dev enp5s0f0 parent 16:2 cake diffserv4 Error: Exclusivity flag on, cannot modify. tc qdisc add dev enp5s0f0 parent 7FFF:17 handle 17: htb default 2 Error: Exclusivity flag on, cannot modify. tc class add dev enp5s0f0 parent 17: classid 17:1 htb rate 1000mbit ceil 1000mbit RTNETLINK answers: File exists tc qdisc add dev enp5s0f0 parent 17:1 cake diffserv4 RTNETLINK answers: Invalid argument tc class add dev enp5s0f0 parent 17:1 classid 17:2 htb rate 125.0mbit ceil 500mbit prio 5 RTNETLINK answers: File exists tc qdisc add dev enp5s0f0 parent 17:2 cake diffserv4 Error: Exclusivity flag on, cannot modify. tc qdisc add dev enp5s0f0 parent 7FFF:18 handle 18: htb default 2 Error: Exclusivity flag on, cannot modify. tc class add dev enp5s0f0 parent 18: classid 18:1 htb rate 1000mbit ceil 1000mbit RTNETLINK answers: File exists tc qdisc add dev enp5s0f0 parent 18:1 cake diffserv4 RTNETLINK answers: Invalid argument tc class add dev enp5s0f0 parent 18:1 classid 18:2 htb rate 125.0mbit ceil 500mbit prio 5 RTNETLINK answers: File exists tc qdisc add dev enp5s0f0 parent 18:2 cake diffserv4 Error: Exclusivity flag on, cannot modify. tc qdisc add dev enp5s0f0 parent 7FFF:19 handle 19: htb default 2 Error: Exclusivity flag on, cannot modify. tc class add dev enp5s0f0 parent 19: classid 19:1 htb rate 1000mbit ceil 1000mbit RTNETLINK answers: File exists tc qdisc add dev enp5s0f0 parent 19:1 cake diffserv4 RTNETLINK answers: Invalid argument tc class add dev enp5s0f0 parent 19:1 classid 19:2 htb rate 125.0mbit ceil 500mbit prio 5 RTNETLINK answers: File exists tc qdisc add dev enp5s0f0 parent 19:2 cake diffserv4 Error: Exclusivity flag on, cannot modify. tc qdisc add dev enp5s0f0 parent 7FFF:20 handle 20: htb default 2 Error: Exclusivity flag on, cannot modify. tc class add dev enp5s0f0 parent 20: classid 20:1 htb rate 1000mbit ceil 1000mbit RTNETLINK answers: File exists tc qdisc add dev enp5s0f0 parent 20:1 cake diffserv4 RTNETLINK answers: Invalid argument tc class add dev enp5s0f0 parent 20:1 classid 20:2 htb rate 125.0mbit ceil 500mbit prio 5 RTNETLINK answers: File exists tc qdisc add dev enp5s0f0 parent 20:2 cake diffserv4 Error: Exclusivity flag on, cannot modify. tc qdisc add dev enp5s0f0 parent 7FFF:21 handle 21: htb default 2 Error: Exclusivity flag on, cannot modify. tc class add dev enp5s0f0 parent 21: classid 21:1 htb rate 1000mbit ceil 1000mbit RTNETLINK answers: File exists tc qdisc add dev enp5s0f0 parent 21:1 cake diffserv4 RTNETLINK answers: Invalid argument tc class add dev enp5s0f0 parent 21:1 classid 21:2 htb rate 125.0mbit ceil 500mbit prio 5 RTNETLINK answers: File exists tc qdisc add dev enp5s0f0 parent 21:2 cake diffserv4 Error: Exclusivity flag on, cannot modify. tc qdisc add dev enp5s0f0 parent 7FFF:22 handle 22: htb default 2 Error: Exclusivity flag on, cannot modify. tc class add dev enp5s0f0 parent 22: classid 22:1 htb rate 1000mbit ceil 1000mbit RTNETLINK answers: File exists tc qdisc add dev enp5s0f0 parent 22:1 cake diffserv4 RTNETLINK answers: Invalid argument tc class add dev enp5s0f0 parent 22:1 classid 22:2 htb rate 125.0mbit ceil 500mbit prio 5 RTNETLINK answers: File exists tc qdisc add dev enp5s0f0 parent 22:2 cake diffserv4 Error: Exclusivity flag on, cannot modify. tc qdisc add dev enp5s0f0 parent 7FFF:23 handle 23: htb default 2 Error: Exclusivity flag on, cannot modify. tc class add dev enp5s0f0 parent 23: classid 23:1 htb rate 1000mbit ceil 1000mbit RTNETLINK answers: File exists tc qdisc add dev enp5s0f0 parent 23:1 cake diffserv4 RTNETLINK answers: Invalid argument tc class add dev enp5s0f0 parent 23:1 classid 23:2 htb rate 125.0mbit ceil 500mbit prio 5 RTNETLINK answers: File exists tc qdisc add dev enp5s0f0 parent 23:2 cake diffserv4 Error: Exclusivity flag on, cannot modify. tc qdisc add dev enp5s0f0 parent 7FFF:24 handle 24: htb default 2 Error: Exclusivity flag on, cannot modify. tc class add dev enp5s0f0 parent 24: classid 24:1 htb rate 1000mbit ceil 1000mbit RTNETLINK answers: File exists tc qdisc add dev enp5s0f0 parent 24:1 cake diffserv4 RTNETLINK answers: Invalid argument tc class add dev enp5s0f0 parent 24:1 classid 24:2 htb rate 125.0mbit ceil 500mbit prio 5 RTNETLINK answers: File exists tc qdisc add dev enp5s0f0 parent 24:2 cake diffserv4 Error: Exclusivity flag on, cannot modify.

Site_1 Download: 95 to 100 Mbps Upload: 95 to 100 Mbps tc class add dev enp5s0f0 parent 1:1 classid 3 htb rate 95mbit ceil 100mbit prio 3 tc class add dev enp5s0f0 parent 1:1 classid 3 htb rate 95mbit ceil 100mbit prio 3 RTNETLINK answers: File exists

AP_A Download: 86 to 90 Mbps Upload: 86 to 90 Mbps tc class add dev enp5s0f0 parent 1:3 classid 5 htb rate 86mbit ceil 90mbit prio 3 tc class add dev enp5s0f0 parent 1:3 classid 5 htb rate 86mbit ceil 90mbit prio 3 RTNETLINK answers: File exists

  Moto G9 Plus
  Download:  2 to 3 Mbps
  Upload:    2 to 3 Mbps
  tc class add dev enp5s0f0 parent 1:5 classid 6 htb rate 2mbit ceil 3mbit prio 3
  tc qdisc add dev enp5s0f0 parent 1:6 cake diffserv4
  tc class add dev enp5s0f0 parent 1:5 classid 6 htb rate 2mbit ceil 3mbit prio 3

RTNETLINK answers: File exists tc qdisc add dev enp5s0f0 parent 1:6 cake diffserv4 Error: Exclusivity flag on, cannot modify. ./xdp-cpumap-tc/src/xdp_iphash_to_cpu_cmdline --add --ip 10.168.0.100 --cpu 0 --classid 1:6 iphash_modify() IP:10.168.0.100 key:0x6400A80A TC-handle:0x10006 key: 0x6400A80A

Successful run completed on 02/06/2022 15:28:01 Program complete

rchac commented 2 years ago

What NIC are you using? Your NIC must support multiple tx and rx queues (multi-queue). Interface bonding must be OFF.

marsalans commented 2 years ago

Interface bonding is off

marsalans commented 2 years ago

lspci | egrep -i --color 'network|ethernet'

01:00.0 Ethernet controller: Broadcom Inc. and subsidiaries NetXtreme II BCM5709 Gigabit Ethernet (rev 20) 01:00.1 Ethernet controller: Broadcom Inc. and subsidiaries NetXtreme II BCM5709 Gigabit Ethernet (rev 20) 02:00.0 Ethernet controller: Broadcom Inc. and subsidiaries NetXtreme II BCM5709 Gigabit Ethernet (rev 20) 02:00.1 Ethernet controller: Broadcom Inc. and subsidiaries NetXtreme II BCM5709 Gigabit Ethernet (rev 20) 04:00.0 Ethernet controller: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection (rev 01) 04:00.1 Ethernet controller: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection (rev 01) 05:00.0 Ethernet controller: Broadcom Inc. and subsidiaries NetXtreme II BCM57810 10 Gigabit Ethernet (rev 10) 05:00.1 Ethernet controller: Broadcom Inc. and subsidiaries NetXtreme II BCM57810 10 Gigabit Ethernet (rev 10)

marsalans commented 2 years ago

lshw -class network -network:0 description: Ethernet interface product: NetXtreme II BCM5709 Gigabit Ethernet vendor: Broadcom Inc. and subsidiaries physical id: 0 bus info: pci@0000:01:00.0 logical name: eno1 version: 20 serial: 00:22:19:6b:00:a7 size: 1Gbit/s capacity: 1Gbit/s width: 64 bits clock: 33MHz capabilities: pm vpd msi msix pciexpress bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation configuration: autonegotiation=on broadcast=yes driver=bnx2 driverversion=5.13.0-46-generic duplex=full firmware=5.0.12 bc 5.0.11 NCSI 2.0.5 ip=10.0.1.105 latency=0 link=yes multicast=yes port=twisted pair speed=1Gbit/s resources: irq:30 memory:d6000000-d7ffffff -network:1 description: Ethernet interface product: NetXtreme II BCM5709 Gigabit Ethernet vendor: Broadcom Inc. and subsidiaries physical id: 0.1 bus info: pci@0000:01:00.1 logical name: eno2 version: 20 serial: 00:22:19:6b:00:a9 size: 100Mbit/s capacity: 1Gbit/s width: 64 bits clock: 33MHz capabilities: pm vpd msi msix pciexpress bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation configuration: autonegotiation=on broadcast=yes driver=bnx2 driverversion=5.13.0-46-generic duplex=full firmware=5.0.12 bc 5.0.11 NCSI 2.0.5 ip=192.168.100.50 latency=0 link=yes multicast=yes port=twisted pair speed=100Mbit/s resources: irq:32 memory:d8000000-d9ffffff -network:0 description: Ethernet interface product: NetXtreme II BCM5709 Gigabit Ethernet vendor: Broadcom Inc. and subsidiaries physical id: 0 bus info: pci@0000:02:00.0 logical name: eno3 version: 20 serial: 00:22:19:6b:00:ab size: 100Mbit/s capacity: 1Gbit/s width: 64 bits clock: 33MHz capabilities: pm vpd msi msix pciexpress bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation configuration: autonegotiation=on broadcast=yes driver=bnx2 driverversion=5.13.0-46-generic duplex=full firmware=5.0.12 bc 5.0.11 NCSI 2.0.5 latency=0 link=yes multicast=yes port=twisted pair speed=100Mbit/s resources: irq:33 memory:da000000-dbffffff -network:1 description: Ethernet interface product: NetXtreme II BCM5709 Gigabit Ethernet vendor: Broadcom Inc. and subsidiaries physical id: 0.1 bus info: pci@0000:02:00.1 logical name: eno4 version: 20 serial: 00:22:19:6b:00:ad size: 100Mbit/s capacity: 1Gbit/s width: 64 bits clock: 33MHz capabilities: pm vpd msi msix pciexpress bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation configuration: autonegotiation=on broadcast=yes driver=bnx2 driverversion=5.13.0-46-generic duplex=full firmware=5.0.12 bc 5.0.11 NCSI 2.0.5 latency=0 link=yes multicast=yes port=twisted pair speed=100Mbit/s resources: irq:31 memory:dc000000-ddffffff -network:0 description: Ethernet interface product: 82599ES 10-Gigabit SFI/SFP+ Network Connection vendor: Intel Corporation physical id: 0 bus info: pci@0000:04:00.0 logical name: enp4s0f0 version: 01 serial: 90:e2:ba:2b:0d:70 capacity: 10Gbit/s width: 64 bits clock: 33MHz capabilities: pm msi msix pciexpress bus_master cap_list ethernet physical fibre 10000bt-fd configuration: autonegotiation=off broadcast=yes driver=ixgbe driverversion=5.13.0-46-generic firmware=0x000161bf latency=0 link=no multicast=yes resources: irq:34 memory:d5900000-d597ffff ioport:fcc0(size=32) memory:d58f8000-d58fbfff memory:c0000000-c00fffff memory:c0100000-c01fffff -network:1 description: Ethernet interface product: 82599ES 10-Gigabit SFI/SFP+ Network Connection vendor: Intel Corporation physical id: 0.1 bus info: pci@0000:04:00.1 logical name: enp4s0f1 version: 01 serial: 90:e2:ba:2b:0d:71 capacity: 10Gbit/s width: 64 bits clock: 33MHz capabilities: pm msi msix pciexpress bus_master cap_list ethernet physical fibre 10000bt-fd configuration: autonegotiation=off broadcast=yes driver=ixgbe driverversion=5.13.0-46-generic firmware=0x000161bf latency=0 link=no multicast=yes resources: irq:44 memory:d5980000-d59fffff ioport:fce0(size=32) memory:d58fc000-d58fffff memory:c0200000-c02fffff memory:c0300000-c03fffff -network:0 UNCLAIMED description: Ethernet controller product: NetXtreme II BCM57810 10 Gigabit Ethernet vendor: Broadcom Inc. and subsidiaries physical id: 0 bus info: pci@0000:05:00.0 version: 10 width: 64 bits clock: 33MHz capabilities: pm vpd msi msix pciexpress cap_list configuration: latency=0 resources: memory:d3000000-d37fffff memory:d3800000-d3ffffff memory:d2fe0000-d2feffff memory:df100000-df17ffff -network:1 UNCLAIMED description: Ethernet controller product: NetXtreme II BCM57810 10 Gigabit Ethernet vendor: Broadcom Inc. and subsidiaries physical id: 0.1 bus info: pci@0000:05:00.1 version: 10 width: 64 bits clock: 33MHz capabilities: pm vpd msi msix pciexpress cap_list configuration: latency=0 resources: memory:d4000000-d47fffff memory:d4800000-d4ffffff memory:d2ff0000-d2ffffff memory:df180000-df1fffff

rchac commented 2 years ago

On ispConfig.py, you have set interfaceA and interfaceB as enp5s0f0. That s not possible. Each port of the NIC has a different name. For example, interfaceA might be enp5s0f0 and interfaceB might be enp5s0f1. Please check "ip link" to see the interfaces correct names.

marsalans commented 2 years ago

ethtool -i eno1

driver: bnx2 version: 5.13.0-46-generic firmware-version: 5.0.12 bc 5.0.11 NCSI 2.0.5 expansion-rom-version: bus-info: 0000:01:00.0 supports-statistics: yes supports-test: yes supports-eeprom-access: yes supports-register-dump: yes supports-priv-flags: no

ethtool -i eno2

driver: bnx2 version: 5.13.0-46-generic firmware-version: 5.0.12 bc 5.0.11 NCSI 2.0.5 expansion-rom-version: bus-info: 0000:01:00.1 supports-statistics: yes supports-test: yes supports-eeprom-access: yes supports-register-dump: yes supports-priv-flags: no

ethtool -i eno3

driver: bnx2 version: 5.13.0-46-generic firmware-version: 5.0.12 bc 5.0.11 NCSI 2.0.5 expansion-rom-version: bus-info: 0000:02:00.0 supports-statistics: yes supports-test: yes supports-eeprom-access: yes supports-register-dump: yes supports-priv-flags: no

ethtool -i eno4

driver: bnx2 version: 5.13.0-46-generic firmware-version: 5.0.12 bc 5.0.11 NCSI 2.0.5 expansion-rom-version: bus-info: 0000:02:00.1 supports-statistics: yes supports-test: yes supports-eeprom-access: yes supports-register-dump: yes supports-priv-flags: no

ethtool -i enp4s0f0

driver: ixgbe version: 5.13.0-46-generic firmware-version: 0x000161bf expansion-rom-version: bus-info: 0000:04:00.0 supports-statistics: yes supports-test: yes supports-eeprom-access: yes supports-register-dump: yes supports-priv-flags: yes

ethtool -i enp4s0f1

driver: ixgbe version: 5.13.0-46-generic firmware-version: 0x000161bf expansion-rom-version: bus-info: 0000:04:00.1 supports-statistics: yes supports-test: yes supports-eeprom-access: yes supports-register-dump: yes supports-priv-flags: yes

marsalans commented 2 years ago

On ispConfig.py, you have set interfaceA and interfaceB as enp5s0f0. That s not possible. Each port of the NIC has a different name. For example, interfaceA might be enp5s0f0 and interfaceB might be enp5s0f1. Please check "ip link" to see the interfaces correct names.

yes enp5s0f0 and enp5s0f1

rchac commented 2 years ago

Ok. In ispConfig please set interfaceA = 'enp5s0f0' interfaceB = 'enp5s0f1'

Hopefully that works. If program runs successfully without error, but shapes traffic "backwards" (upload rate applied to download and download rate applied to upload) just switch it to interfaceA = 'enp5s0f1' interfaceB = 'enp5s0f0'

marsalans commented 2 years ago

enp5s0f0 and enp5s0f1 are broadcom cards 10g each enp4s0f0 and enp4s0f1 are intel cards 10g each eno1 to eno4 are broadcom 1g each

marsalans commented 2 years ago

i think i have done some mistake so i'm doing reinstallation

rchac commented 2 years ago

Oh ok. Maybe try with enp4s0f0 and enp4s0f1 then. I would assume the intel card support multiqueue better. And just make sure you have no bonds set in your network config. And that your bridge is between just two ports (for example, enp4s0f0 and enp4s0f1) as opposed to many random ports. Its probably not necessary to reinstall quite yet.

marsalans commented 2 years ago

i dont want to shape by site or ap, what should i do ? i just wanted simple download and upload queue i just wanted a typical queue scenerio where previously made queues are mimiced

marsalans commented 2 years ago

Yes i will try with intel, as broadcom 10g cards are showing with lshw -class network -short but without interface name or neither in ifconfig

rchac commented 2 years ago

I'd probably use v1.0 with shapeBySite = False. Define upstream bandwidth limits in ispConfig.py (upstreamBandwidthCapacityDownloadMbps and upstreamBandwidthCapacityUploadMbps). For entries in Shaper.csv just leave AP blank.

marsalans commented 2 years ago

But i also want to use API that is available in v1.1

rchac commented 2 years ago

Ah ok. Use v1.1 with this as network.json

{
    "Site_1":
        {
        "downloadBandwidthMbps":1000,
        "uploadBandwidthMbps":1000
        }
}

And for ParentNode of each entry in Shaper.csv, use Site_1.

marsalans commented 2 years ago

Sytstem is installed now i'm compiling packages, i'll update you of my progress

rchac commented 2 years ago

You can just skip installing pping, libtins, and influxdb. Theyre completely optional and dont seem like theyd help in your case

rchac commented 2 years ago

Also, going forward, whenever you see $(HOME) just replace that with your regular username (arsalan). That way it doesnt change to the root users directory by accident when you run sudo

marsalans commented 2 years ago

i have compiled pping, and make arsalan owner of LireQos directory and it compiled successfully.

marsalans commented 2 years ago

I will share my result with you tommorow

marsalans commented 2 years ago

Also, going forward, whenever you see $(HOME) just replace that with your regular username (arsalan). That way it doesnt change to the root users directory by accident when you run sudo

As its my third or fourth time compiling so i want to go by documentation, then i will got some idea and see how it works

rchac commented 2 years ago

Great work and troublehsooting!

marsalans commented 2 years ago

In previous attemt i run LibreQoS.py, graph.py and lqAPI.py when i run lqAPI.py it gives me error that flask is not installed

rchac commented 2 years ago

Run these two lines python3 -m pip install flask sudo python3 -m pip install flask I have updated the wiki to mention flask, sorry about that.

marsalans commented 2 years ago

Run these two lines python3 -m pip install flask sudo python3 -m pip install flask I have updated the wiki to mention flask, sorry about that.

thanks :D i would try it in the afternoon. i thought that any developer or technical guy can easily install flask as flask error is desciptive.

marsalans commented 2 years ago

one more thing that when i run LibreQoS.py i see in dmesg that:

kernel: HTB: quantum of class 10001 is big. Consider r2q change. then with increasing number it is it printed again and again should i bother about this ?

rchac commented 2 years ago

It's not a concern. But I will make some changes to r2q size so it stops showing that in the log.

marsalans commented 2 years ago

arsalan@qos:~/LibreQoS/v1.1$ ethtool -l eno3 Channel parameters for eno3: Pre-set maximums: RX: 8 TX: 8 Other: n/a Combined: n/a Current hardware settings: RX: 8 TX: 8 Other: n/a Combined: n/a arsalan@qos:~/LibreQoS/v1.1$ ethtool -l eno4 Channel parameters for eno4: Pre-set maximums: RX: 8 TX: 8 Other: n/a Combined: n/a Current hardware settings: RX: 8 TX: 8 Other: n/a Combined: n/a arsalan@qos:~/LibreQoS/v1.1$ ethtool -l enp4s0f0 Channel parameters for enp4s0f0: Pre-set maximums: RX: n/a TX: n/a Other: 1 Combined: 8 Current hardware settings: RX: n/a TX: n/a Other: 1 Combined: 8 arsalan@qos:~/LibreQoS/v1.1$ ethtool -l enp4s0f1 Channel parameters for enp4s0f1: Pre-set maximums: RX: n/a TX: n/a Other: 1 Combined: 8 Current hardware settings: RX: n/a TX: n/a Other: 1 Combined: 8

marsalans commented 2 years ago

Site_1 Download: 950 to 1000 Mbps Upload: 950 to 1000 Mbps tc class add dev eno4 parent 1:1 classid 3 htb rate 950mbit ceil 1000mbit prio 3 tc class add dev eno3 parent 1:1 classid 3 htb rate 950mbit ceil 1000mbit prio 3

Device Moto 1 was not shaped. Please check to ensure its parent Node is listed in network.json. Device Moto 2 was not shaped. Please check to ensure its parent Node is listed in network.json. Successful run completed on 04/06/2022 09:43:25 Program complete

I have set shapeBySite = False

marsalans commented 2 years ago

arsalan@qos:~/LibreQoS/v1.1$ sudo python3 ./graph.py Traceback (most recent call last): File "/home/arsalan/LibreQoS/v1.1/./graph.py", line 8, in from prettytable import PrettyTable ModuleNotFoundError: No module named 'prettytable'

prettytable is also not installed, i have installed it anyway

marsalans commented 2 years ago

After setting up all things, i'm not able to shape queues. Its not letting my shape by entries whether i shapeBySite = True or shapeBySite = False when i remove Site_1 fom csv file it says me that device is not shaped

Device [Device Name] was not shaped. Please check to ensure its parent Node is listed in network.json.

but i can confirm that

Traffic from devices not specified in Shaper.csv will be rate limited by an HTB of this many Mbps

and it is working and it it going to this HTB

below is my configuration

ispConfig.py

How many Mbps are available to the edge of this network

upstreamBandwidthCapacityDownloadMbps = 100 upstreamBandwidthCapacityUploadMbps = 100

Traffic from devices not specified in Shaper.csv will be rate limited by an HTB of this many Mbps

defaultClassCapacityDownloadMbps = 2 defaultClassCapacityUploadMbps = 3

Interface connected to core router (LAN)

interfaceA = 'eno4'

Interface connected to edge router (WAN)

interfaceB = 'eno3'

Shape by Site in addition to by AP and Client

shapeBySite = True

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

shapeRouterOrStation = 'router'

network.json

{ "Site_1": { "downloadBandwidthMbps":100, "uploadBandwidthMbps":100 } }

Shaper.csv

ID,AP,MAC,Hostname,IPv4,IPv6,Download Min,Upload Min,Download Max,Upload Max ,Site_1 ,,Moto 1,192.168.100.23,,4,4,6,6 ,Site_1 ,,Moto 2,10.168.0.102,,4,4,6,6 ,Site_1 ,,Tenda,156.241.205.0,,4,4,6,6

marsalans commented 2 years ago

One thing more that my intel nic bridge is not getting up, neither i'm able to enable it. It was up in previous attempt

[ 14.495905] br0: port 1(enp4s0f1) entered blocking state [ 14.495910] br0: port 1(enp4s0f1) entered disabled state [ 14.495967] device enp4s0f1 entered promiscuous mode [ 14.496249] br0: port 2(enp4s0f0) entered blocking state [ 14.496252] br0: port 2(enp4s0f0) entered disabled state [ 14.496299] device enp4s0f0 entered promiscuous mode

marsalans commented 2 years ago

So todays status is as soon as i run LibreQoS.py the bridge becomes unresponsive although it shows up in ifconfig ip link show etc

also in dmesg it goes from disabled to forwarding then the data stops flowing until i restart the server after the restart bridge is working until LibreQoS.py is executed

rchac commented 2 years ago

Why are your interfaces specified on ispConfig 'eno4' and 'eno3'? I ask because your bridge says it includes 'enp4s0f1' and 'enp4s0f0'. Your bridge should only contain 2 ports - presumably in your case that would be enp4s0f0 and enp4s0f1. Those ports included in the bridge should be the ones specified in ispConfig, not eno4 or eno3. Also i notice it said "entered blocking state". I think you have an STP loop happening. Your WAN or edge router should be connected to one port of the LibreQoS machine, with your core router or LAN connected to a different port. With some management port that does not share layer-2 traffic with the other two. You shouldn't have your network connected in 3 or more ports. Please closely follow this diagram: image

marsalans commented 2 years ago

enp4s0f0 and enp4s0f1 are broadcom 10g cards that are i tried in my first attempt then i have left with enp5s0f0 enp5s0f1 which are intel and builting 1g broadcom eno1 to eno4

as shaping is not working, bridge is also giving problem and intel cards is not getting up i tried it on builtin ports that is eno3 and eno4

marsalans commented 2 years ago

Why are your interfaces specified on ispConfig 'eno4' and 'eno3'? I ask because your bridge says it includes 'enp4s0f1' and 'enp4s0f0'. Your bridge should only contain 2 ports - presumably in your case that would be enp4s0f0 and enp4s0f1. Those ports included in the bridge should be the ones specified in ispConfig, not eno4 or eno3. Also i notice it said "entered blocking state". I think you have an STP loop happening. Your WAN or edge router should be connected to one port of the LibreQoS machine, with your core router or LAN connected to a different port. With some management port that does not share layer-2 traffic with the other two. You shouldn't have your network connected in 3 or more ports. Please closely follow this diagram: image

i'm strictly following the documentation i have removed broadcom 10g card when intel card is not getting up then i try on eno3 and eno4 the difference in ports are just interchangable ports

the shaping is not working but Traffic from devices not specified in Shaper.csv will be rate limited by an HTB of this many Mbps this is working

rchac commented 2 years ago

Set eno3 eno4 as your interfaces in ispConfig. Then make a bridge for eno3 and eno4. That should be the ONLY bridge. eno3 should connect to your WAN or edge router. eno4 should connect to your LAN or core router. There should be NO OTHER ROUTE from your LAN to WAN EXCEPT through LibreQOS. Please take this one step at a time, please do not randomly change interfaces just because shaping isn't working. That makes troubleshooting impossible.

marsalans commented 2 years ago

ispConfig.py

How many Mbps are available to the edge of this network

upstreamBandwidthCapacityDownloadMbps = 100 upstreamBandwidthCapacityUploadMbps = 100

Traffic from devices not specified in Shaper.csv will be rate limited by an HTB of this many Mbps

defaultClassCapacityDownloadMbps = 2 defaultClassCapacityUploadMbps = 3

Interface connected to core router (LAN)

interfaceA = 'eno3'

Interface connected to edge router (WAN)

interfaceB = 'eno4'

Shape by Site in addition to by AP and Client

shapeBySite = True

marsalans commented 2 years ago

arsalan@qos:~/LibreQoS/v1.1$ cat /etc/netplan/00-installer-config.yaml

This is the network config written by 'subiquity'

network: ethernets: eno1: addresses:

rchac commented 2 years ago

In your shaper.csv, it shows a space after Site_1. It says 'Site_1 '. It needs to be exactly the same as its name. So 'Site_1'. So no space after it.

rchac commented 2 years ago

Wait - so you are using eno1 and eno2 to manage the device? No. You need two ports dedicated to shaping traffic. And one dedicated to management. Whatever ports are being used to shape traffic cannot have IP addresses, and DHCP must be OFF.

marsalans commented 2 years ago

In your shaper.csv, it shows a space after Site_1. It says 'Site_1 '. It needs to be exactly the same as its name. So 'Site_1'. So no space after it.

i have remove the spact after Site_1 and it is rebooting now as bridge is not passing traffic

rchac commented 2 years ago

Why does your bridge contain 4 interfaces? It should have exactly two interfaces.

marsalans commented 2 years ago

Wait - so you are using eno1 and eno2 to manage the device? No. You need two ports dedicated to shaping traffic. And one dedicated to management. Whatever ports are being used to shape traffic cannot have IP addresses, and DHCP must be OFF.

yes eno1 is management statis ip eno2 is internet access via dhcp eno3 and eno4 are in bridge0

rchac commented 2 years ago

Ok then br0 should contain eno3 and eno4 ONLY

marsalans commented 2 years ago

Why does your bridge contain 4 interfaces? It should have exactly two interfaces.

my bridge has two interfaces

eno3 and eno4

enp4s0f0 and enp4s0f1 are commented

marsalans commented 2 years ago

Ok then br0 should contain eno3 and eno4 ONLY

yes it is

rchac commented 2 years ago

Oh ok good. Then the comment formatting led to misleading text on Github, sorry.

rchac commented 2 years ago

So what errors do you get when you run sudo python3 LibreQoS.py?