[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-admin
Subject:    annoying tc behaviour
From:       urgrue <urgrue () tumsan ! fi>
Date:       2005-04-13 12:57:00
Message-ID: 20050413125700.GA10202 () fede2 ! dev ! ascom ! fi
[Download RAW message or body]

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.
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic