Solaris 10 name resolution question

As you can see by the following text, we have a multi-homed host defined in our network:

bash-2.05# nslookup ldaptest
Server: usat0x40.atd.gmeds.com
Address: 10.1.14.14

Name: ldaptest.atd.gmeds.com
Addresses: 10.1.16.142, 10.1.16.141

I turned off nscd (didn't think I needed to) ... then tried to ping ldaptest when the server at 10.1.16.142 was offline. I thought Solaris 10 would handle this (even our old VMS system can handle this) by doing a round robin sort of thing to alternate the working ip address with the failing one. Actually, baseed on some reading I thought Solaris 10 would perform some functionality test on its own and choose the working ip address every time. Instead it seems to choose the failed ip address every time. Can anyone explain why this doesn't work as expected?

bash-2.05# /etc/init.d/nscd stop
bash-2.05# ping ldaptest
^C
bash-2.05# ping ldaptest
^C
bash-2.05# ping ldaptest
^C

Thanks!
Martin Meadows
Indianapolis, Indiana

Do you have "dns" option for "hosts" entry into /etc/nsswitch.conf file? Sample line into my machine is as below
... ... ...
hosts: files dns
... ... ...

please post the output of "ifconfig -a".

You do need to stop nscd. Else, by default, ping will connect to the same host for an hour (regardless of TTL).

DNS round robin is, for lack of a better description, poor mans load balancing. It will not protect you from a host failure.

It would be better to do a `ping -s ldaptest`. That way when you ^C, it'll tell you what IP it's trying to hit. Also, wait at least 5 seconds between pings, and attempt it at least 10 times. That should give you enough host queries to flip between the two IPs.

Sumitpandya:
hosts: files nis [SUCCESS=continue] dns

dukenuke2:
/ > ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
eri0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 10.1.1.12 netmask ffffff00 broadcast 10.1.1.255
ether 0:3:ba:0:e5:5d
eri0:1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 10.1.1.21 netmask ffffff00 broadcast 10.1.1.255

Diabolist:
nscd was off.
I followed your advice and used -s. I waited 5 seconds between attempts and did, in fact, see it switch to the other ip address on the 3rd attempt.

Thanks!