From mboxrd@z Thu Jan 1 00:00:00 1970 From: urgrue Subject: annoying tc behaviour Date: Wed, 13 Apr 2005 15:57:00 +0300 Message-ID: <20050413125700.GA10202@fede2.dev.ascom.fi> Mime-Version: 1.0 Content-Transfer-Encoding: 7BIT Return-path: Content-Disposition: inline Sender: linux-admin-owner@vger.kernel.org List-Id: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: admin i want to prioritize one form of traffic over another in the simplest way possible. as i understand i cant get away with simple PRIO, but need to have the root qdisc rate limited with HTB (or CBQ, etc). if im wrong please correct me. after several hours of fiddling i've come up with: tc qdisc add dev eth0 root handle 1: htb default 1 tc class add dev eth0 parent 1: classid 1:1 htb rate 120kbit burst 15k tc qdisc add dev eth0 parent 1:1 handle 10: prio tc qdisc add dev eth0 parent 10:1 handle 11: sfq tc qdisc add dev eth0 parent 10:2 handle 12: sfq tc filter add dev eth0 parent 10: protocol ip u32 match ip sport 22 0xffff flowid 12: tc filter add dev eth0 parent 10: protocol ip u32 match ip sport 19 0xffff flowid 11: with tc -s qdisc i can see that indeed traffic on port 19 hits qdisc 11: and port 22 hits qdisc 12:, as intended. total traffic is limited to 120kbit. trouble is, it divides the traffic evenly, both ports get about 60kbits. i thought PRIO in this case should give just about all the available bandwidth to port 19, while 22 sits around starving to death. but this doesnt happen, and i'd like it to. any help appreciated.