Setting up TAP interface at boot?
On Sunday 18 January 2009, Jesse Sheidlower <jester@panix.com> wrote
about 'Setting up TAP interface at boot?':
>Where's the right place to set up a TAP interface at boot
>time? When my system's up, I usually run "tunctl -t tap0" as
>root, but I'd like this to be created automatically. I do
>have an entry in /etc/network/interfaces to configure this:
>
>auto tap0
>iface tap0 inet static
> address 192.168.5.1
> netmask 255.255.255.0
>
>but this won't work if the interface doesn't exist, so I end
>up having to do everything by hand.
Create and statically configure the device during the post-up of the
interface it depends upon. For example, I have a OpenVPN that I want to
come up on eth0. I added the line "openvpn $vpn_name" to the
configuration for the eth0 device.
If you are not doing openvpn, you may have to write your own script and use
the normal /etc/network/if-up.d interface.
If this is something to do with virtualization, so may want the device
create (and configure) script attached to the "lo" device.
If you are happy with having to run a command as root to create the device,
you could also run "ifup tap0" immediately after that command to save a
little manual work.
--
Boyd Stephen Smith Jr. ,= ,-_-. =.
bss@iguanasuicide.net ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-'
http://iguanasuicide.net/ \_/
|