Mac OS X and Linux Zeroconf LAN irregularities

Mac OS X and Linux Zeroconf LAN irregularities
----------------------------------------------
I would like to at least understand, if not remedy,
an annoyance in establishing the connection between
my Mac and my Linux box. I have yet to find anything
constructive relative to the issue via the google
shuffle or manual pages. Any thoughts, experiences
and/or further troubleshooting steps would be
appreciated. Thank you.
==============================================
Installation:


PMac G5 running OS X Tiger (10.4.4)
Linux printer is shared with Mac via CUPS,
not classic AppleTalk.


P4 with Debian Etch (testing), kernel 2.6.12-1-686,
Gnome desktop and USB attached printer and scanner.
With netatalk 2.0.3-4 and task-howl (0.9.5-2), which
includes the howl mdnsresponder (0.9.5-2), installed.
Only the netatalk afpd and cnid_metad deamons are
being run.


hardwired ethernet with the Mac and Linux box connected
to a Belkin 4 port router
==============================================
Trials:


If I boot up both my Mac and Linux box:
Linux has autoipd, mDNSResponder and nifd daemons running.
Mac has mDNSResponder and netinfod daemons running (don't
know which others are pertinent to note).


If on my Mac in a Finder pane I click Network -> My Network
-> debian1 -> Connect then I get the message:
AFP connection status
Looking up "debian1.local.."
which times out with the message:
Connection failed - server may not exist blah blah


In can however, on my Mac in the Finder menu bar select
Go -> Connect to Server -> enter afp://192.168.2.48/
(my Linux box) -> enter user and password of shared
directory -> select share to mount; and I have my
connection. If I dismount the share though, within a
session, and try to connect again this method works and
the Finder pane method still does not.


Alternatively, on my Linux box I can run the cli
# /etc/init.d/mdnsresponder restart
Then back on my Mac the Finder pane method of establishing
a connection (that failed above) works as it should.
Further, I can dismount the share and reconnect with this
method any number of times in the same session, and even
reconnect with this method after rebooting only my Mac.
However, if I reboot my Linux box I'm back to Finder menu
bar or mdnsresponder restart reconnect choices.
==============================================

What the above trials tell me is that if I restart
mdnsreaponder then everything is "peachy" until my Linux
box is rebooted. What they do not tell me is if there is
something flakey with mdnsresponder, my Linux installation,
an incompatibility with Tiger, or even some other
interference on either box.
==============================================

