Terence Parker wrote: >Just a quick question about your suggestion (b) - I did this thinking >I could set a lower priority for traffic that I can't identify (since >i've specified specifically which traffic I want higher priority on). >Or should I not do this? > >What happens to unspecified traffic if I remove the unconditional >rule, in terms of priority?
When setting up TC, there is (in my setup anyway *) a definition in the qdisc setup specifying the default class for unclassified traffic. * I have TC configured in tcstart, directly configuring TC rather than indirectly via Shorewall. It was copied from the 'Wondershaper' config given in the Linux Advanced Routing & Traffic Control howto (google for LARTC). This is my tcstart file ># clean existing down- and uplink qdiscs, hide errors >tc qdisc del dev eth0 root 2> /dev/null > /dev/null >tc qdisc del dev eth0 ingress 2> /dev/null > /dev/null > ># install root HTB, point default traffic to 1:20: >run_tc qdisc add dev eth0 root handle 1: htb default 20 > ># shape everything at uplink speed - this prevents huge queues in your ># DSL modem which destroy latency: >run_tc class add dev eth0 parent 1: classid 1:1 htb rate xxxxkbit burst 6kbit > > ># high priority class 1:10: >run_tc class add dev eth0 parent 1:1 classid 1:10 htb rate xxxxkbit >ceil xxxxkbit burst 6kbit prio 1 > ># medium priority class 1:20: >run_tc class add dev eth0 parent 1:1 classid 1:20 htb rate xxxxkbit >ceil xxxxkbit burst 6kbit prio 2 > ># low priority class 1:30: >run_tc class add dev eth0 parent 1:1 classid 1:30 htb rate xxxxkbit >ceil xxxxkbit burst 6kbit prio 3 > ># extra-low priority class 1:40: >run_tc class add dev eth0 parent 1:1 classid 1:40 htb rate 50kbit >ceil xxxxkbit burst 6kbit prio 4 > > ># Give each class stochastic fair queuing >run_tc qdisc add dev eth0 parent 1:10 handle 10: sfq perturb 10 >run_tc qdisc add dev eth0 parent 1:20 handle 20: sfq perturb 10 >run_tc qdisc add dev eth0 parent 1:30 handle 30: sfq perturb 10 >run_tc qdisc add dev eth0 parent 1:40 handle 40: sfq perturb 10 > ># Filter by Firewall marks into classes : >run_tc filter add dev eth0 protocol ip parent 1:0 prio 1 handle 1 fw >flowid 1:10 >run_tc filter add dev eth0 protocol ip parent 1:0 prio 1 handle 2 fw >flowid 1:20 >run_tc filter add dev eth0 protocol ip parent 1:0 prio 1 handle 3 fw >flowid 1:30 >run_tc filter add dev eth0 protocol ip parent 1:0 prio 1 handle 4 fw >flowid 1:40 > > >########## downlink ############# ># slow downloads down to somewhat less than the real speed to prevent ># queuing at our ISP. Tune to see how high you can set it. ># ISPs tend to have *huge* queues to make sure big downloads are fast ># ># attach ingress policer: >run_tc qdisc add dev eth0 handle ffff: ingress > ># filter *everything* to it (0.0.0.0/0), drop everything that's ># coming in too fast: >run_tc filter add dev eth0 parent ffff: protocol ip prio 50 u32 >match ip src 0.0.0.0/0 police rate xxxxkbit burst 10k drop flowid :1 And then my tcrules file contains rules like this : ># DNS >1 0.0.0.0/0 0.0.0.0/0 udp 53 >1 0.0.0.0/0 0.0.0.0/0 udp - 53 >1 0.0.0.0/0 0.0.0.0/0 tcp 53 >1 0.0.0.0/0 0.0.0.0/0 tcp - 53 ># ># SMTP Traffic >3 0.0.0.0/0 0.0.0.0/0 tcp 25 >3 0.0.0.0/0 0.0.0.0/0 tcp - 25 ># ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Shorewall-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/shorewall-users
