# VLANs and DHCP (client)



## Criena (May 17, 2015)

Hi,

I'm new to FreeBSD (coming from Debian Linux) and have my first trouble with setting up a server that is connected to two VLANs (tagged port).

The problem is getting an IP address via DHCP, which seems like it is a similar issue as https://forums.freebsd.org/threads/rc-conf-vlan-and-dhclient.7321/ -- just that I still can't get it to work.

I tried two different ways of setup:


```
vlans_igb1="21 124"
ifconfig_igb1="up"
ifconfig_igb1_21="DHCP"
ifconfig_igb1_124="DHCP"
```
and


```
cloned_interfaces="vlan21 vlan124"
ifconfig_igb1="up"
ifconfig_vlan21="vlan 21 vlandev igb1 dhcp"
ifconfig_vlan124="vlan 124 vlandev igb1 dhcp"
```
Both ways get me the respective interfaces (igb1.21 and igb.124 or vlan21 and vlan124), but in neither of the cases there is a dhclient doing its job.

The VLANs itself do work, since when starting dhclient manually, I get an address right away.

Any clues -- much appreciated?

Thanks
Criena


----------



## diizzy (May 23, 2015)

Does it work if you have one interface enabled?
//Danne


----------



## Criena (May 24, 2015)

Hi Danne,

igb0 is enabled and gets an IP address via DHCP (no VLANs active on that link though).

Criena


----------



## Latik (Sep 24, 2015)

Try

```
synchronous_dhclient="YES"
```


----------

