For my office I am trying to set up a VLAN for a (Nextcloud) VM which is running on top of a FreeBSD server, which is running behind a pfSense firewall and a Mikrotik Switch.
The VLAN 30 is created on the pfSense firewall and is connected to a DHCP server on pfSense. (See the ifconfig of pfSense on the left column on enclosed picture. The VLAN (ix1.30) config is encircled in red.)
click picture to enlarge
On the Mikrotik Switch the 30 ID TAG is enabled (and recognized) on both the incoming (SFP1) and outgoing (S01-IGB0) port. (See the top middle column on enclosed picture encircled in red.)
As the DHCP server is on the pfSense machine, on Freebsd I only generated a (virtual) nic with the following command:
Which activated the (virtual) nic (on enclosed picture encircled in red on the bottom middle column.)
In the network settings of the (Nextcloud) VM, I actived igb0.30 as the nic to be used.
But when I boot the VM, it is waiting several minutes for the network to be configured, which never happens. (See enclosed picture encircled in red on the bottom right column)
Therefor it is my impression that the VM does not get an IP-Address from the (pfSense) DHCP server. But as there is very little documentation about setting up VLAN's on Freebsd, especially about this situation where Freebs is NOT the DHCP server, but just functions as a pass trough station, I don't know if I did this the rightway.
So I wonder:
The VLAN 30 is created on the pfSense firewall and is connected to a DHCP server on pfSense. (See the ifconfig of pfSense on the left column on enclosed picture. The VLAN (ix1.30) config is encircled in red.)
click picture to enlarge
On the Mikrotik Switch the 30 ID TAG is enabled (and recognized) on both the incoming (SFP1) and outgoing (S01-IGB0) port. (See the top middle column on enclosed picture encircled in red.)
As the DHCP server is on the pfSense machine, on Freebsd I only generated a (virtual) nic with the following command:
ifconfig igb0.30 create vlan 30 vlandev igb0
Which activated the (virtual) nic (on enclosed picture encircled in red on the bottom middle column.)
In the network settings of the (Nextcloud) VM, I actived igb0.30 as the nic to be used.
But when I boot the VM, it is waiting several minutes for the network to be configured, which never happens. (See enclosed picture encircled in red on the bottom right column)
Therefor it is my impression that the VM does not get an IP-Address from the (pfSense) DHCP server. But as there is very little documentation about setting up VLAN's on Freebsd, especially about this situation where Freebs is NOT the DHCP server, but just functions as a pass trough station, I don't know if I did this the rightway.
So I wonder:
- If I do something wrong in the setup of the freeBSD part in this particular situation? If so, how should it be done then? Suggestions are very welcome.
- If things are set up right by me as far as it concerns the FreeBSD part, I would appreciate it very much if somebody could enlighten what I might be doing wrong in the pfSense or MikroTik part.