[Dnsmasq-discuss] Round-Robin DNS with >3 IPs rotating in pairs?

Sandro Mathys sm at sandro-mathys.ch
Wed Sep 5 13:49:29 BST 2012


Hi,

I've tried to set up a pretty minimal dnsmasq service. Basically the
configuration file is empty, no parameters provided. That way, as I
understand it, it should use /etc/resolv.conf to find nameservers and
also read /etc/hosts. So far this seems to work.

Now in /etc/hosts, I have something like:

10.0.0.1 test
10.0.0.2 test
10.0.0.3 test
10.0.0.4 test
10.0.0.5 test
10.0.0.6 test

If I do a 'dig @localhost test', I get the following results. IPs
shortened to the last quadruple for my convenience :)

The first time:
1, 2, 3, 4, 5, 6

Second time:
3, 4, 5, 6, 1, 2

Third time:
5, 6, 1, 2, 3, 4

And then again from the beginning.

Now I've been wondering why dnsmasq would rotate the IPs in pairs of
two. That's way less useful than rotating one IP at a time. 2, 4 and 6
will hardly get any traffic at all like this. Is that a bug? Do I need
to change something?

Thanks,
Sandro



More information about the Dnsmasq-discuss mailing list