Dear @ll,
I'm a bit stuck and would highly appreciate, if someone could help me out or point me in the right direction.
I'm trying to use netgraph to bridge between a bhyve vm and my actual network (LAN). The goal is to get the router's DHCP server assign an IP addr to the bhyve vm (mac: 58:9c:fc:07:7c:be) . I can see the BOOTP/DHCP request arriving on my physical NIC (ix1) attached to the netgraph bridge, but I can't see any of these packets arriving at the router on the actual network.
My setup:
What am I missing here?
I am also aware of the Klara article, but I can't see where I'am wondering into the woods.
I'm a bit stuck and would highly appreciate, if someone could help me out or point me in the right direction.
I'm trying to use netgraph to bridge between a bhyve vm and my actual network (LAN). The goal is to get the router's DHCP server assign an IP addr to the bhyve vm (mac: 58:9c:fc:07:7c:be) . I can see the BOOTP/DHCP request arriving on my physical NIC (ix1) attached to the netgraph bridge, but I can't see any of these packets arriving at the router on the actual network.
Code:
#bhyve host, tcpdump -i ix1
IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 58:9c:fc:07:7c:be (oui Unknown), length 300
Code:
------------ --------
| | | |
| bhyve host |ix1 ------<LAN>--------- ix1| Router |
| | | DHCP |
| | | |
------------ --------
|
|
-------
| ngbr0 |
-------
|
|
-------------
| bhyve VM |
| DHCP Request|
-------------
My setup:
bhyve host | Comments |
Code:
| Create an unnamed bridge node an attach ix1:lower to unnamed:link0. |
Code:
| Name unamed bridge node to ngbr0. |
Code:
| Attach ix1:upper to ngbr0:link1 so we can use ix1 as a host interface. |
Code:
| Enable promiscuous mode, to ensure that the interface will pick up all network packet. |
Code:
| Don't overwrite the source address on packets. |
Code:
| Configure ngbr0 as virtual switch for bhyve. |
Code:
# bhyve host
$ ifconfig ix1
ix1: flags=1028943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST,PPROMISC,LOWER_UP> metric 0 mtu 1500
options=4813838<VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,WOL_UCAST,WOL_MCAST,WOL_MAGIC,VLAN_HWFILTER,HWSTATS,MEXTPG>
ether XX:XX:XX:XX:XX:XX
media: Ethernet autoselect (10Gbase-T <full-duplex>)
status: active
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
Code:
# bhyve host, display netgraph configuration before vm startup
$ ngctl show ngbr0:
Name: ngbr0 Type: bridge ID: 00000171 Num hooks: 2
Local hook Peer name Peer type Peer ID Peer hook
---------- --------- --------- ------- ---------
link1 ix1 ether 00000095 upper
link0 ix1 ether 00000095 lower
Code:
# bhyve host, display switch configuration
$ vm switch list
NAME TYPE IFACE ADDRESS PRIVATE MTU VLAN PORTS
ngbr0 netraph netgraph,path=ngbr0:,peerhook=link2 n/a n/a n/a n/a n/a
bhyve vm | Comments |
Code:
| bhyve vm network configuration |
Code:
# bhyve host, display bhyve vm attached to ngbr0:link2 after vm startup
$ ngctl show ngbr0:
Name: ngbr0 Type: bridge ID: 00000171 Num hooks: 3
Local hook Peer name Peer type Peer ID Peer hook
---------- --------- --------- ------- ---------
link2 <unnamed> socket 00000180 vmlink
link1 ix1 ether 00000095 upper
link0 ix1 ether 00000095 lower
What am I missing here?
I am also aware of the Klara article, but I can't see where I'am wondering into the woods.