[VLAN] Using DHCPc on a VLAN interface
Sylvain Beucler
beuc at beuc.net
Thu Sep 14 03:25:43 PDT 2006
Hello,
I'd like to assign an IP to a vlan interface using DHCP (or to put it
another way, 2 dynamic IP adresses on the same MAC).
However, when using 'dhclient -cf ./dhclient.conf eth0.5', dhclient
tries to broadcast a DHCP request, but nothing comes out of the wire -
hence he doesn't get any offer. Actually iptables' OUTPUT doesn't see
any packet going out.
I tried with set_flag 1 but that didn't help. I also tried to specify
explicitely the dhcp server, in case the broadcasting was the issue,
but that doesn't change anything either.
The DHCP server itself does support multiple IPs on a single MAC
adress, by setting dhcp-client-identifier in dhclient.conf (I
validated this by getting several leases using different identifiers
on the same non-vlan interface).
Shouldn't it work?
Thanks :)
Background:
~~~~~~~~~~~
I want to reproduce this demo tikiwiki setup:
http://tikiwiki.org/tiki-read_article.php?articleId=130
but using VServer (linux-vserver.org) instead of proprietary VMWare :)
So I'd like to start a vserver on a laptop machine, and attribute a
second IP to that vserver via DHCP, on the default (unique) interface.
The old version of VServer tools did support this out of the box:
http://www.solucorp.qc.ca/changes.hc?projet=vserver&version=0.40#Using%20DHCP%20on%20vservers
(the new one doesn't)
The code
(ftp://ftp.solucorp.qc.ca/pub/vserver/vserver-0.40.src.tar.gz)
apparently creates a vlan eth0.x interface and starts dhclient on
it.
Workaround: I managed to assign 2 IPs via DHCP on 2 different MACs
using the Candela macvlan patch, but I'd like to do it without - after
all, the vservers guys did it once and I'd like to know how! I'd also
like to publish this tikiwiki demo under the form of a chroot-able
tarball, which wouldn't require any kernel patching (nor vserver, nor
macvlan).
Any clue? :)
--
Sylvain
More information about the Vlan
mailing list