From: Andy Furniss Date: Sun, 12 Nov 2006 20:50:57 +0000 Subject: Re: [LARTC] Why did I need strange ceiling settings? (full version) Message-Id: <45578931.9070009@andyfurniss.entadsl.com> List-Id: References: <002001c7032c$60ce5dd0$0200a8c0@marvin> In-Reply-To: <002001c7032c$60ce5dd0$0200a8c0@marvin> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: lartc@vger.kernel.org Philipp Leusmann wrote: You will need to back off from the rates more and use kbit of course. > tc qdisc add dev $IFACE root handle 1:0 htb default 103 default is bad if $IFACE is eth your arp will go here, also if eth Quantum should be set to ip mtu + 14. > > echo "Set root class" > # Set root class > tc class add dev $IFACE parent 1:0 classid 1:1 htb rate $UPRATE ceil $UPRATE > echo "Specify sub classes" > # Specify sub classes > tc class add dev $IFACE parent 1:1 classid 1:101 htb rate $PRIORATE1 ceil > $UPRATE quantum $QUANTUM1 prio 0 > tc class add dev $IFACE parent 1:1 classid 1:102 htb rate $PRIORATE2 ceil > $UPRATE quantum $QUANTUM2 prio 1 > tc class add dev $IFACE parent 1:1 classid 1:103 htb rate $PRIORATE3 ceil > $UPRATE quantum $QUANTUM3 prio 2 > tc class add dev $IFACE parent 1:1 classid 1:104 htb rate $PRIORATE4 ceil > $P2PRATE quantum $QUANTUM4 prio 3 Using different quantums makes more sense if classes have the same prio - like this the higher prio classes get all spare anyway if they need it. > > echo "Filter packets" > # Filter packets > tc filter add dev $IFACE parent 1:0 protocol ip prio 0 handle $MARKPRIO1 fw > classid 1:101 > tc filter add dev $IFACE parent 1:0 protocol ip prio 1 handle $MARKPRIO2 fw > classid 1:102 > tc filter add dev $IFACE parent 1:0 protocol ip prio 2 handle $MARKPRIO3 fw > classid 1:103 > tc filter add dev $IFACE parent 1:0 protocol ip prio 3 handle $MARKPRIO4 fw > classid 1:104 Makes no difference as such in this case, but highest prio for filters is 1. Andy. _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc