[FreeRADIUS and PPPd] How to limit the bandwidth?

Jakub Wartak vnulllists at pcnet.com.pl
Thu Jul 21 15:23:09 CEST 2005


Dnia czwartek, 21 lipca 2005 14:00, Sebastian Mauer napisał:
> freeradius-users-bounces at lists.freeradius.org wrote:
> > Dnia czwartek, 21 lipca 2005 13:36, Sebastian Mauer napisał:
> >> Hello there,
> >>
> >> I'm currently setting up FreeRADIUS as authentication/authorization
> >> backend for a PPPoE Server running with the ppp Daemon. I've managed
> >> to get the ppp Daemon to work with my working FreeRADIUS 1.0.3 Server
> >> but now have to solve another problem. Is it possible to limit the
> >> bandwidth the ppp channel allocated via an attribute in FreeRADIUS?
> >>
> >> Or has someone another Idea how to manage a bandwidth cap?
> >
> > What kind of OS this PPPoE server is running?
>
> The Server is running on Linux (Debian 3.1 Sarge/stable)

Ok.

> > If it is Linux/*BSD you can execute commands on session initialization
> > ( /etc/ppp/if-up or something like that ). Just put some tc/altq/ipfw
> > commands there...
> >
> > btw: Search for "WARTA project" on google ;)
>
> Hello there,
> thanks for the Info I will gather Information about WARTA and iproute2.
>
> But another problem should be that I have to control the bandwidth limits
> individually for each user logging into the pppoe-server.

So use HTB ( or HFSC ) for that, just create a new qdisc/class/filter for 
every user that connects to your concentrator. 

---internet(eth0)--- linux --- pppoe_clients(eth1)----

What you should do:
+ prepare kernel with IMQ ( it's one of the possbile solutions )
+ attach imq0 to ppp+ ( now all traffic outgoing on interfaces pppX will go 
through imq0 )
+ before pppoe-server starts, attach htb/hfsc qdisc root to eth0 and imq0, 
prepare classes etc.
+ launch pppoe-server
+ write scripts (if-up/if-down) that create/destroy classess/filters/qdiscs on 			
	a) eth0 ( limiting upload )
	b) imq0 ( limiting download for client )

+ tune your setup ;) ( the info about bw limits could be fetched from RADIUS 
server using additional atttributes )

But first you should understand QoS on Linux deeply.

Ask google for:
lartc
htb
imq

BTW: This group is not intended to ask question about Linux QoS and rp-pppoe.

If you have trouble doing this i advice using FreeBSD as showed in WARTA 
HowTo.


-- 
Jakub Wartak
-vnull
FreeBSD/OpenBSD/Linux/Network Administrator




More information about the Freeradius-Users mailing list