<div dir="ltr"><br><br>On Mon, Apr 13, 2015 at 7:32 AM, Sebastian Moeller <<a href="mailto:moeller0@gmx.de">moeller0@gmx.de</a>> wrote:<br><br>> > >         "Squash DSCP on inbound packets (ingress):” this will replace all DSCP marks with 0x0 (I believe), but only after the ingress qdisc.<br>> > > In essence this means you can actually interpret ingress DSCP marks from upstream ("Ignore DSCP on ingress” set to ALLOW) but wipe them after the ingress shaping (with "Squash DSCP on inbound packets (ingress);” active). So the default should be “Ignore DSCP on ingress” and Squash (the second can be argued, as long as no one bases routing decisions on the marks they do not hurt). The rest of your questions are beyond my expertise...<br>> ><br>> > Hmm, why would we want to remove all DSCP on output then?<br>><br>>         Because often we do not want to trust the internet to do the right thing and not game our classification? At least this is a common argument made...<br>><br>> > I assume many ISPs and routers will squash them anyways,<br>><br>>         ISPs are free to set the DSCP values to whatever suits them, and sometimes they do weird things, in essence per default we should not trust them...<br>><br>> > but wouldn't it serve *some* purpose to differentiate between different traffic types?<br>><br>>         Sure, if you know what you do setting reasonable DSCP values for VoIP sounds like a good thing (but due to fq_codel’s inner working might not be required). Alas iptables is only available to us after the packets went through the IFB, so any resetting of DSCP values would be for internal network nodes, our shaper unfortunately can not use this information…<br><br><div>Curious, if fq_codel runs after iptables and can't use DSCP information, why does it mark packets in the mangle chain? I'm still trying to wrap my head around the --set-xmark</div><div><br></div><div>relevant snippet here with squash disabled and ignore ingress set to allow. Can anyone answer why it's matching DSCP marks and what is it doing with xset? I assumed it was marking packets for use in QOS, such as the chain suggests "Chain QOS_MARK_ge00" but this is a jump target from both PREROUTING and POSTROUTING so it should hit FORWARD too,</div><div><br></div><div>#####################################################################################################</div><div>#iptables -nL -t mangle</div><div><div>Chain PREROUTING (policy ACCEPT)</div><div>target     prot opt source               destination</div><div>MARK       tcp  --  <a href="http://0.0.0.0/0">0.0.0.0/0</a>            <a href="http://0.0.0.0/0">0.0.0.0/0</a>            MARK xset 0x2/0xff</div><div>fwmark     all  --  <a href="http://0.0.0.0/0">0.0.0.0/0</a>            <a href="http://0.0.0.0/0">0.0.0.0/0</a></div><div>QOS_MARK_ge00  all  --  <a href="http://0.0.0.0/0">0.0.0.0/0</a>            <a href="http://0.0.0.0/0">0.0.0.0/0</a>           [goto]  mark match 0x0/0xff</div><div><br></div><div>Chain INPUT (policy ACCEPT)</div><div>target     prot opt source               destination</div><div><br></div><div>Chain FORWARD (policy ACCEPT)</div><div>target     prot opt source               destination</div><div>mssfix     all  --  <a href="http://0.0.0.0/0">0.0.0.0/0</a>            <a href="http://0.0.0.0/0">0.0.0.0/0</a></div><div><br></div><div>Chain OUTPUT (policy ACCEPT)</div><div>target     prot opt source               destination</div><div>DSCP       udp  --  <a href="http://0.0.0.0/0">0.0.0.0/0</a>            <a href="http://0.0.0.0/0">0.0.0.0/0</a>            multiport ports 123,53 DSCP set 0x24</div><div><br></div><div>Chain POSTROUTING (policy ACCEPT)</div><div>target     prot opt source               destination</div><div>QOS_MARK_ge00  all  --  <a href="http://0.0.0.0/0">0.0.0.0/0</a>            <a href="http://0.0.0.0/0">0.0.0.0/0</a>           [goto]  mark match 0x0/0xff</div><div><br></div><div>Chain QOS_MARK_ge00 (2 references)</div><div>target     prot opt source               destination</div><div>MARK       all  --  <a href="http://0.0.0.0/0">0.0.0.0/0</a>            <a href="http://0.0.0.0/0">0.0.0.0/0</a>            MARK xset 0x2/0xff</div><div>MARK       all  --  <a href="http://0.0.0.0/0">0.0.0.0/0</a>            <a href="http://0.0.0.0/0">0.0.0.0/0</a>            DSCP match 0x08 MARK xset 0x3/0xff</div><div>MARK       all  --  <a href="http://0.0.0.0/0">0.0.0.0/0</a>            <a href="http://0.0.0.0/0">0.0.0.0/0</a>            DSCP match 0x30 MARK xset 0x1/0xff</div><div>MARK       all  --  <a href="http://0.0.0.0/0">0.0.0.0/0</a>            <a href="http://0.0.0.0/0">0.0.0.0/0</a>            DSCP match 0x2e MARK xset 0x1/0xff</div><div>MARK       all  --  <a href="http://0.0.0.0/0">0.0.0.0/0</a>            <a href="http://0.0.0.0/0">0.0.0.0/0</a>            DSCP match 0x24 MARK xset 0x1/0xff</div><div>MARK       all  --  <a href="http://0.0.0.0/0">0.0.0.0/0</a>            <a href="http://0.0.0.0/0">0.0.0.0/0</a>            tos match0x10/0x3f MARK xset 0x1/0xff</div><div><br></div><div>Chain fwmark (1 references)</div><div>target     prot opt source               destination</div><div><br></div><div>Chain mssfix (1 references)</div><div>target     prot opt source               destination</div><div>TCPMSS     tcp  --  <a href="http://0.0.0.0/0">0.0.0.0/0</a>            <a href="http://0.0.0.0/0">0.0.0.0/0</a>            tcp flags:0x06/0x02 /* wan (mtu_fix) */ TCPMSS clamp to PMTU</div></div><div>#####################################################################################################<br></div><div>#iptables -S -t mangle</div><div><div>-P PREROUTING ACCEPT</div><div>-P INPUT ACCEPT</div><div>-P FORWARD ACCEPT</div><div>-P OUTPUT ACCEPT</div><div>-P POSTROUTING ACCEPT</div><div>-N fwmark</div><div>-N mssfix</div><div>-A PREROUTING -i vtun+ -p tcp -j MARK --set-xmark 0x2/0xff</div><div>-A PREROUTING -j fwmark</div><div>-A PREROUTING -i ge00 -m mark --mark 0x0/0xff -g QOS_MARK_ge00</div><div>-A FORWARD -j mssfix</div><div>-A OUTPUT -p udp -m multiport --ports 123,53 -j DSCP --set-dscp 0x24</div><div>-A POSTROUTING -o ge00 -m mark --mark 0x0/0xff -g QOS_MARK_ge00</div><div>-A QOS_MARK_ge00 -j MARK --set-xmark 0x2/0xff</div><div>-A QOS_MARK_ge00 -m dscp --dscp 0x08 -j MARK --set-xmark 0x3/0xff</div><div>-A QOS_MARK_ge00 -m dscp --dscp 0x30 -j MARK --set-xmark 0x1/0xff</div><div>-A QOS_MARK_ge00 -m dscp --dscp 0x2e -j MARK --set-xmark 0x1/0xff</div><div>-A QOS_MARK_ge00 -m dscp --dscp 0x24 -j MARK --set-xmark 0x1/0xff</div><div>-A QOS_MARK_ge00 -m tos --tos 0x10/0x3f -j MARK --set-xmark 0x1/0xff</div><div>-A mssfix -o ge00 -p tcp -m tcp --tcp-flags SYN,RST SYN -m comment --comment "wan (mtu_fix)" -j TCPMSS --clamp-mss-to-pmtu</div></div><div>#####################################################################################################<br></div><div><br></div><div>I've inserted my custom --set-dscp user created chains into PREROUTING and POSTROUTING, which I excluded from the above but I still don't understand what exactly these marks are doing, even after reading the documentation. It seems like it's still replacing DSCP from what I can tell.</div><div><br></div><div>------</div><div>Also, another unrelated question regarding queue buffers;</div><div><br></div><div>All my ifconfig interfaces show txqueuelen:1000 except for ifb4ge00 and ifb4gw00, both of which I have SQM rate limiting on. wasn't this supposed to be tweaked by debloat scripts? /etc/config/debloat says obsoleted by /etc/hotplug.d/iface/02-debloat but that file is empty. </div><div><br></div><div>uci seems to show the txqueuelen options disabled. Did something change, are these not needed anymore, or did I screw up a config somewhere?</div><div><div> # uci show | grep debloat</div><div>debloat.@wireless[0]=wireless</div><div>debloat.@wireless[0].txqueuelen=4</div><div>debloat.@wirelessn[0]=wirelessn</div><div>debloat.@wirelessn[0].txqueuelen=16</div><div>debloat.@wired10[0]=wired10</div><div>debloat.@wired10[0].txqueuelen=4</div><div>debloat.@wired100[0]=wired100</div><div>debloat.@wired100[0].txqueuelen=16</div><div>debloat.@wired1000[0]=wired1000</div><div>debloat.@wired1000[0].txqueuelen=32</div><div>uci: Entry not found</div></div><div><br></div><div><br></div><div>Thanks for your time, and my apologies if these questions seem dumb or regarded as unnecessary mailing list spam - I'm still learning and tweaking things. I do my best to search the wikis and google before asking here.</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div>