Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
VLAN interface won't come up
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
mjs
Tux's lil' helper
Tux's lil' helper


Joined: 07 Mar 2007
Posts: 91
Location: Dallas, TX.

PostPosted: Fri Oct 21, 2011 2:50 am    Post subject: VLAN interface won't come up Reply with quote

I'm trying to set up a vlan interface, but it won't come up automatically when configured in /etc/conf.d/net. I can however configure it manually and pass traffic.

Here is what I have in the /etc/conf.d/net.

Code:

config_eth2=( "0.0.0.0" )
vlans_eth2="6"
config_eth2_6=( "192.168.50.93/24" )


This was taken from another of my servers where it works fine.

I'm stumped. Any ideas?
Back to top
View user's profile Send private message
s_bernstein
Apprentice
Apprentice


Joined: 11 Mar 2006
Posts: 172
Location: Bremen, Germany

PostPosted: Fri Oct 21, 2011 5:57 am    Post subject: Reply with quote

Did you linked net.lo to net.eth2 and added it to your runlevel?
Back to top
View user's profile Send private message
mjs
Tux's lil' helper
Tux's lil' helper


Joined: 07 Mar 2007
Posts: 91
Location: Dallas, TX.

PostPosted: Fri Oct 21, 2011 2:22 pm    Post subject: Reply with quote

Yes.

There are also other interfaces in the config that come up with no problem. If I give eth2 an actual IP it gets assigned as expected. It's as though it's completely ignoring the vlan commands. vconfig is installed and 802.1q tagging is compiled in the kernel.
Back to top
View user's profile Send private message
mjs
Tux's lil' helper
Tux's lil' helper


Joined: 07 Mar 2007
Posts: 91
Location: Dallas, TX.

PostPosted: Fri Oct 21, 2011 7:08 pm    Post subject: Reply with quote

It doesn't work using the config_vlan6 instead of config eth2_6 syntax either
Back to top
View user's profile Send private message
vetoll
n00b
n00b


Joined: 30 Nov 2011
Posts: 7

PostPosted: Wed Nov 30, 2011 7:29 am    Post subject: VLAN Config Reply with quote

Hi,

Did you come right?? I have exactly the same issue.
But if i load the VLANs manually using vconfig and ifconfig they work 100%??

but if i configure it as config_eth0_2=( "IP/Prefix") and then created a net.eth0.2 init script, it will start.
Back to top
View user's profile Send private message
abstr4kt
n00b
n00b


Joined: 22 Jul 2005
Posts: 19

PostPosted: Thu Dec 15, 2011 5:05 pm    Post subject: Reply with quote

Hi,

I have the same issue, on my gentoo-box
uname -a
Code:
Linux gentoo-box 3.0.4-hardened-r5 #1 SMP Tue Dec 13 00:06:40 CET 2011 x86_64 Intel(R) Xeon(TM) CPU 3.20GHz GenuineIntel GNU/Linux

emerge --info vconfig
Code:

