[Dnsmasq-discuss] Round Robin ping

James Brown James.Brown at ipsoft.com
Thu Jul 26 13:22:15 BST 2012


I probably explained that poorly, sorry. Its ping from iputils. What I mean is, when we have a round robin dns implemented with BIND it will cycle through the different ips each time you run it. It only does the first one listed in the hosts file with dnsmasq. Here is an example of the behavior:

With bind:

# ping -s rrdns
PING rrdns: 56 data bytes
64 bytes from rrdns (10.199.4.20): icmp_seq=0. time=1.22 ms
64 bytes from rrdns (10.199.4.20): icmp_seq=1. time=0.528 ms
64 bytes from rrdns (10.199.4.20): icmp_seq=2. time=0.595 ms

# ping -s rrdns
PING rrdns: 56 data bytes
64 bytes from rrdns (10.199.4.18): icmp_seq=0. time=1.26 ms
64 bytes from rrdns (10.199.4.18): icmp_seq=1. time=0.378 ms

# ping -s rrdns
PING rrdns: 56 data bytes
64 bytes from rrdns (10.199.4.19): icmp_seq=0. time=0.845 ms
64 bytes from rrdns (10.199.4.19): icmp_seq=1. time=0.850 ms

# ping -s rrdns
PING rrdns: 56 data bytes
64 bytes from rrdns (10.199.4.20): icmp_seq=0. time=0.524 ms
64 bytes from rrdns (10.199.4.20): icmp_seq=1. time=0.414 ms


# nslookup rrdns
Server:         10.199.7.167
Address:        10.199.7.167#53

Name:   rrdns
Address: 10.199.4.18
Name:   rrdns
Address: 10.199.4.20
Name:   rrdns
Address: 10.199.4.19

==================
With dnsmasq:
==================

[root ~]# nslookup dnsmasq-rrdns
Server:         127.0.0.1
Address:        127.0.0.1#53

Name:   dnsmasq-rrdns
Address: 10.124.199.251
Name:   dnsmasq-rrdns
Address: 10.86.154.194
Name:   dnsmasq-rrdns
Address: 10.210.201.188
Name:   dnsmasq-rrdns
Address: 10.211.11.79

[root ~]# ping dnsmasq-rrdns
PING dnsmasq-rrdns (10.86.154.194) 56(84) bytes of data.
64 bytes from server1 (10.86.154.194): icmp_seq=1 ttl=56 time=0.939 ms
64 bytes from server1 (10.86.154.194): icmp_seq=2 ttl=56 time=0.888 ms

[root ~]# ping dnsmasq-rrdns
PING dnsmasq-rrdns (10.86.154.194) 56(84) bytes of data.
64 bytes from server1 (10.86.154.194): icmp_seq=1 ttl=56 time=0.842 ms
64 bytes from server1 (10.86.154.194): icmp_seq=2 ttl=56 time=0.811 ms

[root ~]# ping dnsmasq-rrdns
PING dnsmasq-rrdns (10.86.154.194) 56(84) bytes of data.
64 bytes from server1 (10.86.154.194): icmp_seq=1 ttl=56 time=0.802 ms
64 bytes from server1 (10.86.154.194): icmp_seq=2 ttl=56 time=0.907 ms


Its installed from an rpm, heres the version

[root ~]# dnsmasq --version
Dnsmasq version 2.45  Copyright (C) 2000-2008 Simon Kelley

--
James Brown


-----Original Message-----
From: richardvoigt at gmail.com [mailto:richardvoigt at gmail.com] 
Sent: Wednesday, July 25, 2012 5:08 PM
To: James Brown
Cc: dnsmasq-discuss at lists.thekelleys.org.uk
Subject: Re: [Dnsmasq-discuss] Round Robin ping

Need more information about the `ping` implementation you are using.
Does it re-lookup the name for each echo request?  Usually it will look up the name once and use that single address for all outgoing ICMP packets.

On Wed, Jul 25, 2012 at 3:21 PM, James Brown <James.Brown at ipsoft.com> wrote:
> Hello,
>
>
>
> 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.
>
>
>
> --
>
> James Brown
>
>
> _______________________________________________
> 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