VLAN Issue

Status
Not open for further replies.

raidflex

Guru
Joined
Mar 14, 2012
Messages
531
I am trying to enable VLAN support on Freenas in order to segregate traffic to specific VM/Jail's. I already have the VLANs setup on my network and configured the switch port for Freenas as a trunk port with the proper VLAN ID. After setting up the VLAN in Freenas and selecting the VLAN for the NIC on the VM, the VM in this case Ubuntu 16.04 will not receive an IP from the DHCP server. Even if I input a static IP/gateway, I still have no network connectivity.

I noticed that if I enable DHCP within the VLAN settings in Freenas the proper IP from the proper VLAN is assigned, but there seems to be an issue with the VM acquire network connectivity when selecting that VLAN for the NIC.

I also noticed that after creating the VLAN, I cannot select my main NIC interface for the VM NIC, only the VLAN or secondary NIC is available. I am not sure if this is normal.


ifconfig:

Code:
igb0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=2400b9<RXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,VLAN_HWTSO,RXCSUM_IPV6>
	ether 00:25:90:86:75:ae
	hwaddr 00:25:90:86:75:ae
	inet 10.10.*.* netmask 0xffffff00 broadcast 10.10.*.255 
	inet 10.10.*.* netmask 0xffffff00 broadcast 10.10.*.255 
	inet 10.10.*.* netmask 0xffffff00 broadcast 10.10.*.255 
	inet 10.10.*.* netmask 0xffffff00 broadcast 10.10.*.255 
	inet 10.10.*.* netmask 0xffffff00 broadcast 10.10.*.255 
	nd6 options=9<PERFORMNUD,IFDISABLED>
	media: Ethernet autoselect (1000baseT <full-duplex>)
	status: active
igb1: flags=8c02<BROADCAST,OACTIVE,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=6403bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,VLAN_HWTSO,RXCSUM_IPV6,TXCSUM_IPV6>
	ether 00:25:90:86:75:af
	hwaddr 00:25:90:86:75:af
	nd6 options=9<PERFORMNUD,IFDISABLED>
	media: Ethernet autoselect
	status: no carrier
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
	options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
	inet6 ::1 prefixlen 128 
	inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3 
	inet 127.0.0.1 netmask 0xff000000 
	nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
	groups: lo 
vlan30: flags=8942<BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=200001<RXCSUM,RXCSUM_IPV6>
	ether 00:25:90:86:75:ae
	nd6 options=9<PERFORMNUD,IFDISABLED>
	media: Ethernet autoselect (1000baseT <full-duplex>)
	status: active
	vlan: 30 vlanpcp: 0 parent interface: igb0
	groups: vlan 
bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	ether 02:a7:70:44:4d:00
	nd6 options=9<PERFORMNUD,IFDISABLED>
	groups: bridge 
	id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
	maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200
	root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
	member: vnet0:1 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
			ifmaxaddr 0 port 6 priority 128 path cost 2000
	member: igb0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
			ifmaxaddr 0 port 1 priority 128 path cost 20000
vnet0:1: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
	description: associated with jail: Plex
	options=8<VLAN_MTU>
	ether 02:ff:60:31:41:ea
	hwaddr 02:9f:50:00:06:0a
	nd6 options=1<PERFORMNUD>
	media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
	status: active
	groups: epair 
bridge1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	ether 02:a7:70:44:4d:01
	nd6 options=1<PERFORMNUD>
	groups: bridge 
	id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
	maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200
	root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
	member: vlan30 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
			ifmaxaddr 0 port 4 priority 128 path cost 20000


Screenshot from 2018-01-12 10-12-31.png
Screenshot from 2018-01-12 10-57-29.png
 

Nick2253

Wizard
Joined
Apr 21, 2014
Messages
1,633
If you configure the VM to be attached to igb0, does the networking work?
 

raidflex

Guru
Joined
Mar 14, 2012
Messages
531
If you configure the VM to be attached to igb0, does the networking work?

I can't because after adding the VLAN in Freenas igb0 is not an option under the VM NIC. If I delete the VLAN, then I can select igb0 interface again.
 

Nick2253

Wizard
Joined
Apr 21, 2014
Messages
1,633

Nick2253

Wizard
Joined
Apr 21, 2014
Messages
1,633
If you add just one VLAN to the interface, and you put FreeNAS on that VLAN, will FreeNAS be on that VLAN?

I'll be honest, I think it's a bug that you can't put a VM on the main interface if you have VLANs configured. There's no reason why a VM couldn't be on the untagged vlan.
 
D

dlavigne

Guest
If you add just one VLAN to the interface, and you put FreeNAS on that VLAN, will FreeNAS be on that VLAN?

I'll be honest, I think it's a bug that you can't put a VM on the main interface if you have VLANs configured. There's no reason why a VM couldn't be on the untagged vlan.

Agreed. @raidflex please create a feature request at bugs.freenas.org and post the issue number here.
 

raidflex

Guru
Joined
Mar 14, 2012
Messages
531
Hopefully it get fixed in 11.2
 
Status
Not open for further replies.
Top