Netgraph node with inet and ethernet hooks?
Josh Coombs
kurlon at gwi.net
Sat Nov 13 07:36:39 PST 2004
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
More information about the freebsd-net
mailing list