[Dnsmasq-discuss] address assignment without checking context?

Simon Kelley simon at thekelleys.org.uk
Thu Jul 21 16:15:39 BST 2005


Benjamin Collar wrote:
> Greetings
> 
> We have set up two interfaces that are physically connected to the same
> network: 
> eth0: 10.0.150.10 netmask 255.254.0.0
> eth1: 10.128.150.10 netmask 255.254.0.0
> 
> dnsmasq is configured to only statically assign IP addresses via
> the client id. Excerpt from dnsmasq.conf:
> dhcp-host:id=Linda,10.0.150.100,12h
> 
> Now, if a DHCP request from a client with client id "Linda" arrives
> over eth0, then everything works as expected - 10.0.150.100 will be
> assigned to it. If the same DHCP request arrives over eth1, it is
> discarded (DHCPDISCOVER(eth1) .... no address available).
> My question: Is there a way to configure dnsmasq so that DHCP
> requests with client id are not checked for their "context" but
> instead are handled regardless on which interface they arrive?
> 
> Thanks in advance!
> Ben
> 

There's no code in dnsmasq to change that behaviour, however in recent 
versions of dnsmasq running on Linux, it's possible for an interface to 
have more than on IP address. You should therefore be able to give each 
interface the address of the other as a secondary address. That would 
make dnsmasq behave as you want, I have little idea if it would break 
anything else. I just tried it here, and it's at least possible to set 
the extra address without getting an error (you have to use the "ip" 
command, ifconfig doesn't know about secondary addresses)

Worth a try before starting to patch.....

HTH

Simon.





More information about the Dnsmasq-discuss mailing list