How to make two vlans on one interface working with dhclient

Brooks Davis brooks at freebsd.org
Thu Aug 21 18:43:27 UTC 2008


On Wed, Aug 20, 2008 at 03:13:00PM +0200, Popof Popof wrote:
> Hi,
> I have a FreeBSD 6.0 box andi need to configure it in a way that I must use
> 2 vlans under one interface and both of them will get an address thanks to
> dhclient.
> 
> So in order to make this job I created vlans:
> 
>  ifconfig rl0.100 create
> ifconfig rl0.2101 create
> The vlans are created without any problem.
> But I also want to retrieve an diffrent ip address from a dhcpd server on
> the two of them.
> I've made a specific dhclient.conf for each one:
> 
> interface "rl0.100" {
> #My options
> }
> interface "rl0.2101" {
> #My options
> }

Unless it's absolutly necessicary I don't recommend using dhclient.conf.  I
don't test it.

> When I launch dhclient on only one interface (100 or 2101) it's works fine
> and I get an ip address (class B on vlan 100 and class A on vlan 2101).
> But if I launch dhclient on the second interface it's make an error:
> 
> dhclient: Can't bind to dhcp address: Address already in use. Please make
> sure there is no other dhcp server runing and that there's no entry for dhcp
> or bootp in /etc/inetd.conf
>
> Does someone had an idea about how to fix this problem and having my two
> vlans working with dhclient?

The current dhclinet scripts don't really support this case.  In theory if you
removed support for default routes and resolv.conf setting it should probably
work, but it's certainly not something I'd expect to work.

-- Brooks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-net/attachments/20080821/681c5fd7/attachment.pgp


More information about the freebsd-net mailing list