* Re: [LARTC] Complex Traffic shaping setup
2005-02-18 13:09 [LARTC] Complex Traffic shaping setup Padam J Singh
@ 2005-02-18 13:31 ` George Alexandru Dragoi
2005-02-18 19:42 ` rsenykoff
1 sibling, 0 replies; 3+ messages in thread
From: George Alexandru Dragoi @ 2005-02-18 13:31 UTC (permalink / raw)
To: lartc
I'm not sure if you have to use different prio for filters (With fw
this is a must). Depends on your setup.
With htb, everything is attached with parent as root qdisc.
On Fri, 18 Feb 2005 18:27:26 +0530, Padam J Singh
<padam.singh@inventum.cc> wrote:
> Hi!
>
>
> I have the following setup using iproute2:
>
> ====
> | Root |
> ====
> |
> | =======> ------------| Box Level 1 |
> | =======> |
> | =======> ------------| Box Level 2 |
> | =======> |
> |
> | =======> ------------| Users |
> =======> |
> | =======> ------------| User 1 |
> | =======> |
> | =======> ------------| User 2 |
> | ========
> |
> | =======> ------------| User 3 |
> =======>
>
> I am using HTB for each node, simply because it supports burst mode.
>
> There are box level classes (top level classes) that might limit bandiwdth
> based on protocols (http, smtp etc)
> Then there are users classes which rate limit each user to a specific rate.
>
> Each Box Level and User Classes have associated Qdiscs as well.
>
> The issue is that HTB seems to be rate limiting only if I attach filters at
> the root (1:).
>
> Since classification for box level classes may also match more specific
> user filters are well, one of the two things happen:
>
> 1. If the prio of the filters for Box level is higher or equal than that of
> Users, packets are only sent to the box level class, and since the rate at
> box level class is generally higher, the user starts exceeding his limit.
> 2. If the prio of the User filter is higher, packets matching the user
> filter are never sent to the Box level classes, making the box level rate
> for a particular protocol exceed the required for all users put together.
>
> Is there a solutions to this issue? I am unable to really find a solution
> since filters can only be applied to the root!
>
> Thanks in advance!
> Padam Singh.
>
>
--
Bla bla
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [LARTC] Complex Traffic shaping setup
2005-02-18 13:09 [LARTC] Complex Traffic shaping setup Padam J Singh
2005-02-18 13:31 ` George Alexandru Dragoi
@ 2005-02-18 19:42 ` rsenykoff
1 sibling, 0 replies; 3+ messages in thread
From: rsenykoff @ 2005-02-18 19:42 UTC (permalink / raw)
To: lartc
This is a multipart message in MIME format.
--=_alternative 006C4DBA86256FAC_Content-Type: text/plain; charset="US-ASCII"
> I'm not sure if you have to use different prio for filters (With fw
> this is a must). Depends on your setup.
> With htb, everything is attached with parent as root qdisc.
>
>
> On Fri, 18 Feb 2005 18:27:26 +0530, Padam J Singh
> <padam.singh@inventum.cc> wrote:
> > Hi!
> >
> >
> > I have the following setup using iproute2:
> >
> > ====
> > | Root |
> > ====
> > |
> > | =======> > ------------| Box Level 1 |
> > | =======> > |
> > | =======> > ------------| Box Level 2 |
> > | =======> > |
> > |
> > | =======> > ------------| Users |
> > =======> > |
> > | =======> > ------------| User 1 |
> > | =======> > |
> > | =======> > ------------| User 2 |
> > | ========
> > |
> > | =======> > ------------| User 3 |
> > =======> >
> >
> > I am using HTB for each node, simply because it supports burst mode.
> >
> > There are box level classes (top level classes) that might limit
bandiwdth
> > based on protocols (http, smtp etc)
> > Then there are users classes which rate limit each user to a specific
rate.
> >
> > Each Box Level and User Classes have associated Qdiscs as well.
> >
> > The issue is that HTB seems to be rate limiting only if I attach
filters at
> > the root (1:).
> >
> > Since classification for box level classes may also match more
specific
> > user filters are well, one of the two things happen:
> >
> > 1. If the prio of the filters for Box level is higher or equal than
that of
> > Users, packets are only sent to the box level class, and since the
rate at
> > box level class is generally higher, the user starts exceeding his
limit.
> > 2. If the prio of the User filter is higher, packets matching the
user
> > filter are never sent to the Box level classes, making the box level
rate
> > for a particular protocol exceed the required for all users put
together.
> >
> > Is there a solutions to this issue? I am unable to really find a
solution
> > since filters can only be applied to the root!
> >
> > Thanks in advance!
> > Padam Singh.
> >
> >
The filters get attached to the root, then use the flowid to determine the
destination priority on the HTB.
tc class add dev $e parent 10:1 classid 10:10 htb rate $citrix ceil
$nonVoipRate
tc class add dev $e parent 10:1 classid 10:20 htb rate $video ceil
$nonVoipRate
tc filter add dev $e protocol ip parent 10: prio 1 u32 match ip src
$CONNECTRIA1/32 flowid 10:10
tc filter add dev $e protocol ip parent 10: prio 1 u32 match ip sport 1720
0xffff flowid 10:20
tc filter add dev $e protocol ip parent 10: prio 1 u32 match ip dport 1720
0xffff flowid 10:20
etc...
-Ron
--=_alternative 006C4DBA86256FAC_Content-Type: text/html; charset="US-ASCII"
<br><font size=2><tt>> I'm not sure if you have to use different prio
for filters (With fw<br>
> this is a must). Depends on your setup.<br>
> With htb, everything is attached with parent as root qdisc.<br>
> <br>
> <br>
> On Fri, 18 Feb 2005 18:27:26 +0530, Padam J Singh<br>
> <padam.singh@inventum.cc> wrote:<br>
> > Hi!<br>
> > <br>
> > <br>
> > I have the following setup using iproute2: <br>
> > <br>
> > ====<br>
> > | Root |<br>
> > ====<br>
> > |<br>
> > | ========<br>
> > ------------| Box Level 1 |<br>
> > | ========<br>
> > |<br>
> > | ========<br>
> > ------------| Box Level 2 |<br>
> > | ========<br>
> > |<br>
> > |<br>
> > | ========<br>
> > ------------| Users |<br>
> > ========<br>
> >
| <br>
> >
| ========<br>
> >
------------| User 1 |<br>
> >
| ========<br>
> >
|<br>
> >
| ========<br>
> >
------------| User 2 |<br>
> >
| =======<br>
> >
|<br>
> >
| ========<br>
> >
------------| User 3 |<br>
> >
========<br>
> > <br>
> > <br>
> > I am using HTB for each node, simply because it supports
burst mode.<br>
> > <br>
> > There are box level classes (top level classes) that might
limit bandiwdth<br>
> > based on protocols (http, smtp etc)<br>
> > Then there are users classes which rate limit each user
to a specific rate.<br>
> > <br>
> > Each Box Level and User Classes have associated Qdiscs
as well.<br>
> > <br>
> > The issue is that HTB seems to be rate limiting only if
I attach filters at<br>
> > the root (1:).<br>
> > <br>
> > Since classification for box level classes may also match
more specific<br>
> > user filters are well, one of the two things happen:<br>
> > <br>
> > 1. If the prio of the filters for Box level is higher or
equal than that of<br>
> > Users, packets are only sent to the box level class, and since
the rate at<br>
> > box level class is generally higher, the user starts exceeding
his limit.<br>
> > 2. If the prio of the User filter is higher, packets matching
the user<br>
> > filter are never sent to the Box level classes, making the box
level rate<br>
> > for a particular protocol exceed the required for all users put
together.<br>
> > <br>
> > Is there a solutions to this issue? I am unable to really
find a solution<br>
> > since filters can only be applied to the root!<br>
> > <br>
> > Thanks in advance!<br>
> > Padam Singh.<br>
> > <br>
> > <br>
</tt></font>
<br><font size=2><tt>The filters get attached to the root, then use the
flowid to determine the destination priority on the HTB.</tt></font>
<br>
<br><font size=2><tt>tc class add dev $e parent 10:1 classid 10:10 htb
rate $citrix ceil $nonVoipRate</tt></font>
<br><font size=2><tt>tc class add dev $e parent 10:1 classid 10:20 htb
rate $video ceil $nonVoipRate</tt></font>
<br>
<br><font size=2><tt>tc filter add dev $e protocol ip parent 10: prio 1
u32 match ip src $CONNECTRIA1/32 flowid 10:10</tt></font>
<br>
<br><font size=2><tt>tc filter add dev $e protocol ip parent 10: prio 1
u32 match ip sport 1720 0xffff flowid 10:20</tt></font>
<br><font size=2><tt>tc filter add dev $e protocol ip parent 10: prio 1
u32 match ip dport 1720 0xffff flowid 10:20</tt></font>
<br><font size=2><tt>etc...</tt></font>
<br>
<br><font size=2><tt>-Ron<br>
</tt></font>
--=_alternative 006C4DBA86256FAC_=--
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 3+ messages in thread