From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Tackaberry Date: Sat, 02 Feb 2002 05:32:40 +0000 Subject: [LARTC] HTB not working quite the way I'd expect? Message-Id: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: lartc@vger.kernel.org I have a 2Mbit connection, and I would like to distribute that 250k/s (upstream bandwidth, of course, because I am adding the qdisc on our internet interface) as follows: * From our residence students (199.212.55.128/25), min 50k/s, ceil 200k/s * From our DMZ network (where our webserver is located, 199.212.53.0/24), min 200k/s, ceil 250k/s This is the configuration I _think_ should work: tc qdisc add dev eth8 root handle 1: htb default 11 tc class add dev eth8 parent 1: classid 1:1 htb rate 250kbps tc class add dev eth8 parent 1:1 classid 1:10 htb rate 200kbps\ ceil 250kbps burst 10k tc qdisc add dev eth8 parent 1:10 sfq perturb 5 tc filter add dev eth8 protocol ip parent 1: prio 1 u32 match ip\ src 199.212.53.0/24 flowid 1:10 tc class add dev eth8 parent 1:1 classid 1:11 htb rate 50kbps \ ceil 200kbps burst 2k tc qdisc add dev eth8 parent 1:11 sfq perturb 10 tc filter add dev eth8 protocol ip parent 1: prio 4 u32 match \ ip src 199.212.55.128/25 flowid 1:11 So, our residence students are assigned to classid 1:11. Notice that 1:10, our DMZ, is given prio 1, because I want it to get any extra bandwidth before our residence. Indeed, residence users are happily throttled at 200k/s (sustaining it, thanks to the proliferation of p2p file sharing programs). However, when I hit our webserver (from 3 outside sites with lots of bandwidth), I am only able to transfer at about 65k/s (peak 85k/s), while the residence students only drop down to about 160k-180k/s. What I would expect to happen is residence dropping to 50k/s, and our webserver serving up at 200k/s. (Incidentally I am monitoring the input/output on the interfaces using iptraf to measure bandwidth usage.) I am sustaining the transfer for 20-30 seconds before measuring bandwidth usage. If I drop the ceil on 1:11 to 150kbps, I am able to get about 100-120k/s from the web server. And if I again drop the ceil to 100kbps, I get around 175k/s from the webserver. So clearly my remote sites are able to pull down the full 200k/s, which is my goal. So knowing what I want, and my current configuration, can anyone see what I'm doing wrong? Thanks, Jason. -- Academic Computing Support Specialist Algoma University College Sault Ste. Marie, Ontario 705-949-2301 x330 Personal Home Page http://www.auc.ca http://sault.org _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/