Re: Cannot forward traffic over wlan0 with bhyve

2016-06-13 Thread Bernd Walter
On Thu, May 19, 2016 at 08:50:15PM +, Fehmi Noyan ISI via 
freebsd-virtualization wrote:
> Hi there,
> 
> As I mentioned in this forum post [1], I am having issues with getting my 
> FreeBSD-CURRENT VM connected to the Internet via wlan0 interface.
> 
> I created tap0 and bridge0 interfaces, and edited configuration files to keep 
> changes permanent as suggested by the handbook [2].
> 
> I also set the pf rules to enable NAT between tap0 and wlan0 interfaces as 
> described here [3].
> 
> 
> When I monitor tap0 and wlan0 interfaces with tcpdump while running "dhclient 
> vtnet0" in the guest OS, I noticed that tap0 forwards packets to wlan0 and 
> wlan0 recevies them (some tcpdump output is in [1]). But nothing happens 
> after this...
> 
> I also noticed that the pf fails to start with the ruleset given in [3], and 
> having paranhtesis around (bridge0:network) solves the issue, so I filed a 
> bug report for this [4].
> 
> I need assistance with my VM internet access and will appreciate you guidance 
> on the matter.

It's been a few weeks old, but still unanswered.
The problem is that as a wifi client only a single MAC address is
registered with the AP.
The systems behind the bridge have their own MAC addresses, which
the AP doesn't know.
You either need to setup your wifi with mesh support, run the
bridge on the AP instead of the client side, or run dirty tricks
with proxy ARP.
The best option would be to avoid bridging from wifi completely and
route a different net to your vm host or use a cable.

-- 
B.Walter  http://www.bwct.de
Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Re: Cannot forward traffic over wlan0 with bhyve

2016-05-21 Thread Fehmi Noyan ISI via freebsd-virtualization
Thanks Trent!

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 [1] I created previously, in the hope that that 
would be useful for some googlers (I have some couple of people having a 
similar issue)


[1] https://forums.freebsd.org/threads/56285/

From: Trent Thompson 
To: Fehmi Noyan ISI ; FreeBSD virtualization 
 
Sent: Friday, May 20, 2016 5:25 PM
Subject: Re: Cannot forward traffic over wlan0 with bhyve



Fehmi,

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. 
https://github.com/pr1ntf/iohyve/wiki/Using-iohyve-over-WiFi

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, 
-Trent
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Re: Cannot forward traffic over wlan0 with bhyve

2016-05-19 Thread Trent Thompson
Fehmi,

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.
https://github.com/pr1ntf/iohyve/wiki/Using-iohyve-over-WiFi

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,
-Trent
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Cannot forward traffic over wlan0 with bhyve

2016-05-19 Thread Fehmi Noyan ISI via freebsd-virtualization
Hi there,

As I mentioned in this forum post [1], I am having issues with getting my 
FreeBSD-CURRENT VM connected to the Internet via wlan0 interface.

I created tap0 and bridge0 interfaces, and edited configuration files to keep 
changes permanent as suggested by the handbook [2].

I also set the pf rules to enable NAT between tap0 and wlan0 interfaces as 
described here [3].


When I monitor tap0 and wlan0 interfaces with tcpdump while running "dhclient 
vtnet0" in the guest OS, I noticed that tap0 forwards packets to wlan0 and 
wlan0 recevies them (some tcpdump output is in [1]). But nothing happens after 
this...

I also noticed that the pf fails to start with the ruleset given in [3], and 
having paranhtesis around (bridge0:network) solves the issue, so I filed a bug 
report for this [4].

I need assistance with my VM internet access and will appreciate you guidance 
on the matter.

Thanks in advance
Fehmi


[1] https://forums.freebsd.org/threads/56285/
[2] https://www.freebsd.org/doc/handbook/virtualization-host-bhyve.html
[3] https://wiki.freebsd.org/bhyve
[4] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=209479
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"