From owner-freebsd-net Tue Oct 30 11: 0:53 2001 Delivered-To: freebsd-net@freebsd.org Received: from InterJet.elischer.org (c421509-a.pinol1.sfba.home.com [24.7.86.9]) by hub.freebsd.org (Postfix) with ESMTP id C121137B405 for ; Tue, 30 Oct 2001 11:00:49 -0800 (PST) Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id KAA31814; Tue, 30 Oct 2001 10:45:15 -0800 (PST) Date: Tue, 30 Oct 2001 10:45:13 -0800 (PST) From: Julian Elischer To: QUEVEDO BUSTILLOS Jose Federico Cc: freebsd-net@FreeBSD.ORG Subject: Re: ng_pppoe accounting? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org 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? > The basic accounting needs (not 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 ... 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. 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 in advance, > > Federico Quevedo > > ................................................................. > Federico Quevedo > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-net" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message