[LARTC] ppp+vpn+htb
Wang Jian
lark at linux.net.cn
Wed Apr 6 10:55:42 CEST 2005
Hi hiphin,
You can also look into ESFQ. Corey Hickey releases esfq for 2.6.12-rc1.
On Wed, 06 Apr 2005 16:42:35 +0800, Wang Jian <lark at linux.net.cn> wrote:
> Hi hiphin,
>
> It seems that your network link is eth0. Then
>
> tc qdisc add dev eth0 root handle 1: htb default 10
> tc class add dev eth0 parent 1: classid 1:1 htb rate 256kbit
> tc class add dev eth0 parent 1:1 classid 1:2 htb rate 32kbit ceil
> 256kbit prio 1
>
> Then you can use tc filter to classify all pptp traffic to 1:2. You
> don't need to specify different class for every ppp connection.
>
> But the drawback is no fairness. Not all ppp connections can get 32kbit
> assured if they want.
>
> If you need guaranteed bandwidth for each ppp connection, try my per
> flow control queue patch. You can find it in list's archive.
>
> On Wed, 6 Apr 2005 10:08:40 +0200, "hiphin" <hiphin at cat-net.co.yu> wrote:
>
> > Hi Wang,...
> >
> > >Because ppp traffic is over your real network link, you can control ppp
> > >traffic over that physic device. But I think it have limitation, because
> > >with this way you can't look into the ppp layer and differential
> > >TCP/IP applications encapsulated in ppp layer
> >
> > yes, that is my question, if I control eth0 only, I can not have per user
> > limmiting...
> >
> > can I do something simple like this:
> >
> > /sbin/tc qdisc add dev eth0 root handle 1: htb default 10
> > /sbin/tc class add dev eth0 parent 1: classid 1:1 htb rate 256kbit
> >
> > /sbin/tc class add dev ppp0 parent 1:1 classid 1:10 htb rate 32kbit ceil \
> > 256kbit prio 1 burst 64kbit cburst 96kbit
> > /sbin/tc filter add dev ppp0 protocol ip parent 1:0 prio 1 u32 match ip dest
> > \
> > $REMOTEIP0 folow 1:10
> >
> > /sbin/tc class add dev ppp1 parent 1:1 classid 1:20 htb rate 32kbit ceil \
> > 256kbit prio 1 burst 64kbit cburst 96kbit
> > /sbin/tc filter add dev ppp1 protocol ip parent 1:0 prio 1 u32 match ip dest
> > \
> > $REMOTEIP1 folow 1:20
> >
> > ...
> >
> > or IMQ must be involved...
> > there must be way, to do bandwidth sharing throught vpn-ppp connections
> >
> > thanks
> >
> >
>
>
>
> --
> lark
>
> _______________________________________________
> LARTC mailing list
> LARTC at mailman.ds9a.nl
> http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
--
lark
More information about the LARTC
mailing list