Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Nov 2004 10:36:37 -0500
From:      Josh Coombs <kurlon@gwi.net>
To:        freebsd-net@freebsd.org
Subject:   Netgraph node with inet and ethernet hooks?
Message-ID:  <CE8F4C4A-3589-11D9-98D1-00039348130C@gwi.net>

next in thread | raw e-mail | index | archive | help
I'm trying to find a way to get PPPoE half-bridging functionality
working with FreeBSD, similar to what Cisco routers and many older ISDN
routers can/could do.  Basically, I'm trying to get the ip/subnet
assigned to the ppp link usable on an ethernet interface.

So, on the radius side, you have (format is off, I know...)

user dsluser, prefix=P
    fixed-address = 10.0.0.1
    fixed-netmask = 255.255.255.0

Normally, when mpd connects up, 10.0.0.1 will be assigned with a /32
netmask to ng0 or whatever netgraph iface node is created for the job.

Warning, bad ascii table:
                      +-----+
                      |xl1  |
                      |ether|
                      |     |
                      +-----+
                         |orphans
                         |
                 ethernet|
                     +--------+
                     |0000000b|
                     |pppoe   |
                     |        |
                     +--------+
                         |mpd983_pppoe
                         |
                   link0 |
+--------+       +------------+            +--------+
|00000005|bypass |mpd983_pppoe|VJC Support |00000009|
|socket  |-------|00000007    |------------|vjc     |
|        | bypass|ppp         | VJC Support|        |
+--------+       +------------+            +--------+
      |demand             |inet
      |                   |
      |                ppp|
      |              +--------+
      |              |00000008|
      |--------------|bpf     |
                  mpd|        |
                     +--------+
                          |iface
                          |
                      inet|
                     +--------+
                     |ng0     |
                     |00000006|
                     |iface   |
                     +--------+

Having spent a couple nights trying to get myself up to speed with
netgraph, it seems if I can get a node that takes inet (ip) in, and
spits out ethernet, I can then attach from the bpf node direct to an
existing ethernet interface.  Looking around, I can't find a node type
that accomplishes this.  Does such a connector exist?  If not, is the
closest logical option to stick a ng_socket between the bpf and
ethernet nodes, and do the ethernet [en,de]capsulation in userland?

Joshua Coombs



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CE8F4C4A-3589-11D9-98D1-00039348130C>