[Dnsmasq-discuss] IP assigning for wrong network

Simon Kelley simon at thekelleys.org.uk
Thu Feb 20 17:12:56 UTC 2014


On 19/02/14 23:03, Tamas Papp wrote:
> hi All,
>
>
> Feb 19 23:49:48 workhorse dnsmasq-dhcp[6678]: DHCPINFORM(eth-clients)
> 10.0.1.233 70:54:d2:1b:18:59
> Feb 19 23:49:48 workhorse dnsmasq-dhcp[6678]: DHCPACK(eth-clients)
> 10.0.1.233 70:54:d2:1b:18:59 vweiszfeiler-pc
> Feb 19 23:49:51 workhorse dnsmasq-dhcp[6678]: DHCPINFORM(eth-clients)
> 10.0.1.233 70:54:d2:1b:18:59
> Feb 19 23:49:51 workhorse dnsmasq-dhcp[6678]: DHCPACK(eth-clients)
> 10.0.1.233 70:54:d2:1b:18:59 vweiszfeiler-pc
>

So, in that log fragment there's no assignment going on. The client is 
asking for configuration information, and dnsmasq is sending it. The 
only thing dnsmasq could do differently is to ignore the DHCPINFORM when 
the IP address the client sends is not on the network that the client 
appears to be on, but that bfreaks other, useful use-cases fro DHCPINFORM.


If/when the client does DHCPREQUEST and attempts to renew the lease, 
dnsmasq should respond with with DHCPNAK and then the client will move 
IP addresses. When that happens depends on when the lease expires.




Cheers,

Simon.

>
> /etc/dnsmasq.d/dhcp:
>
> dhcp-option=46,8
> dhcp-authoritative
> dhcp-fqdn
> dhcp-option=42,148.6.0.1
> dhcp-range=10.32.0.2,10.32.1.235,24h
> dhcp-option=1,255.255.0.0
> dhcp-option=3,10.32.0.1
> dhcp-option=44,10.0.0.51
> dhcp-option=6,10.32.0.52,10.0.0.11
> dhcp-option=119,"foo.intra bar.intra"
>
>
> # bpo is a directory
> dhcp-hostsfile=/etc/dnsmasq.spool.d/dhcp/bpo
>
> dhcp-range=set:dmz-host,10.0.0.0,10.0.1.250,24h
> dhcp-range=set:clients-host,10.32.0.0,10.32.1.250,24h
>
>
> dhcp-option=tag:dmz-host,option:router,10.0.1.254
> dhcp-option=tag:dmz-host,option:dns-server,10.0.0.52
>
> dhcp-option=tag:clients-host,option:router,10.32.0.1
> dhcp-option=tag:clients-host,option:dns-server,10.32.0.52
>
>
> There are two interfaces (eth-clients, eth-dmz).
>
>
> Story: originally there was a single network (10.0.1.0/23) and it was
> separated to clients and dmz. Clients use a new network (10.32.0.0/16),
> dmz network uses the the original one.
> There are clients that works fine(*) and there are other clients like
> the example one above, that doesn't. I can't imagine why the server says
> DHCPACK to an IP from network 10.0.1.0/23 if that client comes from a
> wrong interface?
>
> It doesn't help, if the client is listed in a dhcp-hostsfile, which
> looks like this so far:
>
> 70:54:d2:1b:18:59,set:clients-host,vw-pc-eth0
>
>
>
> Any idea?
>
> Thanks,
> tamas
>
> (*): They work because they get good IP, but dhcp-hostsfile is not
> respected.
>
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
>




More information about the Dnsmasq-discuss mailing list