# [solved] tap & bridge interfaces not created at boot?

## nasaiya

Hi,

All of a sudden my tap1 and br0 interfaces aren't created at boot anymore... I was hoping someone might have an idea why that might be. I don't recall changing any related configs. I don't shut this machine down very often so it could have been an update at some point.

I have this in my /etc/conf.d/net and it worked well for months...

```

rc_need_br0="net.tap1"

bridge_br0="tap1"

config_br0="10.1.1.1 netmask 255.255.255.0" 

tuntap_tap1="tap"

tunctl_tap1="-u root"

config_tap1="null" 

```

Now when tap1 and br0 try to start at boot I get:

```

 * Bringing up interface tap1

 *   ERROR: interface tap1 does not exist

 *   Ensure that you have loaded the correct kernel module for your hardware

 * ERROR: net.tap1 failed to start

```

Same for br0.

If manually create them both like this the init scripts start them properly.

```

tunctl -u root -t tap1

brctl addbr br0

```

How could I get them automatically created at boot again?

ThanksLast edited by nasaiya on Sat Feb 11, 2012 7:27 pm; edited 1 time in total

----------

## Hu

What is the output of emerge --info sys-apps/openrc sys-apps/iproute2 ; emerge --pretend --verbose sys-apps/iproute2?

----------

## nasaiya

 *Hu wrote:*   

> What is the output of emerge --info sys-apps/openrc sys-apps/iproute2 ; emerge --pretend --verbose sys-apps/iproute2?

 

Thanks for the reply.

Sorry I didn't think to post emerge --info for this.. Here you go

