[Novalug] Is Sortlist Broken? Or are Client Programs?

James Ewing Cottrell, III jecottrell3@comcast.net
Fri Jul 24 18:59:25 EDT 2015


OK, I have hosts with may appear on either of two networks but not both. I want to refer to it by a single name regardless of which net it is actually on, and I don't want any dynamic DNS involved. Consider the following:

6.6.6.6 laptop laptop-6
7.7.7.7 laptop laptop-7
6.1.1.1 multi
7.1.1.1 multi
6.2.2.2 client6
7.2.2.2 client7
8.2.2.2 client8

That's a hosts file, but none are in there; everything is in DNS, it's just easier to describe.
Everything is /8; those aren't the real nets, but you don't really want to read a bunch of 192.168, do you?
Everything is CentOS 6.5 or 6.6. /etc/nsswitch says: hosts: files dns. Authconfig is Vanilla too.

Client6 has "sortlist 6.0.0.0" in its /etc/resolv.conf, while
Client7 has "sortlist 7.0.0.0". Client8 also has this value, because it can't talk to Net 6 anyway.

Here is what I have observed:

dig returns the addresses rotated; after all, it doesn't know which clients want to do what. Check.
getent hosts laptop always returns "6.6.6.6 and 7.7.7.7" on Client6. Check.
getent hosts laptop always returns "7.7.7.7 and 6.6.6.6" on Client7. Check.
getent hosts laptop always returns "7.7.7.7 and 6.6.6.6" on Client8. Check.
"ping laptop" always goes to the correct/preferred/sortlist address for each Client. Check.
"ssh laptop DOES NOT go to the correct address. WTF? Neither does "telnet laptop 22". WTF?
Neither does "ftp laptop". I don't really have an FTP server there, but the addresses rotate.

I was pretty sure that Local Subnet Preference was something that the resolver did Automatically anyway. Did things change?
And in the face of an explicit Sortlist, why am I still getting the Rotated Addresses?

Of course, access to laptop-6 or laptop-7 works unambiguously when the laptop is there. Assume that the address changes automatically when the laptop moves.

JIM

P.S. It's not really a laptop either.





More information about the Novalug mailing list