[Dnsmasq-discuss] Sometimes forgets to hand out known dhcp-host IP

Simon Kelley simon at thekelleys.org.uk
Mon Mar 11 16:42:02 GMT 2013


On 11/03/13 16:33, hansen wrote:
> On Fri, Mar 8, 2013 at 6:14 PM, Simon Kelley <simon at thekelleys.org.uk
> <mailto:simon at thekelleys.org.uk>> wrote:
>
>     On 07/03/13 14:34, hansen wrote:
>
>         Hi dnsmasq'ueraders :)
>
>         I have a small network, where I am trying to split my network
>         into to
>         ranges.
>         One range for local machines and another range for guests. On two
>         different interfaces connected to dnsmasq.
>
>         Usually I don't have any problems, but sometimes my local
>         machines end
>         up on the guest range network.
>         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.
>
>         Is this network setup just bad and not possible to behave as I
>         expect -
>         or is it just a configuration mistake?
>         I am running dnsmasq 2.65 on FreeBSD 7.4.
>         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)
>
>     No that feature won't fix the problem.
>
>     The problem is that you have two interfaces (em1 and em2) connected
>     to the same broadcast domain. That's not something that dnsmasq
>     knows how to deal with, and it gets confused when is gives a client
>     an address associated with one interface, and then it turns up on a
>     different interface.
>
>     Can you use one physical interface on the machine running dnsmasq,
>     and give it two addresses?
>
>
> Hi Simon,
>
> Thanks for replying. I do think it's possible to create virtual IPs on
> one physical interface.

I'm sure it is. For FreeBSD, the magic keyword is "IP alias"

One of many google hits that describes it is:
http://www.unixwerk.eu/bsd/ipalias.html

  So you don't think it would be a problem if two
> VIPs broadcasts?

It's fine, because dnsmasq will know that both IPs are in the same 
broadcast-domain (ie connected to the same virtual "wire"). The problems 
you were seeing are because dnsmasq is treating the two interfaces as 
being connected to different interfaces, and trying to keep up with a 
host that lokos like it's moving randomly between the two networks.


In the long term, dnsmasq needs something like the ISC "shared network" 
keyword for this sort of situation, but that won't solve you immediate 
problem.



Cheers,

Simon.








More information about the Dnsmasq-discuss mailing list