Pulling my hair out over vlans

Status
Not open for further replies.

Cainram

Dabbler
Joined
Jan 23, 2014
Messages
31
I have a FreeNAS-9.3-STABLE-201601181840 server hosting an OwnCloud jail. I've had the system up and running for over a month with no issues. We run all server traffic on vlan 10 in a 10.10.x.x subnet. Most devices handle vlans well but for the ones that don't we configure a port on the router with vlan 10 untagged to force all traffic into the appropriate subnet. This is what we had been doing with the FreeNAS server since we never got vlans working correctly on FreeNAS. We now are replacing the switch and would like to have all the ports the same, passing vlan 10 traffic tagged. I have checked the documentation and my NIC (em) supports vlans. I have configured the vlan interface many times, carefully following the documentation, and I simply cannot pass traffic. I have done this via both the GUI and the console menu. I even looked into editing the appropriate conf file but I see in the comments that the settings therein get overwritten by those in the database, so I didn't bother. There is obviously something I don't understand going on here. For example: how do I set the static IP of the vlan interface? Or the gateway, for that matter? The documentation says that the parent interface can be either configured or not configured... If that is the case, does the vlan automatically get set to DHCP? I don't have a DHCP server offering addresses on that subnet. And I need the server to have a static IP so I can forward outside traffic to it... Again, there is something I don't understand here and I'm hoping someone can hold my hand here a bit. Thanks in advance.
 

Mlovelace

Guru
Joined
Aug 19, 2014
Messages
1,111
Network --> VLANs --> Add VLAN --> virtual interface (vlan10), add parent interface (whatever the NIC is), add vlan Tag: 10 --> Network --> Interfaces --> add Interface --> NIC: vlan10, Name: vlan10, IP: xxx.xxx.xxx.xxx, Subnet: /24(guessing)

NOW REBOOT

It doesn't say it in the docs but you must reboot for the new VLAN virtual interface that was created in the steps above to work.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
I can assure you that vlans work perfectly on FreeBSD and on FreeNAS.

Don't configure the parent interface with anything but "up". Configuring IP information "works" but is like the stupidest configuration trick ever.

However, the exact steps the middleware needs to take to properly unconfigure the networking has always been a bit of a nightmare, and as @Mlovelace notes, you're definitely best off rebooting after setting up vlan stuff, because several rounds of "try this"/"try that" can leave the FreeBSD networking stack in a partially configured state that the code is simply not good enough to unwind out of. So, configure, reboot, THEN test.

Also, avoid DHCP. A NAS ought to be wired down, and creating additional dependencies is likely to introduce complications.
 
Status
Not open for further replies.
Top