tap device at boot time
Willy Offermans
Willy at Offermans.Rompen.nl
Thu Mar 15 13:33:39 UTC 2007
On Wed, Mar 14, 2007 at 11:06:15AM +0000, Vince wrote:
> Willy Offermans wrote:
> > Dear FreeBSD friends,
> >
> > Is it possible to add and configure a tap device at boot time of
> > FreeBSD? I mean the same as a normal NIC. In my rc.conf:
> >
> > <snip>
> > ...
> > ifconfig_xl0="inet 192.168.0.2 promisc netmask 255.255.255.0"
> > ifconfig_rl0="inet 192.168.4.2 netmask 255.255.255.0"
> > ifconfig_tap0="inet 10.8.0.1 netmask 255.255.255.0"
> > ...
> > </snip>
> >
> try adding
> cloned_interfaces="tap0"
>
> to your rc.conf
>
> Vince
> > and in my /boot/loader.conf:
> > <snip>
> > ...
> > if_tap_load="YES"
> > ...
> > </snip>
> >
> > if_xl0 and if_rl0 are compiled into the kernel.
> >
> > Maybe it is even possible to set the MAC address of the tap device!?
> >
> > The tap device should be available before named and dhcpd have been
> > started. In that way I can provide IP addresses over the tap device
> > and add appropriate DNS entries.
> >
> > I like to run openvpn with tap devices and want to use the dhcpd server
> > to provide IP addresses and update the named. This works quite well.
> > However after reboot I always have to restart named and dhcpd again
> > since the tap device becomes available after these services have started
> > during boot. I guess this problem will be solved if the tap device is
> > already available and configured before named and dhcpd have started.
> >
>
Hello Vince,
Thank you for your response, but unfortunately adding
cloned_interfaces="tap0" to my rc.conf did not solve the issue. The
tap0 device only appeared after I started the openvpn daemon. Is there
a way to determine the order to start the daemons. Maybe I can solve
the problem in that way.
I wonder why it is so hard to accomplish this. FreeBSD is usually very
intuitive in initialising device support. Naively I would think: load
the kernel_module and run ifconfig and you are there. For xl0 and rl0
it will work like this, I guess, but for tap0 certainly not. What kind
of a kick does this tap device need? Is it that special? Openvpn needs
to know which tap to use, but that is it, I guess. The rest is up to
the kernel to do the trick, isn't it? Maybe I have to dig in the source
code of openvpn to find out how to initialise the tap device.
--
Met vriendelijke groeten,
With kind regards,
Mit freundlichen Gruessen,
De jrus wah,
Willy
*************************************
W.K. Offermans
Home: +31 45 544 49 44
Mobile: +31 653 27 16 23
e-mail: Willy at Offermans.Rompen.nl
Powered by ....
(__)
\\\'',)
\/ \ ^
.\._/_)
www.FreeBSD.org
More information about the freebsd-stable
mailing list