Skip to contentSkip to conversation

Where to assign weights to different flows?

LARTC pablo daniel rey 2 participants 4 messages Feb 7, 2005

lore
Share & tools
lore
#1 lore raw

Dear all,

I'm really a newbie in using 'tc's class and qdisc concepts. I have a question, for example, when I want to use SFQ, how to assign different weights to different flows?
I mean, is there a parameter to be set **in SFQ** to allow some flows to get more bandwidth than others?

Signature · 6 lines
Best Regards,
Franklin

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
#2 lore raw
In reply to pablo daniel rey

if you want to distinguish http flows form each other you must filter them by some criteria. the sfq treats flows equally. it doesn't have any weights assigned to the flows.
you can achieve what you want by setting up some filters and assigning them to the bands of the prio qdisc something like this :

tc qdisc add dev ppp0 handle 1:0 root prio
tc filter add dev ppp0 parent 1:0 protocol ip prio 1 u32 match ip dport 80 flowid 1:1 -- band 0 (high priority) http
tc filter add dev ppp0 parent 1:0 protocol ip prio 1 u32 match ip dport 21 flowid 1:2 -- band 1 (medium priority) ftp

you can even filter the traffic by ip

tc filter add dev ppp0 parent 1:0 protocol ip prio 1 u32 match ip src 192.168.0.1 flowid 1:1 -- band 0

hope that helps

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

#3 lore raw
In reply to pablo daniel rey

But it seems that using htb, we are actually seperating different classes the flows into different rates.
And The flows are independent with each other, right?
For example: by seperating HTTP and FTP flows into two classes, we can assign different rates for them.
But how about treating every HTTP flow differently, i.e. by assigning them different weights.

BTW: Who knows how the weights are implemented in WFQ scheduling? How the weights are settled via 'tc' command?

Thanks,
Franklin

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of pablo daniel rey
Sent: Monday, February 07, 2005 7:47 PM
To: [email protected]
Subject: Re: [LARTC] Where to assign weights to different flows?

i think that what you are looking for is htb or prio

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/