Hi, very simple:
vm-bhyve, Linux VM, NAT via pf enabled on em0 (internet facing).
When I assign fixed 10.0.0.10/24 in the Linux VM, NAT works. But I want DHCP via dnsmasq.
My current config is:
But when I boot the Linux VM (vm start rocky), dnsmasq shows (below) and VM obtains the IP 192.168.50.147 from the main home router (DHCP server), network 192.168.50.0/24.
NAT is 10.0.0.0/24.
vm-bhyve, Linux VM, NAT via pf enabled on em0 (internet facing).
When I assign fixed 10.0.0.10/24 in the Linux VM, NAT works. But I want DHCP via dnsmasq.
My current config is:
Code:
port=0
domain-needed
no-resolv
except-interface=lo0
bind-interfaces
local-service
dhcp-authoritative
interface=vm-public
dhcp-range=10.0.0.50,10.0.0.100
But when I boot the Linux VM (vm start rocky), dnsmasq shows (below) and VM obtains the IP 192.168.50.147 from the main home router (DHCP server), network 192.168.50.0/24.
NAT is 10.0.0.0/24.
Code:
$ doas dnsmasq --no-daemon --log-debug --log-queries --log-dhcp -C /usr/local/etc/dnsmasq.conf
dnsmasq: started, version 2.90 DNS disabled
dnsmasq: compile time options: IPv6 GNU-getopt no-DBus no-UBus i18n IDN2 DHCP DHCPv6 no-Lua TFTP no-conntrack ipset no-nftset auth cryptohash DNSSEC loop-detect no-inotify dumpfile
dnsmasq-dhcp: DHCP, IP range 10.0.0.50 -- 10.0.0.100, lease time 1h
dnsmasq-dhcp: 3952934702 available DHCP range: 10.0.0.50 -- 10.0.0.100
dnsmasq-dhcp: 3952934702 client provides name: rocky
dnsmasq-dhcp: 3952934702 DHCPREQUEST(vm-public) 192.168.50.147...............................
dnsmasq-dhcp: 3952934702 DHCPNAK(vm-public) 192.168.50.147 ..................................... wrong network
dnsmasq-dhcp: 3952934702 broadcast response
dnsmasq-dhcp: 3952934702 sent size: 1 option: 53 message-type 6
dnsmasq-dhcp: 3952934702 sent size: 4 option: 54 server-identifier 10.0.0.1
dnsmasq-dhcp: 3952934702 sent size: 13 option: 56 message 77:72:6f:6e:67:20:6e:65:74:77:6f:72:6b
dnsmasq-dhcp: 3442499203 available DHCP range: 10.0.0.50 -- 10.0.0.100
dnsmasq-dhcp: 3442499203 client provides name: rocky
dnsmasq-dhcp: 3442499203 DHCPDISCOVER(vm-public) 192.168.50.147 ........................................
dnsmasq-dhcp: 3442499203 tags: vm-public
dnsmasq-dhcp: 3442499203 DHCPOFFER(vm-public) 10.0.0.76 .......................................
dnsmasq-dhcp: 3442499203 requested options: 1:netmask, 2:time-offset, 6:dns-server, 12:hostname,
dnsmasq-dhcp: 3442499203 requested options: 15:domain-name, 26:mtu, 28:broadcast, 121:classless-static-route,
dnsmasq-dhcp: 3442499203 requested options: 3:router, 33:static-route, 40:nis-domain,
dnsmasq-dhcp: 3442499203 requested options: 41:nis-server, 42:ntp-server, 119:domain-search,
dnsmasq-dhcp: 3442499203 requested options: 249, 252, 17:root-path
dnsmasq-dhcp: 3442499203 next server: 10.0.0.1
dnsmasq-dhcp: 3442499203 sent size: 1 option: 53 message-type 2
dnsmasq-dhcp: 3442499203 sent size: 4 option: 54 server-identifier 10.0.0.1
dnsmasq-dhcp: 3442499203 sent size: 4 option: 51 lease-time 1h
dnsmasq-dhcp: 3442499203 sent size: 4 option: 58 T1 30m
dnsmasq-dhcp: 3442499203 sent size: 4 option: 59 T2 52m30s
dnsmasq-dhcp: 3442499203 sent size: 4 option: 1 netmask 255.255.255.0
dnsmasq-dhcp: 3442499203 sent size: 4 option: 28 broadcast 10.0.0.255
dnsmasq-dhcp: 3442499203 sent size: 4 option: 3 router 10.0.0.1
dnsmasq-dhcp: 3442499203 available DHCP range: 10.0.0.50 -- 10.0.0.100
dnsmasq-dhcp: 3442499203 client provides name: rocky
dnsmasq-dhcp: 3442499203 DHCPREQUEST(vm-public) 192.168.50.147 ...................................
dnsmasq-dhcp: 3442499203 DHCPNAK(vm-public) 192.168.50.147 ............................... wrong server-ID
dnsmasq-dhcp: 3442499203 broadcast response
dnsmasq-dhcp: 3442499203 sent size: 1 option: 53 message-type 6
dnsmasq-dhcp: 3442499203 sent size: 4 option: 54 server-identifier 10.0.0.1
dnsmasq-dhcp: 3442499203 sent size: 15 option: 56 message 77:72:6f:6e:67:20:73:65:72:76:65:72:2d:49...