I have both hostapd and dnsmasq running but for some reason any connected host does not get assigned an IP. tcpdump shows the client pinging the broadcast IP but no response.
hostapd config
interface=wlx00c0caa5587f
ssid=pepper
channel=6
hw_mode=g
wpa=2
wpa_passphrase=password123
wpa_key_mgmt=WPA-PSK
dnsmasq config
interface=wlx00c0caa5587f
#except-interface=lo
#except-interface=wlp2s0
bind-interfaces
no-resolv
dhcp-range=192.168.33.2,192.168.33.20,12h
dhcp-option=3,192.168.33.1 # Gateway (gw)
dhcp-option=6,192.168.33.1 # DNS
log-queries
log-dhcp
listen-address=127.0.0.1
Interface commands
Setting interface IP
sudo ifconfig wlx00c0caa5587f 192.168.33.1 netmask 255.255.255.0 up
Adding route to gateway. I am not sure why this one is needed.
sudo route add -net 192.168.33.0 netmask 255.255.255.0 gw 192.168.33.1
tcpdump
listening on wlx00c0caa5587f, link-type EN10MB (Ethernet), capture size 262144 bytes
15:07:23.540357 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from dc:a9:04:d0:c4:76 (oui Unknown), length 300
15:07:23.540386 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from dc:a9:04:d0:c4:76 (oui Unknown), length 300
15:07:24.639657 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from dc:a9:04:d0:c4:76 (oui Unknown), length 300
15:07:24.639735 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from dc:a9:04:d0:c4:76 (oui Unknown), length 300
15:07:27.579717 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from dc:a9:04:d0:c4:76 (oui Unknown), length 300
Main questions
How do clients search for the DHCP server?
Do I need to set the DHCP server in the hostapd config?