<div dir="ltr"><div>Hi dnsmasq'ueraders :)<br><br></div><div>I have a small network, where I am trying to split my network into to ranges.<br>One range for local machines and another range for guests. On two different interfaces connected to dnsmasq.<br>
</div><div><br></div><div>Usually I don't have any problems, but sometimes my local machines end up on the guest range network.<br></div><div>If I release the DHCP on the machine and reboot it, then it is 50/50 if the go back to local network or end up on guest network again.<br>
<br></div><div>Is this network setup just bad and not possible to behave as I expect - or is it just a configuration mistake?<br></div><div>I am running dnsmasq 2.65 on FreeBSD 7.4.<br></div><div>Looking at the changelog it seems like the feature I'm looking for was removed in 2.63 (Remove the interface:<interface> argument in --dhcp-range)<br>
<br></div><div>Any hints are more than welcome! Thank you in advance,<br></div><div>-hansen<br></div><div><br> </div><div>Here is how it looks, when it gives the wrong IP:<br>08:23:42 dnsmasq-dhcp[68210]: DHCPREQUEST(em1) 192.168.2.107 50:e5:49:d1:7b:82<br>
08:23:42 dnsmasq-dhcp[68210]: DHCPNAK(em1) 192.168.2.107 50:e5:49:d1:7b:82 wrong network<br>08:23:42 dnsmasq-dhcp[68210]: DHCPREQUEST(em2) 192.168.2.107 50:e5:49:d1:7b:82<br>08:23:42 dnsmasq-dhcp[68210]: DHCPACK(em2) 192.168.2.107 50:e5:49:d1:7b:82 PC07<br>
08:23:46 dnsmasq-dhcp[68210]: DHCPDISCOVER(em1) 50:e5:49:d1:7b:82<br>08:23:46 dnsmasq-dhcp[68210]: DHCPOFFER(em1) 10.10.10.17 50:e5:49:d1:7b:82<br>08:23:46 dnsmasq-dhcp[68210]: DHCPDISCOVER(em2) 50:e5:49:d1:7b:82<br>08:23:46 dnsmasq-dhcp[68210]: DHCPOFFER(em2) 192.168.2.107 50:e5:49:d1:7b:82<br>
08:23:46 dnsmasq-dhcp[68210]: DHCPREQUEST(em1) 10.10.10.17 50:e5:49:d1:7b:82<br>08:23:46 dnsmasq-dhcp[68210]: DHCPACK(em1) 10.10.10.17 50:e5:49:d1:7b:82 PC07<br>08:23:46 dnsmasq-dhcp[68210]: not giving name PC07 to the DHCP lease of 10.10.10.17 because the name exists in /etc/hosts with address 192.168.2.107<br>
08:23:46 dnsmasq-dhcp[68210]: DHCPREQUEST(em2) 10.10.10.17 50:e5:49:d1:7b:82<br>08:23:46 dnsmasq-dhcp[68210]: DHCPNAK(em2) 10.10.10.17 50:e5:49:d1:7b:82 wrong server-ID<br>08:23:55 dnsmasq-dhcp[68210]: DHCPINFORM(em2) 10.10.10.17 50:e5:49:d1:7b:82 ignored<br>
08:23:55 dnsmasq-dhcp[68210]: DHCPINFORM(em1) 10.10.10.17 50:e5:49:d1:7b:82<br>08:23:55 dnsmasq-dhcp[68210]: DHCPACK(em1) 10.10.10.17 50:e5:49:d1:7b:82 PC07<br><br></div><div>Here is the normal way, when it gives the correct IP:<br>
08:44:55 dnsmasq-dhcp[68210]: DHCPREQUEST(em2) 192.168.2.106 00:19:b9:26:83:8b<br>08:44:55 dnsmasq-dhcp[68210]: DHCPACK(em2) 192.168.2.106 00:19:b9:26:83:8b PC06<br>08:44:55 dnsmasq-dhcp[68210]: DHCPREQUEST(em1) 192.168.2.106 00:19:b9:26:83:8b<br>
08:44:55 dnsmasq-dhcp[68210]: DHCPNAK(em1) 192.168.2.106 00:19:b9:26:83:8b wrong network<br>08:44:59 dnsmasq-dhcp[68210]: DHCPINFORM(em2) 192.168.2.106 00:19:b9:26:83:8b<br>08:44:59 dnsmasq-dhcp[68210]: DHCPACK(em2) 192.168.2.106 00:19:b9:26:83:8b PC06<br>
08:44:59 dnsmasq-dhcp[68210]: DHCPINFORM(em1) 192.168.2.106 00:19:b9:26:83:8b<br>08:44:59 dnsmasq-dhcp[68210]: DHCPACK(em1) 192.168.2.106 00:19:b9:26:83:8b PC06<br><br></div><div>The constant difference between correct and wrong DHCP'ing is the first interface to get a DHCPREQUEST.<br>
</div><div>When it fails, it's always because em1 is called first.<br></div><div><br>#=============dnsmasq.conf:START<br>domain-needed<br>bogus-priv<br>no-resolv<br>no-poll<br>expand-hosts<br><br>server=8.8.8.8<br>server=8.8.4.4<br>
interface=em2<br>interface=em1<br><br>dhcp-range=tag:em2,set:localpc,192.168.2.0,static,infinite<br>dhcp-range=tag:em1,tag:!localpc,10.10.10.10,10.10.10.99,1h<br><br>dhcp-host=00:19:B9:26:2f:a6,192.168.2.101,PC01,infinite<br>
dhcp-host=00:19:B9:26:87:35,192.168.2.102,PC02,infinite<br>dhcp-host=00:19:B9:26:83:af,192.168.2.103,PC03,infinite<br>dhcp-host=00:19:B9:26:8b:12,192.168.2.104,PC04,infinite<br>dhcp-host=00:19:B9:26:85:55,192.168.2.105,PC05,infinite<br>
dhcp-host=00:19:B9:26:83:8b,192.168.2.106,PC06,infinite<br></div><div>dhcp-host=50:e5:49:d1:7b:82,192.168.2.107,PC07,infinite<br></div><div><br>dhcp-ignore=tag:localpc,tag:known,tag:em2<br><br>dhcp-option=tag:em2,19,0<br>
dhcp-option=42,0.0.0.0<br>dhcp-option=tag:em2,44,0.0.0.0<br>dhcp-option=tag:em2,45,0.0.0.0<br>dhcp-option=tag:em2,46,8<br>dhcp-option=tag:em2,47<br><br>dhcp-lease-max=200<br>dhcp-authoritative<br>cache-size=500<br>no-negcache<br>
</div>#=============dnsmasq.conf:END<br></div>