[Dnsmasq-discuss] Round Robin ping
simon at thekelleys.org.uk
Sun Jul 29 17:24:10 BST 2012
On 25/07/12 21:21, James Brown wrote:
> I've had a hard time finding any info about this on the internet.
> I have a round robin hostname set up in my hosts file, and my
> resolv.conf is set to dnsmasq. Nslookup queries come back correctly
> (it shows all four ips) but when I ping the name it only pings the
> first one listed. Is this the expected behavior? Or am I missing
> something here. It works differently in BIND, where ping will cycle
> through all the listed ips.
Dnsmasq does the same thing as BIND. Use dig or nslookup to see what the
DNS answers are. You should see all four IPs each time, but the order
will be rotated after each query. Ping will use the first answer.
Are you doing the "ping" tests on the machine running dnsmasq (and
therefore with the four IP addresses in /etc/hosts)? If so, the resolver
will be finding the names directly from /etc/hosts without using DNS and
therefore going through dnsmasq. The resolver doesn't do the round-robin
More information about the Dnsmasq-discuss