Ultimate SQM settings: Layer_cake + DSCP marks (New Script!)

So, I would actually try to use @ldir's ctinfo approach here and use windows inbuilt method to get the MS teams appiication's egress packets marked properly...

Regarding your question, I really do not know about the differential processing cost of those three options, so please report back if you get to the bottom of it.

1 Like

@ldir's ctinfo approach is working very well for me at this point! Thank you for pointing me that direction.

Due to the switch in approach, it seems the differential processing cost of the rules becomes more irrelevant as the ctinfo approach establishes that:

# ctinfo instances are set on both ingress and egress paths.  The ingress path
# is hopefully obvious but ctinfo on egress may not be quite so obvious to
# understand.  It is there to copy the previously set DSCP value to all
# corresponding egress packets and thus eliminate the requirement for each
# packet to pass through the 'hard' ruleset.
2 Likes

Hello. This may be a bit off topic, but I tried to setup the IPv4 script from the GitHub master branch with the veth part removed.
And for one when the script is executed this error seems to occur once in line 61: iptables v1.8.3 (legacy): Couldn't load match 'hashlimit':No such file or directory
(on GitHub https://github.com/hisham2630/Ultimate-SQM-settings-Layer_cake-DSCP-marks-New-Script/blob/9bd414823660503275ff7d4ee680728dcf01bd6c/DSCP-ipv4.sh#L61)

EDIT: of course. whenever i finally decide to write a post for help I find a solution to a problem x.x. Just had to install iptables-mod-hashlimit

And although all the rules seem to have appeared in the iptables mangle table and domains are resolved and added to the ipsets, most traffic is still put into the Best Effort bucket. DSCP squash and ignore is explicitly disabled.

EDIT2: welp it seems like all is not fine. it appears that queue rules apply to an interface called ifb4eth0.2 with the ingress queue rules and eth0.2 with egress rules. I keep looking at ifb4eth0.2 where I see all the incoming traffic being sorted into the best effort tin.

Apart from that, thank you for taking the time to work on this script and DNS list.

EDIT3: Ok I think I nailed down the issue. After digging deep into the inner workings of IPTABLES for the first time I also discovered the useful status page acessible at cgi-bin/luci/admin/status/iptables.
So at least now I can clearly see that everything is classed as Browsing at CS3. Let's see where I can go from here. Must be an issue with my ipset.
EDIT4: I can't believe I spent all these hours researching this just to find out that it's simply because my ipset doesn't filter out Steam downloads...

But the learnings along the way are invaluable! :slightly_smiling_face: Glad you got it sorted! By the way, you might be interested in Netdata-chart-sqm to get a visual of your SQM stats in near real-time.

1 Like

Thank you! Will definitely check it out. I still am troubled by the fact that most of my download traffic is sorted into the Best Effort bucket and listed under generic web traffic despite the IPs being in the ipset.
Hence does the order of Iptable rules matter, and if how?

Yes, the order of iptables rules does matter. Along with considering that, I would actually recommend taking a look at @ldir's ctinfo based method here: SQM Logic approach for Internet Bandwith management

I am using his method now and it is working extremely well. With the ctinfo version each of your packets will not have to continually traverse the DSCP chain. Take a look at the link and @ldir does a superb job of explaining the process.

Of course the veth part is there precisely to avoid the problem you're debugging... Namely that iptables runs AFTER the IFB device has queued the packets. No amount of iptables can change the behavior of the queue on IFB

1 Like

:wink:
That said, if you do not need WiFi from the main router (say, because you use dedicated APs) you can simply instantiate the internet download/ingress Shaper as egress Shaper on the routers LAN interface and you will have the power of iptables/nftables at you disposal. The whole IFB/veth trickery really is only required if you either require WiFi on the router or if you have significant traffic terminating at the router itself (like router doing duty as externally reachable file server that takes loads of uploads...).

1 Like

With the veth part in it I have general connection issues where most of the time I cannot reach the internet. My WAN variable is set to eth0.2 as that is the interface name of created by my Switch. It uses a simple DHCP client. The wlan interface is also correct.

My SQM is set for the eth0.2 interface. is that wrong?

if that's the wan then it's correct. you should be using more of the tins in the upload direction since the DSCP tags will take effect in that direction

then go to /etc/sysctl.conf and add those two lines:

net.core.default_qdisc=fq_codel
net.ipv4.tcp_congestion_control=bbr

Will "net.core.default_qdisc=cake" work if the linux version is 5.4.52?

I'm on 4.14 and I didn't see anything error message regarding that in the logs. Do you think cake got removed at some point?

Ultimately this package will be removed when linux 4.14 is removed.

A separate cake module was removed as it has been upstreamed into Linux itself in 4.19. So, cake works for those targets that use kernel 4.19

I'm not certain but I think for you it's gonna be net.core.default_qdisc=fq_codel

how do you get the url for dnsmasq ??

Hi,
I'm experimenting with this script. I'm using the non-veth method. Just wanted to verify if I set it up correctly. Here's what my interfaces look like:

My sqm settings:

config queue 'eth1'
	option debug_logging '0'
	option verbosity '5'
	option qdisc 'cake'
	option interface 'eth4'
	option linklayer 'ethernet'
	option overhead '26'
	option qdisc_advanced '1'
	option squash_dscp '0'
	option ingress_ecn 'ECN'
	option upload '15000'
	option download '85000'
	option enabled '1'
	option script 'layer_cake.qos'
	option egress_ecn 'ECN'
	option squash_ingress '0'
	option qdisc_really_really_advanced '1'

root@OpenWrt:~# 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 eth0 root
 Sent 314836078540 bytes 291251158 pkt (dropped 0, overlimits 0 requeues 1262)
 backlog 0b 0p requeues 1262
qdisc fq_codel 0: dev eth0 parent :8 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb ecn
 Sent 510413 bytes 1544 pkt (dropped 0, overlimits 0 requeues 1)
 backlog 0b 0p requeues 1
  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 32Mb ecn
 Sent 45683292630 bytes 40747559 pkt (dropped 0, overlimits 0 requeues 76)
 backlog 0b 0p requeues 76
  maxpacket 1392 drop_overlimit 0 new_flow_count 5 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 32Mb ecn
 Sent 51872476969 bytes 46000690 pkt (dropped 0, overlimits 0 requeues 64)
 backlog 0b 0p requeues 64
  maxpacket 1514 drop_overlimit 0 new_flow_count 7 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 32Mb ecn
 Sent 51102475885 bytes 46774534 pkt (dropped 0, overlimits 0 requeues 95)
 backlog 0b 0p requeues 95
  maxpacket 1392 drop_overlimit 0 new_flow_count 9 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 32Mb ecn
 Sent 48555566581 bytes 48044838 pkt (dropped 0, overlimits 0 requeues 925)
 backlog 0b 0p requeues 925
  maxpacket 1454 drop_overlimit 0 new_flow_count 5 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 32Mb ecn
 Sent 43240690345 bytes 40525781 pkt (dropped 0, overlimits 0 requeues 42)
 backlog 0b 0p requeues 42
  maxpacket 2924 drop_overlimit 0 new_flow_count 19 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 32Mb ecn
 Sent 38220117029 bytes 35317424 pkt (dropped 0, overlimits 0 requeues 28)
 backlog 0b 0p requeues 28
  maxpacket 1392 drop_overlimit 0 new_flow_count 3 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 32Mb ecn
 Sent 36160948688 bytes 33838788 pkt (dropped 0, overlimits 0 requeues 31)
 backlog 0b 0p requeues 31
  maxpacket 1514 drop_overlimit 0 new_flow_count 10 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc mq 0: dev eth1 root
 Sent 33340576792 bytes 39677969 pkt (dropped 0, overlimits 0 requeues 50)
 backlog 0b 0p requeues 50
qdisc fq_codel 0: dev eth1 parent :8 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb ecn
 Sent 360473 bytes 2214 pkt (dropped 0, overlimits 0 requeues 1)
 backlog 0b 0p requeues 1
  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 32Mb ecn
 Sent 6187911566 bytes 7058870 pkt (dropped 0, overlimits 0 requeues 5)
 backlog 0b 0p requeues 5
  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 32Mb ecn
 Sent 4594355091 bytes 5069647 pkt (dropped 0, overlimits 0 requeues 4)
 backlog 0b 0p requeues 4
  maxpacket 1514 drop_overlimit 0 new_flow_count 2 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 32Mb ecn
 Sent 5000053866 bytes 5451176 pkt (dropped 0, overlimits 0 requeues 7)
 backlog 0b 0p requeues 7
  maxpacket 3028 drop_overlimit 0 new_flow_count 2 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 32Mb ecn
 Sent 3843807451 bytes 8184217 pkt (dropped 0, overlimits 0 requeues 22)
 backlog 0b 0p requeues 22
  maxpacket 60 drop_overlimit 0 new_flow_count 1 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 32Mb ecn
 Sent 5102683792 bytes 4771349 pkt (dropped 0, overlimits 0 requeues 4)
 backlog 0b 0p requeues 4
  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 32Mb ecn
 Sent 4340117955 bytes 4505577 pkt (dropped 0, overlimits 0 requeues 3)
 backlog 0b 0p requeues 3
  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 32Mb ecn
 Sent 4271286598 bytes 4634919 pkt (dropped 0, overlimits 0 requeues 4)
 backlog 0b 0p requeues 4
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc mq 0: dev eth2 root
 Sent 125789867499 bytes 182426556 pkt (dropped 0, overlimits 0 requeues 313)
 backlog 0b 0p requeues 313
qdisc fq_codel 0: dev eth2 parent :8 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb ecn
 Sent 12277347 bytes 85880 pkt (dropped 0, overlimits 0 requeues 3)
 backlog 0b 0p requeues 3
  maxpacket 3028 drop_overlimit 0 new_flow_count 2 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth2 parent :7 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb ecn
 Sent 27841332727 bytes 32039269 pkt (dropped 0, overlimits 0 requeues 50)
 backlog 0b 0p requeues 50
  maxpacket 4894 drop_overlimit 0 new_flow_count 16 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth2 parent :6 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb ecn
 Sent 30160681239 bytes 33620926 pkt (dropped 0, overlimits 0 requeues 24)
 backlog 0b 0p requeues 24
  maxpacket 3028 drop_overlimit 0 new_flow_count 3 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth2 parent :5 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb ecn
 Sent 23085917457 bytes 30195316 pkt (dropped 0, overlimits 0 requeues 21)
 backlog 0b 0p requeues 21
  maxpacket 429 drop_overlimit 0 new_flow_count 2 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth2 parent :4 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb ecn
 Sent 17675737002 bytes 28029617 pkt (dropped 0, overlimits 0 requeues 116)
 backlog 0b 0p requeues 116
  maxpacket 118 drop_overlimit 0 new_flow_count 4 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth2 parent :3 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb ecn
 Sent 11453431221 bytes 21313103 pkt (dropped 0, overlimits 0 requeues 53)
 backlog 0b 0p requeues 53
  maxpacket 7570 drop_overlimit 0 new_flow_count 6 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth2 parent :2 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb ecn
 Sent 9985821919 bytes 19225591 pkt (dropped 0, overlimits 0 requeues 17)
 backlog 0b 0p requeues 17
  maxpacket 36336 drop_overlimit 0 new_flow_count 4 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth2 parent :1 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb ecn
 Sent 5574668587 bytes 17916854 pkt (dropped 0, overlimits 0 requeues 29)
 backlog 0b 0p requeues 29
  maxpacket 3028 drop_overlimit 0 new_flow_count 6 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc mq 0: dev eth3 root
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc fq_codel 0: dev eth3 parent :8 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb 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 eth3 parent :7 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb 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 eth3 parent :6 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb 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 eth3 parent :5 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb 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 eth3 parent :4 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb 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 eth3 parent :3 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb 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 eth3 parent :2 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb 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 eth3 parent :1 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb 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 htb 1: dev eth4 root refcnt 2 r2q 10 default 0x8000 direct_packets_stat 33 direct_qlen 1000
 Sent 14042669150 bytes 11276413 pkt (dropped 86, overlimits 12225669 requeues 3)
 backlog 0b 0p requeues 3
qdisc fq_codel 15: dev eth4 parent 1:8000 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb ecn
 Sent 238874928 bytes 519547 pkt (dropped 9, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 20863 drop_overlimit 0 new_flow_count 60220 ecn_mark 0
  new_flows_len 0 old_flows_len 1
qdisc fq_codel 14: dev eth4 parent 1:14 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb ecn
 Sent 12963098121 bytes 9531235 pkt (dropped 77, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 27252 drop_overlimit 0 new_flow_count 137514 ecn_mark 0
  new_flows_len 0 old_flows_len 1
qdisc fq_codel 12: dev eth4 parent 1:12 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb ecn
 Sent 2523655 bytes 24111 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 590 drop_overlimit 0 new_flow_count 18309 ecn_mark 0
  new_flows_len 1 old_flows_len 21
qdisc fq_codel 11: dev eth4 parent 1:11 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb ecn
 Sent 344959 bytes 1825 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 2988 drop_overlimit 0 new_flow_count 492 ecn_mark 0
  new_flows_len 1 old_flows_len 9
qdisc fq_codel 13: dev eth4 parent 1:13 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb ecn
 Sent 837817364 bytes 1199660 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 1342 drop_overlimit 0 new_flow_count 26916 ecn_mark 0
  new_flows_len 1 old_flows_len 3
qdisc ingress ffff: dev eth4 parent ffff:fff1 ----------------
 Sent 3985698885 bytes 8938294 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 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 htb 1: dev eth4-ifb root refcnt 2 r2q 70 default 0x8000 direct_packets_stat 42 direct_qlen 32
 Sent 4119657079 bytes 8938284 pkt (dropped 7, overlimits 2369890 requeues 0)
 backlog 0b 0p requeues 0
qdisc fq_codel 15: dev eth4-ifb parent 1:8000 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb ecn
 Sent 1557651314 bytes 1523911 pkt (dropped 2, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 10598 drop_overlimit 0 new_flow_count 120768 ecn_mark 0
  new_flows_len 0 old_flows_len 1
qdisc fq_codel 14: dev eth4-ifb parent 1:14 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb ecn
 Sent 969703619 bytes 5211271 pkt (dropped 5, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 22710 drop_overlimit 0 new_flow_count 133989 ecn_mark 0
  new_flows_len 0 old_flows_len 1
qdisc fq_codel 12: dev eth4-ifb parent 1:12 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb ecn
 Sent 3254917 bytes 18811 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 479 drop_overlimit 0 new_flow_count 18624 ecn_mark 0
  new_flows_len 1 old_flows_len 0
qdisc fq_codel 11: dev eth4-ifb parent 1:11 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb ecn
 Sent 2267440 bytes 2295 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 9084 drop_overlimit 0 new_flow_count 430 ecn_mark 0
  new_flows_len 1 old_flows_len 9
qdisc fq_codel 13: dev eth4-ifb parent 1:13 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb ecn
 Sent 1586750040 bytes 2181944 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 1449 drop_overlimit 0 new_flow_count 218042 ecn_mark 0
  new_flows_len 1 old_flows_len 7
qdisc cake 8029: dev ifb4eth4 root refcnt 2 bandwidth 85Mbit diffserv3 triple-isolate nonat nowash no-ack-filter split-gso rtt 100.0ms noatm overhead 26
 Sent 1091 bytes 11 pkt (dropped 0, overlimits 4 requeues 0)
 backlog 0b 0p requeues 0
 memory used: 2176b of 4250000b
 capacity estimate: 85Mbit
 min/max network layer size:           46 /     309
 min/max overhead-adjusted size:       72 /     335
 average network hdr offset:            1

                   Bulk  Best Effort        Voice
  thresh       5312Kbit       85Mbit    21250Kbit
  target          5.0ms        5.0ms        5.0ms
  interval      100.0ms      100.0ms      100.0ms
  pk_delay          0us         15us          0us
  av_delay          0us          0us          0us
  sp_delay          0us          0us          0us
  backlog            0b           0b           0b
  pkts                0           11            0
  bytes               0         1091            0
  way_inds            0            0            0
  way_miss            0            4            0
  way_cols            0            0            0
  drops               0            0            0
  marks               0            0            0
  ack_drop            0            0            0
  sp_flows            0            4            0
  bk_flows            0            0            0
  un_flows            0            0            0
  max_len             0          323            0
  quantum           300         1514          648

I'm not an expert in any of this, but I'll try to provide any more info if needed.

Something doesn’t look right with your WAN and WAN6. Why does your WAN6 indicate it’s set up for IPv4 and have the same IP as WAN? You might want to validate that to start.

I was trying to figure out how to get ipv4 and ipv6 on the same interface similar to that of post #22, but I lose my internet connection when I change WAN6 to DHCP ipv6. I just removed WAN6 in the meantime. Maybe you can point me in the right direction on a side note. Here's my current network config:

config interface 'loopback'
	option ifname 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config globals 'globals'
	option ula_prefix 'fd43:5253:2ee8::/48'

config interface 'lan'
	option proto 'static'
	option netmask '255.255.255.0'
	option ipaddr '192.168.3.1'
	option ip6assign '64'
	list dns '192.168.3.1'
	list dns '8.8.8.8'
	option type 'bridge'
	option ifname 'eth0 eth1 eth2 eth3'

config interface 'wan'
	option proto 'dhcp'
	option ifname 'eth4'

If I can move forward, I'd like to continue on with the testing the script.

As an example, here is my current config:

config interface 'loopback'
	option ifname 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config globals 'globals'
	option packet_steering '1'

config interface 'lan'
	option ifname 'eth1'
	option proto 'static'
	option netmask '255.255.255.0'
	option ip6assign '64'
	option ipaddr '192.168.45.5'
	list dns '192.168.45.5'
	option ip6ifaceid '::5'
	option ip6hint '45'

config interface 'WAN'
	option proto 'dhcp'
	option ifname 'eth0'
	option broadcast '1'
	option peerdns '0'

config interface 'WAN6'
	option proto 'dhcpv6'
	option ifname 'eth0'
	option reqprefix '56'
	option reqaddress 'force'
	option peerdns '0'

...

Your configuration will likely differ because mine is on a dedicated OpenWrt host (x86_64 VM) and I have all my WAP functionality offloaded to an R7800 (hence no bridging in my config). Also, I have Spectrum cable, so a DHCPv6 PD /56 is available to me so I can provide each of my internal VLANs their own /64 from that delegated prefix.

But perhaps this gives you some ideas to try and investigate more.

My configuration is:

AT&T (DSL) -> Arris router -> x86 openwrt box -> LAN

I got a unifi lite AP connected after the x86 box. Actually, looking in the Arris router configurations, I don't have a DHCPv6.

Question how do you make this script for a network with multiple segments?