LARTC
[Top] [All Lists]

Re: [LARTC] Why did I need strange ceiling settings? (full version)

To: Philipp Leusmann <Philipp.Leusmann@rwth-aachen.de>
Subject: Re: [LARTC] Why did I need strange ceiling settings? (full version)
From: Andy Furniss <lists@andyfurniss.entadsl.com>
Date: Sun, 12 Nov 2006 20:50:57 +0000
Cc: lartc@mailman.ds9a.nl
Delivered-to: sp-com-lists@consult.net
Delivered-to: lartc-list@securepoint.com
Delivered-to: lartc@outpost.ds9a.nl
In-reply-to: <002901c70672$7fde9340$0200a8c0@marvin>
List-archive: <http://mailman.ds9a.nl/pipermail/lartc>
List-help: <mailto:lartc-request@mailman.ds9a.nl?subject=help>
List-id: "Mailinglist of the Linux Advanced Routing &amp; Traffic Control project" <lartc.mailman.ds9a.nl>
List-post: <mailto:lartc@mailman.ds9a.nl>
List-subscribe: <http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc>, <mailto:lartc-request@mailman.ds9a.nl?subject=subscribe>
List-unsubscribe: <http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc>, <mailto:lartc-request@mailman.ds9a.nl?subject=unsubscribe>
References: <002901c70672$7fde9340$0200a8c0@marvin>
Reply-to: lists@andyfurniss.entadsl.com
Sender: lartc-bounces@mailman.ds9a.nl
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.7.13) Gecko/20060417
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

<Prev in Thread] Current Thread [Next in Thread>