[Dnsmasq-discuss] Serving an alias interface with bootp?

Simon Kelley simon at thekelleys.org.uk
Wed Nov 16 09:23:05 GMT 2005

Anssi Saari wrote:
> Hello,
> I'm running dnsmasq on a Linksys WRT54GS (OpenWRT distribution). It works
> fine for serving dhcp addresses for wireless clients, but I'd also like
> to serve my old ADSL box with bootp and tftpd, since its flash isn't
> working any more. Right now the ADSL box boots from my desktop PC, but if
> there's a power outage and the PC isn't on, then the ADSL box won't start.
> The WRT54GS is configured so that interface br0:0 is the one where the
> bootp requests should come in. That interface has a fixed IP address,
> and the ADSL box is
> I've tried to config this with
> interface=br0:0
> dhcp-host=xx:xx:xx:xx:xx:xx,
> dhcp-boot=file,host,ip
> but when the ADSL box tries to boot, nothing happens.
> listen-address= doesn't work either. However, if I add
> interface=br0, then dnsmasq sees the requests, but with this config just
> says "no address range available for DHCP request via br0". But, in normal
> operation br0 gets a public IP address with DHCP, so I can't very well
> serve the ADSL box with that interface.
> So, any suggestions? Traditional bootpd just gives an IP address to
> a MAC address it knows and doesn't care about interfaces and their IP
> addresses. Is there any way I could make dnsmasq behave that way too?

You need to provide a dhcp-range for the 10.x.x.x network in order for 
DHCP to work. Since you don't want to allocate any addresses dynamically 
on that network, the approriate incantation is

(and the "interface=br0" is right - since DHCP is broadcast, there's no 
difference between  interface aliases)

There's a couple of caveats to worry about.

1) This potentially offers DHCP over the public interface, br0. This 
shouldn't be a problem, but if your ISP doesn't insulate you from 
broadcasts from other hosts on your subnet, you might see them 
broadcasting for a DHCP lease. I know that it's possible with OpenWRT to 
break the bridge and split the wired and wireless interfaces into 
different IP subnets. That might be worth thinking about, depending in 
the exact configuration you are dealing with.

2) This config depends on the code in dnsmasq which copes with a 
physical interface having more than one IP address. As the other live 
thread in the mailing list shows, there's some doubt that this code 
works correctly in all circumstances. If you see problems after adding 
the dhcp-range statement, I'd like to know, as another data point in 
trying to chase down that problem.




> _______________________________________________
> 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