FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 01-18-2009, 08:24 AM
Jesse Sheidlower
 
Default 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.

Thanks.

Jesse Sheidlower


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 01-18-2009, 10:15 AM
"Boyd Stephen Smith Jr."
 
Default 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/ \_/
 
Old 01-18-2009, 05:35 PM
Andrew Malcolmson
 
Default Setting up TAP interface at boot?

Jesse Sheidlower wrote:

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.

Thanks.

Jesse Sheidlower



To bring up a TAP interface, optionally readable by a non-root user, do:

iface mytap inet static
address 10.0.3.1
netmask 255.255.255.0
pre-up /usr/sbin/tunctl -u username -t mytap



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 07:25 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org