Bah! multicast dns == pain

Charles Wilson cygwin@cwilson.fastmail.fm
Sun Mar 14 05:39:00 GMT 2010


I've been trying to update the inetutils packages to upstream 1.7, but
it's been difficult; the servers were not cooperating.  I finally
decided to AT LEAST see if the clients were working.  However, since I
didn't have any local working servers...I had to set up telnetd/rshd and
friends on the linux box.

Meanwhile, I had (finally) updated my linux box installation to a recent
distro.

And...stuff didn't work. I thought.

Then, I noticed that it kinda did work, only it was VERY VERY slow. e.g.
'rsh linuxbox', wait 30 seconds, then login succeeds.  Well, that's
typically indicative that DNS is borked (esp. reverse lookups).

But...on both boxes, nslookup <name> and nslookup <number> worked instantly.

So, several hours of wireshark and strace later -- and a few red
herrings involving an ident server on my windows box (*) -- I discovered
a number of 5 second timeouts associated with RESOLVE-HOSTNAME-IPV4

write(3, "RESOLVE-HOSTNAME-IPV4 <windowsbox> ...
read(3, "-15 TIMEOUT ...

Hmm...funny, a lot of those google hits for RESOLVE-HOSTNAME-IPV4
mention nis settings with 'mdns'.  What's that?

Oh, some multicast DNS thing for zero-conf network auto configuration.
Hmm...it's related to NSS:

/etc/nsswitch.conf contains:
hosts:           mdns4_minimal files nis dns mdns4

But why would THAT be a problem? This whole 'multicast DNS' thing is
supposed to make things work better when you DON'T have a DNS server --
not screw things up when you DO have a properly configured one!

But wait! What does this one google hit say about mdns? '...mdns is
authoritative for .local?'  Hmm??  ...ah, wiki:

http://en.wikipedia.org/wiki/.local
"local is a pseudo-top-level domain used in multicast domain name
service (mDNS) of zero configuration networking discovery protocols."

Crap.

For ten years I've been using <machine>.<foo>.local for my private
network. But now this mdns4_minimal thing is being queried FIRST, and it
ignores everything BUT .local.  However, seeing a .local, it tries to
contact that device, and...times out.

OK, let's log on to the DNS server and change that to .private.  Reset
hostnames everywhere, poke, prod, cajole, cry (oops, forgot to change
/var/yp/ypservers), poke again...and try rsh One. More. Time.

and instantly...

rsh linuxbox
Last login: Sat Mar 13 23:41:31 from windowsbox
[me@linuxbox ~]$

I hate mdns.

(*) actually, not so much of a red herring after all. It appears that I
DO need the identd server running, or there is ANOTHER source of
delay/timeout.  I don't remember my old linux rsh server doing this,
but...the new one sure does.  More research needed.

--
Chuck



More information about the Cygwin-talk mailing list