[Dnsmasq-discuss] DHCP on IP alias (Linux)
Simon Kelley
simon at thekelleys.org.uk
Tue Jan 25 14:38:20 GMT 2011
Tomasz Wasiak wrote:
> Hello!
>
> I would like to kindly ask what happened to feature which I had been using in the past (I just found a backup of configuration files from a company where I was System Administrator from late August 2009) - working DHCP on IP alias with bind-interfaces.
> I was trying to set up similar scenario now (using 2.56rc2) and I got working DNS, but not DHCP.
>
> Dnsmasq 2.56rc2 build without IPV6, TFTP & I18N (getopt, DBus & DHCP compiled in).
> Highly customized Slackware Current (X86_64), kernel 2.6.38-rc2-git2, glibc-2.12.2
>
> Configuration file (DHCP related part):
> listen-address=10.0.15.3, 127.0.0.1
> bind-interfaces
> domain=xyz.abc.de
> dhcp-range=mynet,10.0.15.50-10.0.15.100,3h
> dhcp-option=mynet,1,255.255.255.0
> dhcp-option=mynet,3,10.0.15.1
> dhcp-option=mynet,6,10.0.15.3
> mx-host=xyz.abc.de,mailhub.xyz.abc.de,5
> mx-target=mailhub.xyz.abc.de
> local-mx
>
> Netstat -tulanp shows
> tcp 127.0.0.1/53 listen (pid)/dnsmasq
> tcp 10.0.15.3/53 listen (pid)/dnsmasq
> udp 127.0.0.1/53 listen (pid)/dnsmasq
> udp 10.0.15.3/53 listen (pid)/dnsmasq
> listen (pid)/dnsmasq
>
> DNS is working properly - I can use it locally via loopback and eth2:2 (10.0.15.3) and from whole subnet without any issues.
> DHCP is not working at all! Dnsmasq is blind - it is not even trying to answer any query. Running dnsmasq -d --log-dhcp showed nothing more than just dnsmasq -d.
> Replacing listen-address with interface=eth2 make it work - but it is responding on every eth2 alias (and I can not accept that).
>
> Am I doing something wrong, or something in DHCP/IP alias was changed in dnsmasq in last 18 months?
>
I don't think anything has changed, and certainly dnsmasq has always
bound udp 0.0.0.0/67 for DHCP, even when bind-interfaces is set.
For DHCP, this stuff pretty much has to deal in interfaces and not IP
addresses, a host doing DHCP doesn't have an IP address to start with,
so there's no way to tell which interface alias it might belong too. Is
that the problem, or are you saying that making DHCP work means that DNS
is enabled for all the subnets?
Cheers,
Simon.
More information about the Dnsmasq-discuss
mailing list