I'm running dnsmasq as a DHCP server on an interface that has multiple IP addresses. The problem is that dnsmasq is not using its server IP (10.13.7.33) as the src IP in its replies but instead another IP (I assume the first one) configured on that interface (192.168.34.1):
192.168.34.1.67 > 255.255.255.255.68: BOOTP/DHCP, Reply, length 319, xid 0xeee372a, secs 28, Flags [Broadcast]
Your-IP 10.13.7.38
Server-IP 10.13.7.33
Client-Ethernet-Address 3c:ec:af:73:0f:b6
Normal DHCP client seem not to care, but PXE booting fails because of this on some machines. If I force the src to be 10.13.7.33 using iptables it works fine.
I already tried to make dnsmasq bind to the correct IP by using:
interface=eth0
listen-address=10.13.7.33
dhcp-range=eth0,10.13.7.34,10.13.7.62,255.255.255.224,1h
Unfortunately, this isn't working. Is there a cleaner way to make dhcp use the correct src IP instead of having to use iptables and SNAT?
0 Answers