Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Oct 2001 04:40:59 +0100
From:      Federico Quevedo <quevedo6@cuimail.unige.ch>
To:        freebsd-net@FreeBSD.ORG
Cc:        Julian Elischer <julian@elischer.org>
Subject:   Re: ng_pppoe accounting?
Message-ID:  <3BDF72CB.77B15F5C@cuimail.unige.ch>
References:  <Pine.BSF.4.21.0110301010170.26174-100000@InterJet.elischer.org>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.

--Boundary_(ID_KAS7p41HoyGLHpz494uVkA)
Content-type: text/plain; charset=iso-8859-1
Content-transfer-encoding: 8BIT


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
> >
> >
> >
> > To Unsubscribe: send mail to majordomo@FreeBSD.org
> > with "unsubscribe freebsd-net" in the body of the message
> >

--Boundary_(ID_KAS7p41HoyGLHpz494uVkA)
Content-type: text/x-vcard; charset=us-ascii; name=quevedo6.vcf
Content-transfer-encoding: 8BIT
Content-disposition: attachment; filename=quevedo6.vcf
Content-description: Card for Federico Quevedo

begin:vcard 
n:Quevedo B.;Federico
tel;cell:+41 76 582 0473
tel;home:+41 22 347 0999
x-mozilla-html:FALSE
org:Université de Genève;Centre Universitaire d'Informatique 
version:2.1
email;internet:quevedo6@cuimail.unige.ch
adr;quoted-printable:;;Rue Gen=E8ral Dufour 4=0D=0A;Genève;;1201;Suisse
fn:Federico Quevedo
end:vcard

--Boundary_(ID_KAS7p41HoyGLHpz494uVkA)--

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?3BDF72CB.77B15F5C>