Hi there,
I have a VM running FreeBSD-CURRENT in bhyve but I could not get the network working properly.
I created tap0 and bridge0 interfaces as described in the relevant chapter of the handbook. I have only a wireless NIC, so I followed the advice in bhyve wiki page and created proper pf(4) rules (the suggested rule-set is not correct, already filed a bug report for that, and if somebody will look at it, hopefully the pf rules in the wiki page will be updated).
This is my ifconfig(8)
So, tap0 and bridge0 are created...
I start the VM as follows
and run
inside the VM. None of DHCP requests get a reply....
When I use
tcpdump for wlan0
tcpdump for tap0
So, why the VM cannot get any DHCP replies from the AP?
Thanks
I have a VM running FreeBSD-CURRENT in bhyve but I could not get the network working properly.
I created tap0 and bridge0 interfaces as described in the relevant chapter of the handbook. I have only a wireless NIC, so I followed the advice in bhyve wiki page and created proper pf(4) rules (the suggested rule-set is not correct, already filed a bug report for that, and if somebody will look at it, hopefully the pf rules in the wiki page will be updated).
This is my ifconfig(8)
Code:
em0: flags=8c02<BROADCAST,OACTIVE,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=4219b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_MAGIC,VLAN_HWTSO>
ether b8:6b:23:1c:44:17
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
media: Ethernet autoselect
status: no carrier
iwn0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 2290
ether 88:53:2e:14:73:dc
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
media: IEEE 802.11 Wireless Ethernet autoselect mode 11ng
status: associated
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>
bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 02:b2:10:28:d0:00
nd6 options=9<PERFORMNUD,IFDISABLED>
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: tap0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
ifmaxaddr 0 port 5 priority 128 path cost 2000000
member: wlan0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
ifmaxaddr 0 port 6 priority 128 path cost 33333
tap0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=80000<LINKSTATE>
ether 00:bd:3b:15:00:00
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
media: Ethernet autoselect
status: active
Opened by PID 1473
wlan0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 88:53:2e:14:73:dc
inet 192.168.1.67 netmask 0xffffff00 broadcast 192.168.1.255
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
media: IEEE 802.11 Wireless Ethernet MCS mode 11ng
status: associated
ssid TELECOM-U5QA29 channel 8 (2447 MHz 11g ht/20) bssid 9c:c1:72:0d:bd:cc
country US authmode WPA2/802.11i privacy ON deftxkey UNDEF
TKIP 2:128-bit powersavemode CAM powersavesleep 100 txpower 15
bmiss 10 scanvalid 60 bgscan bgscanintvl 300 bgscanidle 250
roam:rssi 7 roam:rate 64 protmode CTS ampdulimit 64k ampdudensity 8
-amsdutx amsdurx shortgi wme roaming MANUAL
ue0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 02:80:37:ec:02:00
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
I start the VM as follows
Code:
./vmrun.sh -f FreeBSD-CURRENT.img freebsd-current
Code:
dhclient vtnet0
When I use
tcpdump
to monitor wlan0 and tap0, I can see that DHCP requests are coming from tap0 and passed to wlan0, but I get no replies...tcpdump for wlan0
Code:
root@fbsd:/home/fnoyanisi/extra/byhve # tcpdump -i wlan0 port 67 or port 68
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on wlan0, link-type EN10MB (Ethernet), capture size 65535 bytes
00:25:08.519149 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:a0:98:bb:af:1f (oui Unknown), length 300
00:25:11.612258 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:a0:98:bb:af:1f (oui Unknown), length 300
00:25:18.635172 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:a0:98:bb:af:1f (oui Unknown), length 300
00:25:25.736099 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:a0:98:bb:af:1f (oui Unknown), length 300
^C
4 packets captured
26 packets received by filter
0 packets dropped by kernel
Code:
root@fbsd:/home/fnoyanisi # tcpdump -i tap0
tcpdump: WARNING: tap0: no IPv4 address assigned
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on tap0, link-type EN10MB (Ethernet), capture size 65535 bytes
00:25:07.880578 ARP, Reply 192.168.1.66 is-at 00:ee:bd:a2:f8:cf (oui Unknown), length 28
00:25:08.519103 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:a0:98:bb:af:1f (oui Unknown), length 300
00:25:11.612214 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:a0:98:bb:af:1f (oui Unknown), length 300
00:25:18.635130 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:a0:98:bb:af:1f (oui Unknown), length 300
00:25:25.736063 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:a0:98:bb:af:1f (oui Unknown), length 300
^C
5 packets captured
5 packets received by filter
0 packets dropped by kernel
So, why the VM cannot get any DHCP replies from the AP?
Thanks