brocellous
New Around Here
Hi.
I have an old RT-AC68U router running Asuswrt-merlin 386.7, and an Arch Linux laptop with linux 6.8.9, and an intel ac 8265 wireless card.
I had trouble with severe packet loss (70-99%) to cloudflare services and web hosts specifically when connected to the wifi, and I finally discovered it was a consequence of a quirk of cloudflare's servers that unconditionally set TOS byte 0x10 (DSCP 0x04) in ipv4 traffic received by the router. This seems to set the socket priority in linux for forwarded packets, and some consequence of this modified skb priority results in severe packet loss transmitting to my laptop specifically — it doesn't affect all wireless clients on the network. Stangely, the packet loss seems to be mitigated with a high enough packet rate, and is more severe with sparse traffic.
Anyway, the following iptables rule completely resolves the issue for me:
$ iptables -t mangle -A FORWARD -j CLASSIFY --set-class 0:0
Simply washing the DSCP bits without resetting the priority does not help.
Right now I'm wondering, what is the actual expected effect of this priority? What is changed that in the transmission that could cause differential treatment by my laptop? On the router, QoS is not enabled in the Adaptive QoS tab. Disabling wme with `wl wme 0` also doesn't seem to have any effect, but the difference with and without the iptables rule is night and day, and the effect is immediate: I can remove and re-add the rule to watch the problem reappear and get fixed instantly.
I wasn't able to discern any difference in the recieved packets with tcpdump. Any clue what it could be?
I have an old RT-AC68U router running Asuswrt-merlin 386.7, and an Arch Linux laptop with linux 6.8.9, and an intel ac 8265 wireless card.
I had trouble with severe packet loss (70-99%) to cloudflare services and web hosts specifically when connected to the wifi, and I finally discovered it was a consequence of a quirk of cloudflare's servers that unconditionally set TOS byte 0x10 (DSCP 0x04) in ipv4 traffic received by the router. This seems to set the socket priority in linux for forwarded packets, and some consequence of this modified skb priority results in severe packet loss transmitting to my laptop specifically — it doesn't affect all wireless clients on the network. Stangely, the packet loss seems to be mitigated with a high enough packet rate, and is more severe with sparse traffic.
Anyway, the following iptables rule completely resolves the issue for me:
$ iptables -t mangle -A FORWARD -j CLASSIFY --set-class 0:0
Simply washing the DSCP bits without resetting the priority does not help.
Right now I'm wondering, what is the actual expected effect of this priority? What is changed that in the transmission that could cause differential treatment by my laptop? On the router, QoS is not enabled in the Adaptive QoS tab. Disabling wme with `wl wme 0` also doesn't seem to have any effect, but the difference with and without the iptables rule is night and day, and the effect is immediate: I can remove and re-add the rule to watch the problem reappear and get fixed instantly.
I wasn't able to discern any difference in the recieved packets with tcpdump. Any clue what it could be?