Portage 2.1.10.11 (hardened/linux/amd64, gcc-4.5.3, glibc-2.13-r4, 3.0.4-hardened-r5 x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-3.0.4-hardened-r5-x86_64-Intel-R-_Xeon-TM-_CPU_3.20GHz-with-gentoo-2.0.3
Timestamp of tree: Wed, 14 Dec 2011 10:45:01 +0000
app-shells/bash:          4.1_p9
dev-lang/python:          2.7.2-r3, 3.1.4-r3
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.9.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.68
sys-devel/automake:       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: 2.6.39 (virtual/os-headers)
sys-libs/glibc:           2.13-r4
Repositories: gentoo
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /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"
CXXFLAGS="-march=nocona -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="ftp://tux.rainside.sk/gentoo/ http://gd.tuwien.ac.at/opsys/linux/gentoo/ ftp://mirrors.linuxant.fr/distfiles.gentoo.org/"
LANG="it_IT.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="it"
MAKEOPTS="-j3"
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=""
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="acl amd64 bash-completion bcmath berkdb bzip2 cdr cgi cli consolekit cracklib crypt ctype cxx dbus discard-path dri dvd fastcgi force-cgi-redirect gd gdbm gpm hardened http iconv icu javascript justify mmx mng modules mudflap multilib ncurses nls nptl nptlonly openmp pam pax_kernel pcre pppd readline session sse sse2 ssl svg symlink sysfs tcpd unicode ups urandom vim-syntax virtualbox webkit xml xorg 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" GRUB_PLATFORMS="pc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="it" NGINX_MODULES_HTTP="perl userid limit_req access auth_basic autoindex browser cache_purge charset empty_gif fastcgi gep gzip limit_zone map memcached referer rewrite scgi split_clients ssi upstream_ip_hash uwsgi" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="ati" 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, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

net-misc/vconfig-1.9 was built with the following:
USE="(multilib) -static"


vim /etc/conf.d/net
Code:

dns_domain_lo="public.company.it"
dns_server_eth0="8.8.8.8"
config_eth0="10.10.10.10"
routes_eth0="default via 10.10.10.1"
config_eth1="null"
vlans_eth1="25 30 40 50 ..."
vconfig_eth1="set_name_type VLAN_PLUS_VID_NO_PAD"
config_eth1_25="10.10.20.23 broadcast 10.10.20.255 netmask 255.255.255.0"
config_eth1_30="10.10.21.23 broadcast 10.10.21.255 netmask 255.255.255.0"
config_eth1_40="10.10.22.23 broadcast 10.10.22.255 netmask 255.255.255.0"
config_eth1_50="10.10.23.23 broadcast 10.10.23.255 netmask 255.255.255.0"
...
rc_need_eth1_25="net.eth1"
rc_need_eth1_30="net.eth1"
rc_need_eth1_40="net.eth1"
rc_need_eth1_50="net.eth1"
...


i also created an int link for every VLAN

Code:

cd /etc/init.d/
ln -s net.lo net.eth1.25
ln -s net.lo net.eth1.30
ln -s net.lo net.eth1.40
ln -s net.lo net.eth1.50
...

but those doesn't start automatically simply restarting eth1, so i got to manually run
Code:

vconfig add eth1 25
vconfig add eth1 30
vconfig add eth1 40
vconfig add eth1 50
...

#and then

/etc/init.d/net.eth1.25 start
/etc/init.d/net.eth1.30 start
/etc/init.d/net.eth1.40 start
/etc/init.d/net.eth1.50 start
...


and then the VLAN are up and running.
It seems that any vconfig declaration in the "net" script-file doesn't affect the system in noway... i need to manage several VLAN and if i reboot the box none of those come up blocking all kind of net-comunication and servicies in the box... whit the following error message:
Code:

*   ERROR: interface eth1.25 does not exist
*   Ensure that you have loaded the correct kernel module for your hardware
  * ERROR: net.eth1.25 failed to start
...
#[and all services on the same subnet]
...
*   ERROR: interface eth1.30 does not exist
*   Ensure that you have loaded the correct kernel module for your hardware
  * ERROR: net.eth1.30 failed to start
...
#[and all services on the same subnet]
...
*   ERROR: interface eth1.40 does not exist
*   Ensure that you have loaded the correct kernel module for your hardware
  * ERROR: net.eth1.40 failed to start
...
...
...


There's a way to make it work whitout the need of start all manually? Did anyone solved this?
Back to top
View user's profile Send private message
abstr4kt
n00b
n00b


Joined: 22 Jul 2005
Posts: 19

PostPosted: Sun Dec 18, 2011 6:41 pm    Post subject: Reply with quote

Hi again
i solved...
it seemed to me an issue but is only a missRTFM :oops:
Reading the other similar posts i found that installing iproute2 and configuring /etc/conf.d/net accordingly to /usr/share/doc/openrc-0.9.4/net.example.bz2 the vlan interfaces come up magicically bringing up the related interface, eth1 in my case.

this is my working config

Code:


vlans_eth1="21 22"
config_eth1="null"
vlan_start_eth1="yes"

vlan22_name="vlan22"
vlan22_flags="reorder_hdr off gvrp on loose_binding on"
config_vlan22="10.10.22.253/24 broadcast 10.10.22.255"
rc_need_eth1_22="net.eth1"

vlan23_name="vlan23"
vlan23_flags="reorder_hdr off gvrp on loose_binding on"
config_vlan23="10.10.23.253 netmask 255.255.255.0"
rc_need_eth1_23="net.eth1"



and this is what happen when i bring up the related interface (eth1)
Code:

~ # /etc/init.d/net.eth1 start
 * Bringing up interface eth1                                                                        [ ok ]
 *   Adding VLAN 22 to eth1
 *   Bringing up interface vlan22
 *     10.10.22.253/24 ...                                                                           [ ok ]
 *   Adding VLAN 23 to eth1
 *   Bringing up interface vlan226
 *     10.10.23.253 ...                                                                              [ ok ]


whitout the need to make any int link to net.lo script 8)
and of course you need the 802.1q support enabled in your kernel

Code:

~ # cat /usr/src/linux/.config |grep VLA
CONFIG_VLAN_8021Q=y
CONFIG_VLAN_8021Q_GVRP=y
# CONFIG_MACVLAN is not set





Thanks always to everyone and
hope this help.
Back to top
View user's profile Send private message
z0ny
Tux's lil' helper
Tux's lil' helper


Joined: 19 Mar 2005
Posts: 102
Location: Germany

PostPosted: Thu Feb 14, 2013 1:58 pm    Post subject: Reply with quote

Thanks, the most important information to me was that "sys-apps/iproute2" must be installed for this to work!
_________________
Old C programmers never die. They're just cast into void.
Back to top
View user's profile Send private message
sink128
n00b
n00b


Joined: 21 Jul 2005
Posts: 9

PostPosted: Fri Aug 02, 2013 4:52 pm    Post subject: Reply with quote

z0ny wrote:
Thanks, the most important information to me was that "sys-apps/iproute2" must be installed for this to work!

I second that.

http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4&chap=3#doc_chap10

is missing this info and I would have so much more hair if it just included this one line under "3.j. VLAN (802.1q support)"

Thanks z0ny.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum