Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 71860 - dhcpcd does not support VLAN
Summary: dhcpcd does not support VLAN
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Roy Marples (RETIRED)
Keywords: InVCS
Depends on:
Blocks: 66472
  Show dependency tree
Reported: 2004-11-20 10:20 UTC by Ioannis Aslanidis (RETIRED)
Modified: 2004-12-04 04:05 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Ioannis Aslanidis (RETIRED) gentoo-dev 2004-11-20 10:20:44 UTC
I've tried to setup my NIC as a VLAN and I obtained the following:

 *    Bringing up eth0.2
 *       eth0.2 dhcp
/lib/rcscripts/net.modules.d/dhcpcd: line 110: ${dhcpcd_eth0.2}: bad substitution
/lib/rcscripts/net.modules.d/dhcpcd: line 113: ${peer_dns_eth0.2}: bad substitution
/lib/rcscripts/net.modules.d/dhcpcd: line 117: ${peer_nis_eth0.2}: bad substitution
/lib/rcscripts/net.modules.d/dhcpcd: line 121: ${peer_ntp_eth0.2}: bad substitution
 *          Running dhcpcd ...                                            [ !! ]

If I assign a statical address, it works, but the dhcpcd script doesn't. BTW, I've tried to do that manually and dhcpcd is not able to get a dynamic address for the VLAN.

Additionally, when setting VLAN and taking away any options of the base card, it the system automatically uses dhcpcd which is definitely wrong in this case.

For instance:

Example 1
eth0 --> nothing
eth0_1 --> (static)
eth0_2 --> dhcpcd

What happens:
dhcpcd is run for eth0 [wrong]
eth0_1 is set to [correct]
eth0_2 returns the top output [wrong]

Example 2
eth0 --> null
eth0_1 --> (static)
eth0_2 --> dhcpcd

What happens:
eth0 is not set [correct]
eth0_1 is set to [correct]
eth0_2 returns the top output [wrong]


eth0_1: # ifconfig eth0_1
eth0_2: # dhcpcd eth0_2
[does nothing]
# dhcpcd eth0.2
[does nothing]

Reproducible: Always
Steps to Reproduce:

Portage 2.0.51-r3 (gcc34-x86-2004.2, gcc-3.4.3, glibc-,
2.6.9-gentoo-r4 i686)
System uname: 2.6.9-gentoo-r4 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz
Gentoo Base System version 1.6.6
distcc 2.18.2 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59-r5
Automake: sys-devel/automake-1.8.5-r1
Binutils: sys-devel/binutils-
Headers:  sys-kernel/linux26-headers-
Libtools: sys-devel/libtool-1.5.2-r7
CFLAGS="-O3 -march=pentium4 -ftracer -fomit-frame-pointer -ffast-math -pipe
-fforce-addr -fforce-mem -falign-functions=4"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown
/usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/
/usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/
/usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -march=pentium4 -ftracer -fomit-frame-pointer -ffast-math -pipe
-fforce-addr -fforce-mem -falign-functions=4"
FEATURES="autoaddcvs buildpkg ccache distcc distlocks fixpackages sandbox
USE="X acpi acpi4linux alsa apache2 apm arts audiofile avi berkdb bitmap-fonts
blender-game bluetooth bootsplash bzlib c++ caps cddb cdinstall cdparanoia cdr
cdrom chroot clamav clanVoice codecs crypt cups curl dga dio directfb divx4linux
dvd dvdr dvdread encode erandom esd ethereal f77 fastcgi fbcon flac flash
foomaticdb fortran freetype gd gdbm gif gimp gimpprint gmp gpm gstreamer gtk
gtk2 icq imagemagick imlib ipv6 java jikes jpeg junit kde lcms libg++ libwww
live mad memlimit mikmod mmx mmx2 motif mpeg msn ncurses network nls nocd nptl
nptlonly oggvorbis opengl oss pam pdflib perl pic png ppds python qt quicktime
readline rtc samba sdl session slang spell sse sse2 ssl svg svga szip tcltk tcpd
tetex tiff truetype ttf unicode usb userlocales v4l v4l2 videos wmf x86 xml xml2
xmms xv xvid zlib video_cards_sis linguas_es linguas_el"
Comment 1 Max Kalika (RETIRED) gentoo-dev 2004-11-21 10:11:54 UTC
I'm sorry, I don't maintain dhcpcd (client).  Please reassign.
Comment 2 Roy Marples (RETIRED) gentoo-dev 2004-11-21 12:16:39 UTC
 *    Bringing up eth0.2
 *       eth0.2 dhcp
/lib/rcscripts/net.modules.d/dhcpcd: line 110: ${dhcpcd_eth0.2}: bad substitution
/lib/rcscripts/net.modules.d/dhcpcd: line 113: ${peer_dns_eth0.2}: bad substitution
/lib/rcscripts/net.modules.d/dhcpcd: line 117: ${peer_nis_eth0.2}: bad substitution
/lib/rcscripts/net.modules.d/dhcpcd: line 121: ${peer_ntp_eth0.2}: bad substitution
 *          Running dhcpcd ...                                            [ !! ]

I have those four errors fixed in CVS

Please note that dhcp IS the default - you need to set NULL otherwise which you correctly did in example 2.

However, I cannot get any DHCP client in portage (dhcpcd, dhclient, udhcpc, pump) to work over a VLAN device so I'm guessing that VLAN is at fault. I'm not a VLAN expert, but I found the below link

It seems to say that DHCP works if header-reordering is on, but it IS on by default on my setup.

I'll need assistance to fix this one if possible - for now I'm just noting that dhcp does not work over vlan in net.example
Comment 3 Ioannis Aslanidis (RETIRED) gentoo-dev 2004-11-21 12:45:31 UTC
OK, I'll wait for a mirror update and tomorrow morning I'll try again. Perhaps I should add a VLAN HOWTO in my TODO list for Gentoo Documentation. So who is this bug gonna be assigned to now?
Comment 4 Roy Marples (RETIRED) gentoo-dev 2004-11-21 13:42:06 UTC
Sorry - fixed in gentoo-src CVS. You'll have to wait until azarah or agriffis rolls a new ebuild for baselayout.

solar is the vconfig maintainer, so I guess he should take it.
Comment 5 solar (RETIRED) gentoo-dev 2004-11-22 07:52:07 UTC
Roy, What do you want me todo? Why is this assigned to me?
I maintain vconfig, but I have nothing todo with the baselayout scripts.
Comment 6 Roy Marples (RETIRED) gentoo-dev 2004-11-22 15:01:41 UTC
After being given a crash course in VLAN by Tigger^ in #gentoo-dev I'm able to get a DHCP address over VLAN now :)

Hopefully have a fix rolled soon
Comment 7 Ioannis Aslanidis (RETIRED) gentoo-dev 2004-11-22 15:33:50 UTC
That will be nice! Did you log the conversation? I'd like to read it, it might be useful for me too :)
Comment 8 Roy Marples (RETIRED) gentoo-dev 2004-11-23 08:28:42 UTC
Fixed in CVS

Will be in baselayout-1.11.7
Comment 9 Ioannis Aslanidis (RETIRED) gentoo-dev 2004-11-23 09:20:46 UTC
Awaiting mirror update :)
Comment 10 Roy Marples (RETIRED) gentoo-dev 2004-12-04 03:52:35 UTC
Fixed in baselayout-1.11.7-r1
Comment 11 Ioannis Aslanidis (RETIRED) gentoo-dev 2004-12-04 04:05:45 UTC
Thank you. Now let's see if I can handle to get it work.