```

# emerge --info sys-apps/openrc sys-apps/iproute2 ; emerge --pretend --verbose sys-apps/iproute2

Portage 2.1.10.44 (default/linux/amd64/10.0/desktop/kde, gcc-4.5.3, glibc-2.13-r4, 3.2.1-gentoo-r2 x86_64)

=================================================================

                        System Settings

=================================================================

System uname: Linux-3.2.1-gentoo-r2-x86_64-AMD_Phenom-tm-_II_X6_1090T_Processor-with-gentoo-2.0.3

Timestamp of tree: Sat, 28 Jan 2012 17:45:01 +0000

distcc 3.1 x86_64-pc-linux-gnu [disabled]

app-shells/bash:          4.1_p9

dev-java/java-config:     2.1.11-r3

dev-lang/python:          2.7.2-r3, 3.1.4-r3

dev-util/cmake:           2.8.6-r4

dev-util/pkgconfig:       0.26

sys-apps/baselayout:      2.0.3

sys-apps/openrc:          0.9.8.2

sys-apps/sandbox:         2.5

sys-devel/autoconf:       2.13, 2.68

sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.1

sys-devel/binutils:       2.21.1-r1

sys-devel/gcc:            4.4.5, 4.5.3-r1

sys-devel/gcc-config:     1.4.1-r1

sys-devel/libtool:        2.4-r1

sys-devel/make:           3.82-r1

sys-kernel/linux-headers: 3.1 (virtual/os-headers)

sys-libs/glibc:           2.13-r4

Repositories: gentoo kde-sunset pentoo dustin java-overlay x-portage

ACCEPT_KEYWORDS="amd64"

ACCEPT_LICENSE="* -@EULA"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-march=amdfam10 -O2 -pipe"

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa /var/bind /var/lib/hsqldb"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"

CXXFLAGS="-march=amdfam10 -O2 -pipe"

DISTDIR="/usr/portage/distfiles"

FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"

FFLAGS=""

GENTOO_MIRRORS="http://gentoo.mirrors.tds.net/gentoo http://mirror.usu.edu/mirrors/gentoo/ http://gentoo.llarian.net/ http://www.cyberuse.com/gentoo/ http://gentoo.osuosl.org/"

LDFLAGS="-Wl,-O1 -Wl,--as-needed"

LINGUAS="en en_US"

MAKEOPTS="-j8"

PKGDIR="/usr/portage/packages"

PORTAGE_CONFIGROOT="/"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

PORTDIR_OVERLAY="/var/lib/layman/kde-sunset /var/lib/layman/pentoo /var/lib/layman/dustin /var/lib/layman/java-overlay /usr/local/portage"

SYNC="rsync://rsync25.us.gentoo.org/gentoo-portage"

USE="3dnow 3dnowext 3dnowprefetch 64bit 7zip X X509 Xaw3d a52 aac abm acl acpi additions admin administrator aim aimextras alsa amarok amazon amd amd64 animgif apache2 aperfmperf apic applet asf aspell asterisk audiofile automount background bash-completion berkdb big-tables bind-mysql bittorrent bluetooth bonusscripts boundschecking branding bzip2 cairo cdaudio cdda cddb cdparanoia cdr cdrom cdsound cgi chroot clamav clflush cli cmdsubmenu cmov cmp_legacy colordiff compress connectionstatus console consolekit constant_tsc contentcache cpb cr8_legacy cracklib crypt css cups curl curlwrappers cursors cvs cx16 cx8 cxx dbus de declarative dhcp dict disassembler diskcache divx dri dts dvd dvdr dvdread embedded emboss emoticon emovix enchant encode enscript epydoc evolution exif expat extapic extd_apicid extensions extrafilters extras faillog fam fastcgi fax fbcon ffmpeg finger firefox flac flash flatfile foomaticdb force-cgi-redirect fortran fpu ftp fxsr fxsr_opt gaim gcj gd gdb gdbm gdu gedit geoip gif gimp gimpprint git gmail gmedia gmp gnome gnutella gnutls gphoto2 gpm grammar groupwise gstreamer gtk hacking hfs high-ints highlight ht html htmlhandbook http hunspell ibs icons iconv id3 ident imagemagick imap imlib innodb ipod irc java javascript jbig jpeg jpeg2k kde kdm kipi lahf_lm lame lash latex lbrv lcms ldap libcaca libnotify libsamplerate libsexy libwww lm lm_sensors logitech-mouse logrotate logwatch mad magic maildir mca mce memlimit messages mhash mime misalignsse mjpeg mmkeys mmx mmxext mng modules monitor mono motif mozilla moznopango mp2 mp3 mp4 mp4live mpeg mpeg2 mpi mplayer msr mtrr mudflap multilib musepack musicbrainz mysql mysqli nas nat ncurses network networking nfs nis nls nntp nonstop_tsc nopl npt nptl nptlonly nrip_save nsplugin nx objc objc++ odk offensive ofx ogg openal openexr opengl openmp osvw p2p pae pam pam_chroot pango paranoidmsg parport pat pausefilter pcap pcre pda pdf pdpe1gb pge phonon php plasma png pni policykit popcnt posix ppds pppd private-headers profile pse pse36 qt3support qt4 quicktime rar rdesktop rdtscp readline realmedia rep_good sasl scanner sdl seamonkey semantic-desktop sep server session sftp skinit slang smarty smp smtp sockets socks5 songdb sound sounds spell spoof-source sql sqlite sse sse2 sse4a ssl startup-notification subversion svg svm svm_lock syscall sysfs szip tcpd theora thesaurus tidy tiff tk transcode truetype tsc twolame udev unicode usb vcd vdr verbose vhosts videos vim-syntax visualization vme vnc vorbis vorbis-psy wav wavpack wdt webdav wma wmf wmp wxwidgets x264 xcb xcomposite xine xinerama xml xorg xpm xprint xscreensaver xsl xulrunner xv xvid yahoo zip zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================

                        Package Settings

=================================================================

sys-apps/openrc-0.9.8.2 was built with the following:

USE="(consolekit) (multilib) ncurses pam (policykit) unicode -debug (-selinux) -static-libs"

sys-apps/iproute2-2.6.38 was built with the following:

USE="berkdb (consolekit) (multilib) (policykit) -atm -minimal"

These are the packages that would be merged, in order:

Calculating dependencies... done!

[ebuild   R    ] sys-apps/iproute2-2.6.38  USE="berkdb -atm -minimal" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB

```

----------

## Hu

Recent versions of openrc, in conjunction with recent versions of iproute2, can create tuntap devices without using tunctl.  Since -u root was always implicit with tunctl anyway, try removing the line tunctl_tap1="-u root" and then starting the interface.

----------

## nasaiya

Thanks for the info, unfortunately that had no effect. I probably copied that from an example somewhere not knowing it wasn't actually needed...

Any other ideas? I'm still poking around for clues but so far no luck.

Edit: For the record, the tun/tap module is indeed loaded...

```

# lsmod

Module                  Size  Used by

...

tun                    12674  0 

```

openRC just seems to be failing to create the interfaces before attempting to bring them up...

----------

## Hu

You could invoke the openrc script in verbose mode or run it under dev-util/strace to learn exactly what command fails to execute correctly.  Once that is known, it may be easier to debug by running that command directly.

----------

## nasaiya

Oops! I'm an idiot... forgot to update my config files   :Embarassed: 

Looks like there were some changes to the init-scripts that needed to be merged and that was causing the problem...

Thanks for the help and sorry for the false alarm!

I hate when that happens... sigh..

----------

## toralf

please put a "[solved]" in front of the topic

----------

## nasaiya

 *toralf wrote:*   

> please put a "[solved]" in front of the topic

 

Well I tried to but it wouldn't let me without deleting half of the title!

Edit: There I condensed it a bit  :Smile: 

----------

