Cannot forward traffic over wlan0 with bhyve
Fehmi Noyan ISI
fnoyanisi at yahoo.com
Sat May 21 12:06:12 UTC 2016
I found sometime (leftover time from a full-time work, a newborn and certificate study :/) today to give a try your advise.
This is what I ended up with;
- assigning an static IP address to tap0 on the host machine
- assigning an static IP address to vtnet0 on the guest machine
- use pf(4) to forward traffic from tap0 to wlan0
This works, but, as you pointed out, definitely not the optimum way of doing it.
I updated the forum entity  I created previously, in the hope that that would be useful for some googlers (I have some couple of people having a similar issue)
From: Trent Thompson <trentnthompson at gmail.com>
To: Fehmi Noyan ISI <fnoyanisi at yahoo.com>; FreeBSD virtualization <freebsd-virtualization at freebsd.org>
Sent: Friday, May 20, 2016 5:25 PM
Subject: Re: Cannot forward traffic over wlan0 with bhyve
I noticed in your forum post that you were trying to get a DHCP lease on your bhyve VM. Personally, I set my VM's over WiFi statically. I have written a quick guide to set this up on the iohyve wiki. It should work even if you do not use iohyve.
This set up may not be the most optimal, as it uses your host as a gateway, but it gets the job done for me. In the setup provided, my host (now a gateway) has an IP address of 10.10.123.1 on the "hyve" network, and my FreeBSD VM has an IP of 10.10.123.10, and a Windows VM with an IP address of 10.10.123.11 Note that I must set those IP Addresses statically inside of the VM for the internet to work.
I hope you found this helpful,
More information about the freebsd-virtualization