You are not logged in.

#1 2010-08-11 09:09:46

ernesto
Member
Registered: 2008-10-30
Posts: 21

[solved] Indivdual bandwidth limits using TC.

Hello, I'm looking to give each IP in a subnet it's own max bandwidth limit. I've looked at this:

tc qdisc add dev $DEV root handle 1: cbq avpkt 1000 bandwidth 10mbit

      tc class add dev $DEV parent 1: classid 1:1 cbq rate 512kbit \
      allot 1500 prio 5 bounded isolated

      tc filter add dev $DEV parent 1: protocol ip prio 16 u32 \
      match ip dst 10.8.0.1/24 flowid 1:1

The problem: Instead of each IP in the subnet getting a max of 512, 512 is split between everyone in the subnet.
Does anyone know a way to accomplish my objective?

Last edited by ernesto (2010-08-11 16:05:51)

Offline

#2 2010-08-11 09:14:16

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: [solved] Indivdual bandwidth limits using TC.

You're sharing the 512 between the class between all the IP addresses. You'll need to create a class for each IP that you want to dedicate it's own bandwidth to.

(Yes, tc is far from elegant)

Offline

#3 2010-08-11 16:05:13

ernesto
Member
Registered: 2008-10-30
Posts: 21

Re: [solved] Indivdual bandwidth limits using TC.

Thank you, that works, at least using 10.8.0.5 and 18.8.0.6 as a test case. Maybe I can script it.
</Grumbles>

Note: grumble directed at tc.

Last edited by ernesto (2010-08-11 16:06:35)

Offline

Board footer

Powered by FluxBB