Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 03 Nov 2001 21:53:16 +0000
From:      Brian Somers <brian@freebsd-services.com>
To:        Federico Quevedo <quevedo6@cuimail.unige.ch>
Cc:        freebsd-net@FreeBSD.ORG, Julian Elischer <julian@elischer.org>, brian@freebsd-services.com
Subject:   Re: ng_pppoe accounting? 
Message-ID:  <200111032153.fA3LrG813154@hak.lan.Awfulhak.org>
In-Reply-To: Message from Federico Quevedo <quevedo6@cuimail.unige.ch>  of "Wed, 31 Oct 2001 04:40:59 %2B0100." <3BDF72CB.77B15F5C@cuimail.unige.ch> 

next in thread | previous in thread | raw e-mail | index | archive | help

I've just implemented a ``log'' command in ppp.

You can now do something like ``log ${MACADDR} HISADDR USER UPTIME'' 
to your ppp.linkdown.

The only missing bit is getting pppoed to put $MACADDR into ppp's 
environment....

> Julian Elischer wrote:
> 
> > On Tue, 30 Oct 2001, QUEVEDO BUSTILLOS Jose Federico wrote:
> >
> > > Hi,
> > >
> > > I'm a newbie in netgraph structures and I will like to ask your advice
> > > about some PPPoE related ideas.
> > >
> > > I'm using a FreeBDS box with PPPoE installed and working as a gateway.  My
> > > goal is to establish basic administration and accounting for PPPoE users.
> > >
> >
> > You are using pppoed to offer pppoe service?
> 
> I'm thinking of using pppoed as a server that offers connection to internal
> network boxes (essentially laptops) that want to establish an Internet connexion
> acces.
> 
> 
> Lab
> University Network
> 
> -------¦
> ¦---------
> internal network           ¦ ----------- FreeBSD box ---------------¦   Internet
> 
> pppoe clients      ------¦
> (pppoed)                           ¦--------
> 
> 
> 
> > > The basic accounting needs (not with commercial goals) are:
> >
> > As a server or as a client?
> >
> > >
> > > 1. Keep track of the MAC addresses and users names of the PPPoE
> > > connections to the gateway, store time connection of the session and
> > > traffic generated.
> >
> > Is this the kind of logging you want?
> > (I don't have this.. I did it by hand)
> >
> > 13:23:20 2001-10-29   00:23:33:01:23:54 julian 192.168.1.1
> > 13:24:30 2001-10-29   00:01:43:11:45:78 bob 192.168.1.3
> > 13:25:11 2001-10-29   00:23:33:76:2:24 paul 192.168.1.5
> > 13:35:10 2001-10-29   00:23:33:01:23:54 *close* 12334354 in 32412344 out
> > ...
> 
> Is exactly what I would like to generate!
> 
> > The ppp daemon could do this if it knew the associated link and could
> > retrieve the MAC address associated with it.
> >
> > there are several roadblocks..
> > 1/the ppp daemon doesn't keep a control socket associated with the
> > connection so it can't inquire about the MAC address.
> 
> I was thinking to give pppoed (during the discovery phase) the possibility to
> select the IP from a pool of IP address (the same as ppp does -  FreeBSD pppd
> does?), match it with MAC address of client that is well  known at this stage
> and generate this part of our supposed loggin file:
> 
> Time_of_starting_connection          MAC_address           IP_address
>         13:23:20                            00:23:33:01:23:54        192.168.1.1
> 
>         13:24:30                            00:01:43:11:45:78        192.168.1.3
> 
> Then, the call message to ppp could be:
> 
> exec /usr/sbin/ppp -direct -set ifaddr "localhost_ip" "IP_assigned_by_pppoed"
> 
> and the log file already generated could be used by ppp to retrive MAC
> address.....???
> 
> > 2/ If it were to try create a new control socket, it could not connect it
> > to the existing data socket.
> >
> > It may be possible that the ppp daemon might know the netgraph node name
> > for the data socket node, in which case it could get the information
> > requested.
> > This would require an answer from Brian
> >
> > > 2. Dynamic assignation of IP address. (I think on two possibilities a)
> > > PPPoE assignation: when PADR arrives, the gw should look into a pool of IP
> > > adresses and assign one "before calling PPP". B) leave PPP the assignation
> > > and capture the IP in other way).
> >
> > I think you need to leave it to ppp.
> > but maybe ppp can become aware of teh MAc address.
> >
> > >
> > > Result: A log file produced with a session match of:
> > >
> > > MAC add - IP add - username - time of session.
> > >
> > > Should I touch the ng_pppoe code? or should I create a netgraph node to
> > > place between ng_node and ng_ppp?
> > > Am I on the good way
> >
> > Probably not good to touch the pppoe code..
> > until you discuss it with Brian.
> > Then when you can agree on what needs to be changed we can change it.
> > the ppp code needs to be in charge..
> 
> Thanks,
> 
> Federico
> 
> >
> > >
> > > Thanks in advance,
> > >
> > > Federico Quevedo
> > >
> > > .................................................................
> > > Federico Quevedo
[.....]
-- 
Brian <brian@freebsd-services.com>                <brian@Awfulhak.org>
      http://www.freebsd-services.com/        <brian@[uk.]FreeBSD.org>
Don't _EVER_ lose your sense of humour !      <brian@[uk.]OpenBSD.org>



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200111032153.fA3LrG813154>