[Dnsmasq-discuss] Problem listening on only one interface

Ejner Fergo ejnersan at gmail.com
Wed Nov 18 20:11:21 GMT 2009


Hola all,

I'm a happy dnsmasq user for a couple of years now, though it is first
now I turn to this list to hopefully get some help.

I run dnsmasq on a server with 6 NICs, where 'eth0' talks to the
outside world and 'eth1' is for the local network. The last 4 is
bonded into 'bond0'.
My problem is I only want to have 'eth1' to listen/respond to DNS/DHCP
requests, but no matter which option I use (interface,
except-interface, listen-address) the setup breaks and the
workstations can't get an address. If all these options are commented
out, everything works just fine but some workstations see 'bond0' as
the nameserver instead of 'eth1'.

Looking at /var/log/messages on the server shows that it is random
whether 'eth1' or 'bond0' is used, for example:

Nov 18 19:34:37 sol dnsmasq-dhcp[26878]: DHCPDISCOVER(eth1) 08:00:27:b4:b4:dd
Nov 18 19:34:37 sol dnsmasq-dhcp[26878]: DHCPOFFER(eth1) 192.168.3.31
08:00:27:b4:b4:dd
Nov 18 19:34:37 sol dnsmasq-dhcp[26878]: DHCPDISCOVER(bond0) 08:00:27:b4:b4:dd
Nov 18 19:34:37 sol dnsmasq-dhcp[26878]: DHCPOFFER(bond0) 192.168.3.31
08:00:27:b4:b4:dd
Nov 18 19:34:37 sol dnsmasq-dhcp[26878]: DHCPREQUEST(eth1)
192.168.3.31 08:00:27:b4:b4:dd
Nov 18 19:34:37 sol dnsmasq-dhcp[26878]: DHCPACK(eth1) 192.168.3.31
08:00:27:b4:b4:dd puck
Nov 18 19:34:41 sol dnsmasq-dhcp[26878]: DHCPDISCOVER(bond0) 08:00:27:b4:b4:dd
Nov 18 19:34:41 sol dnsmasq-dhcp[26878]: DHCPOFFER(bond0) 192.168.3.31
08:00:27:b4:b4:dd
Nov 18 19:34:41 sol dnsmasq-dhcp[26878]: DHCPDISCOVER(eth1) 08:00:27:b4:b4:dd
Nov 18 19:34:41 sol dnsmasq-dhcp[26878]: DHCPOFFER(eth1) 192.168.3.31
08:00:27:b4:b4:dd
Nov 18 19:34:41 sol dnsmasq-dhcp[26878]: DHCPREQUEST(bond0)
192.168.3.31 08:00:27:b4:b4:dd
Nov 18 19:34:41 sol dnsmasq-dhcp[26878]: DHCPACK(bond0) 192.168.3.31
08:00:27:b4:b4:dd puck

or

Nov 18 19:46:45 sol dnsmasq-dhcp[26878]: DHCPREQUEST(eth1)
192.168.3.30 00:0b:cd:3e:41:de
Nov 18 19:46:45 sol dnsmasq-dhcp[26878]: DHCPACK(eth1) 192.168.3.30
00:0b:cd:3e:41:de makemake
Nov 18 19:46:45 sol dnsmasq-dhcp[26878]: DHCPREQUEST(bond0)
192.168.3.30 00:0b:cd:3e:41:de
Nov 18 19:46:45 sol dnsmasq-dhcp[26878]: DHCPACK(bond0) 192.168.3.30
00:0b:cd:3e:41:de makemake

So even if it looks like 'eth1' has acknowledged the request it is
'bond0' that "won".

If I use the interface=, except-interface= or listen-address= options,
like for example:

except-interface=bond0

the messages look like this:

Nov 18 18:51:07 sol dnsmasq-dhcp[26159]: DHCPDISCOVER(eth1) 00:1e:58:a1:6e:b1
Nov 18 18:51:07 sol dnsmasq-dhcp[26159]: DHCPOFFER(eth1) 192.168.3.5
00:1e:58:a1:6e:b1
Nov 18 18:51:11 sol dnsmasq-dhcp[26159]: DHCPDISCOVER(eth1) 00:1e:58:a1:6e:b1
Nov 18 18:51:11 sol dnsmasq-dhcp[26159]: DHCPOFFER(eth1) 192.168.3.5
00:1e:58:a1:6e:b1
Nov 18 18:51:19 sol dnsmasq-dhcp[26159]: DHCPDISCOVER(eth1) 00:1e:58:a1:6e:b1
Nov 18 18:51:19 sol dnsmasq-dhcp[26159]: DHCPOFFER(eth1) 192.168.3.5
00:1e:58:a1:6e:b1
Nov 18 18:51:34 sol dnsmasq-dhcp[26159]: DHCPDISCOVER(eth1) 00:1e:58:a1:6e:b1
Nov 18 18:51:34 sol dnsmasq-dhcp[26159]: DHCPOFFER(eth1) 192.168.3.5
00:1e:58:a1:6e:b1
...
...
and so on.

No matter which options I use, with or without "bind-interfaces", I
can't get it to work for only one interface. So until now I just
didn't use these options and the workstations uses a mix of either
'eth1' or 'bond0' as nameserver, but I really would like it to be more
consistent. My dnsmasq.conf is very simple (which I like) and I read
through it some times now but can't figure out why it won't work for
only one interface?

The server is running Gentoo Linux 2.6.27 and dnsmasq is v2.50.

Thank you in advance and please let me know if the info is insufficient.

Kind regards,
Ejner Fergo



More information about the Dnsmasq-discuss mailing list