Solved VirtualBox FreeBSD Host/Guest VLAN issue?

Question:
Why do I have to put a FreeBSD VirtualBox guest machine's VLAN device into promiscuous mode to see VLAN traffic?

Background:
I have a FreeBSD 9.3-STABLE VirtualBox 4.3.18 host running a FreeBSD 10.1-STABLE guest. Host machine's NIC is configured in rc.conf as:

Code:
ifconfig_bce1="up"

VM is configured to use host's bce1 interface as a bridged interface vtnet1 (virtio-net). VM has guest additions installed. I currently have the VM's rc.conf configured as:

Code:
cloned_interfaces="vlan44 vlan45"
ifconfig_vtnet1="up"
ifconfig_vlan44="inet 192.168.44.1 netmask 255.255.255.0 vlan 44 vlandev vtnet1"
ifconfig_vlan45="inet 192.168.45.1 netmask 255.255.255.0 vlan 45 vlandev vtnet1"
Device vtnet1 nor bce1 have IP addresses configured. I can only pass traffic when I issue ifconfig vtnet1 promisc.

I figured this out accidentally when I started running tcpdump to troubleshoot and I started getting ping responses. Responses stopped when tcpdump was stopped. So at this point, I changed the guest rc.conf to:

Code:
ifconfig_vtnet1="up promisc"
Now when the VM boots, I can access VLAN's 44 and 45. Is this the correct behavior, or am I missing something?

Edit:
I have tried combinations of setting up the VLAN's on the host machine and setting bce1 to promiscuous mode without any success. Also, all interfaces are set[]up in VirtualBox with Promiscuous mode set to "Allow all".
 
Interesting. What is the output of netstat -s -p arp vtnet1 or the same command without an interface? Does it show the system receiving or sending ARP requests? Does ifconfig show the same MAC address as Virtualbox shows? Does it make any difference with a different driver? Perhaps try setting Virtualbox to use an Intel NIC for the VM and setting up the same configuration with an em NIC and see if that makes a difference.
 
Back
Top