Lee C
"Life is judged with all the blindness of life itself."
-- George Santayana
(see Backup::Restore article
http://homepage.mac.com/lee_cullens/Bx3.html )
(see Artworks sampling
http://homepage.mac.com/lee_cullens/Artworks.pdf )

Dual 2.5 Power Mac G5, Mac OS X (10.4.4), on LAN with Debian Linux

Posted on Jan 25, 2006 9:07 PM

Reply
2 replies

Jan 26, 2006 10:10 AM in response to Lee Cullens

I posted the following to the Debian list for obvious reasons, but I'm also posting it here in the hope that someone might shed some light on my suspicions relative to the Mac log.

*********************************************************************
The howl-tools portion of my zeroconf installation is being phased
out in favor of the newer Avahi as I understand it. However, Avahi
hasn't made its way down to testing yet so for the time being I'm
trying to make do with howl-tools. The point in my mentioning
this here is that much of the information I find is outdated.


That said, the only thing I've found in the Linux bootup logs yet
(using dmesg) that I recognize is the line


autoipd uses obsolete (PF INET,SOCKPACKET)


So, using autoipd as a starting point for further researching
this issue I found the following
(at http://www.porchdogsoft.com/products/howl/InstallUnix.html )

..........................
Ideally, autoipd should run only in the event that the interface has not been statically configured and DHCP fails. Running autoipd this way requires modification to the standard distribution boot scripts for your OS. These modifications vary depending on your version of Linux or FreeBSD. On RedHat Linux, for example, the /sbin/ifup script may be modified to launch autoipd in the event that dhclient fails. On our systems, we added the following line to /sbin/ifup right after dhclient is launched so that autoipd runs whenever DHCP fails:

elif [ -z "`pidof -x dhclient`" ] && [ -z "`pidof -x dhcpcd`" ] && [ -z "`pidof -x pump`" ] && [ -x /usr/local/bin/autopid ] && /usr/local/bin/autoipd -i ${DEVICE}; then echo $"started autoip."

Note that since this change causes "$NUMDEFROUTES" to become zero-length, the subsequent code in /sbin/ifup for fixing the duplicate routes generated by DHCP also gets modified in the howl version of ifup.

You may need to modify your boot scripts differently depending on your platform. We have included the original ifup script for RedHat 9 along with our modified version (howl_ifup) as an example so that you may more easily identify how to modify the boot scripts for your platform.
.............................

A lot of Greek to me 🙂 but I did look in /etc/init.d and found
the autoipd script which is the normal boilerplate (same as all
the others with autoipd substituted for the daemon name).

Even if I felt comfortable adding the above in the
/etc/init.d/autoipd script, I have no idea whether it would be
dealt with after dhclient.

I also found in the Mac system log after a reboot:
Jan 26 02:22:48 slpmacg5 mDNSResponder: Adding browse domain local.
Jan 26 02:22:48 slpmacg5 configd[33]: executing /System/Library/SystemConfiguration/Kicker.bundle/Contents/Resources/enable-net work
Jan 26 02:22:48 slpmacg5 configd[33]: posting notification com.apple.system.config.network_change
Jan 26 02:22:48 slpmacg5 lookupd[80]: lookupd (version 369.2) starting - Thu Jan 26 02:22:48 2006
Jan 26 02:22:49 slpmacg5 configd[33]: target=enable-network: disabled
Jan 26 02:22:50 slpmacg5 configd[33]: AppleTalk startup complete
Jan 26 02:23:59 slpmacg5 automount[148]: NSLXResolveDNS will try and resolve [debian1] of type [ afpovertcp.tcp.] in location [local.]\n


so I'm thinking (dangerous at my age) that my Mac isn't "discovering"
what it needs until I restart (stop and start) mdnsresponder on my Linux box????


What I'm asking is whether anyone thinks this (autoipd) on Linux is a
likely cause of my described connection annoyance?


If so, is the referenced info applicable to Debian today and how
would one go about applying it?


Or alternately if so, might it make sense to just disable autoipd
startup altogether and how would I best go about that - just something
like update-rc.d autoipd remove????????


Thank you,
Lee C

Jan 27, 2006 12:41 AM in response to Lee Cullens

Following the thinking that the Linux startup scripts were firing in the wrong order I studied the update-rc.d man pages and THE Debian Policy Manual (selectively), but when I got to looking around in /etc/init.d and /etc/rc?.d I found scripts (and symlinks) for only the relevant daemons autoipd, mdnsresponder and netatalk (there are others of course). There was nothing specific for the automatic DHCP which I believe is relevant based on howl site comments noted above - I guess DHCP is buried somewhere in networking setup in /etc/rcS.d (boot time) and I don't want to hack the basic setup.

So, adjusting the thought train:

1) howl-tools as installed are being phased out in favor of Avahi and the package is no longer being maintained to my knowledge. Their list even ends abruptly in Aug. 2005.

2) There have been significant changes in Debian Etch and kernel 2.6.12-1-686 since this howl-tools package.

3) The system log line "autoipd uses obsolete (PF INET,SOCKPACKET)" is a clue that something ain't kosher 🙂

4) The (dated) comments on the howl site as noted.


My thinking is that automatic DHCP gets its act together then mdnsresponder uses DHCP to do its broadcasting thing. However, either in between or after, the seemingly antiquated autoipd screws up the works for mdnsresponder. My understanding is that autoipd is intended as a work around if DHCP setup fails, but I don't know if the work around is still relevant with Etch and kernel 2.6.12-1-686.

So this klutzy hacker's work around was to use my new found knowledge of sysV init and update-rc.d, and employ the cli
update-rc.d autoipd remove
so the daemon is never started.

My file sharing (via netatalk) connection now works at getty-up-go with the Finder pane approach also, which nullifies the annoyance I was investigating, and my print sharing (via CUPS) still works.

The autoipd code is still on the system and the init script is still there (renamed), so I can always reinstate the daemon startup if I find some adverse affect.

I should not have to exist in this in-between land for too many months. Someday soon Avahi will work its way down to testing without an onerous Sid dependency and create new issues for me to have to screw around with :-))

Lee C

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Mac OS X and Linux Zeroconf LAN irregularities

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.