Hi,

Simple traffic shaping almost does everything I need.  What would be super useful and allow me to maximize the bandwidth offered by my ISP (i.e. save on bandwidth) would be to set the shorewall-tcpri band based on the amount of bytes moved by a given connection.  I was using shorewall-mangle just to set which ISP to use (works great)... but noticed connbytes in there as well which seems like it might help me get what I want.

Would something like this in shorewall-mangle work with TC_ENABLED=Simple

# Any connections moving more than 10MB mark TOS for lower priority
TOS(0x08):P     0.0.0.0/0       0.0.0.0/0       -       - -       -       -       -       -       10000000:

In other words, does setting the TOS mark like "TOS(0x08)" in the prerouting chain (maybe it should be forward chain?) based on connbytes like this in shorewall-mangle effectively emulate what a CONNBYTES column in shorewall-tcpri would do?

Finally, in shorewall-tcpri its pretty clear from the docs which rules applies "The priority band of each packet is determined by the last entry that the packet matches." - however, assuming the above connbytes tos trick works and matches a packet AND a rule in shorewall-tcpri also applies to the same packet - which one wins out and sets the final TOS value used?  By way of example, lets say I have a rule in shorewall-tcpri that marks packets on PORT 22 as BAND 1.   Let's say I run offsite backups over ssh/rsync - in theory, up until 10MB were transferred, those packets would go out in BAND 1 - after 10MB were transferred, both rules would apply - would the connbytes mangle rule set the final TOS value on the packet in this case?

Thanks for any help!

Michael



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Shorewall-users mailing list
Shorewall-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/shorewall-users

Reply via email to