Subject: [netatalk-admins] disconnect errors

From: cameron hart <[email-masked]>
Date: Thu, 06 May 1999 09:47:07 +1200

Hi all, we are using Retrospect to back up a Mac Volume running
Netatalk+ASun2.1.3 on Linux 2.0.36. I came in this morning to find that
the client had somehow been disconnected. I found the following messages
in my syslog:

May  6 01:36:41 blackunity afpd[11500]: afp_openfork: ad_open:
Permission denied
May  6 01:37:19 blackunity last message repeated 71 times
May  6 01:51:07 blackunity -- MARK --
May  6 01:56:54 blackunity afpd[11500]: dsi_stream_read(-1): Connection
reset by
 peer
May  6 01:56:54 blackunity afpd[11500]: dsi_stream_write: Broken pipe
May  6 01:56:54 blackunity afpd[11500]: 11416.08KB read, 1044859.56KB
written
May  6 01:56:54 blackunity PAM_pwdb[11500]: (netatalk) session closed
for user +++
May  6 01:56:54 blackunity afpd[11500]: dsi_stream_write: Broken pipe
May  6 01:56:54 blackunity afpd[10322]: server_child[1] 11500 exited 1

Now I know why the permission denied messages are there. Can anyone tell
me what the rest mean, and what might cause them?

Thanks,

Cam

---

From: "Douglas E. Wegscheid" <[email-masked]>
Date: Thu, 06 May 1999 08:47:03 -0400

I just upgraded to FreeBSD 3.1 from 2.2.5, and installed the
netatalk1.4b2-asun2.1.0 package. It installed fine, seems to come up, but
neither of my Macs can see the FreeBSD box in the chooser, and running
nbptool on the Mac also does not show the FreeBSD box. When I go to the
FreeBSD box and do a nbplkup, I can see the names of all my Mac, and the
FreeBSD box.

This is an isolated LAN, MacOS 7.5.3 and 7.5.5, classic Appletalk (not IP
or OpenTransport).

I have identical problems with a precompiled asun 2.1.3 (with wrapper), a
2.1.3 I compiled myself (no tcp wrapper), and a 2.1.4 pre11 I compiled
myself (no tcp wrapper).

I took the asun 2.1.3 source kit over to my Mac iici running NetBSD 1.3.2,
built it without tcp wrapper again, and my Macs can see it! nbpklup doesn't
run there, but the chooser and nbptool show the IIci (running BSD), so I am
confident that I have a good source kit and that I am configuring things
correctly.

I have seen references to needed patches for FreeBSD 3, but it appears that
they are in asun 2.1.3.

Does anyone have any leads on solving this problem? I'm sure I'm not the
first one to see it, but I've come up dry on dejanews, freebsd.org, and
altavista (well, _too_ many hits there...)
-
Douglas E. Wegscheid
working for, but not expressing the position of, Whirlpool Corporation
[email-masked]
-
A wrong note played hesitatingly is a wrong note. A wrong note played with
conviction is interpretation.

---

From: "Douglas E. Wegscheid" <[email-masked]>
Date: Thu, 06 May 1999 13:00:34 -0400

At 09:42 AM 5/6/1999 -0500, Glenn Johnson wrote:
>On Thu, May 06, 1999 at 08:47:03AM -0400, Douglas E. Wegscheid wrote:
>
>> netatalk1.4b2-asun2.1.0 package. It installed fine, seems to come up,
>> but neither of my Macs can see the FreeBSD box in the chooser, and
>> running nbptool on the Mac also does not show the FreeBSD box. When I
>> go to the FreeBSD box and do a nbplkup, I can see the names of all my
>> Mac, and the FreeBSD box.
>>
>> This is an isolated LAN, MacOS 7.5.3 and 7.5.5, classic Appletalk (not
>> IP or OpenTransport).
>>
>> I have identical problems with a precompiled asun 2.1.3 (with
>> wrapper), a 2.1.3 I compiled myself (no tcp wrapper), and a 2.1.4
>> pre11 I compiled myself (no tcp wrapper).
>>
>> I took the asun 2.1.3 source kit over to my Mac iici running NetBSD
>> 1.3.2, built it without tcp wrapper again, and my Macs can see it!
>> nbpklup doesn't run there, but the chooser and nbptool show the IIci
>> (running BSD), so I am confident that I have a good source kit and
>> that I am configuring things correctly.
>>
>> I have seen references to needed patches for FreeBSD 3, but it appears
>> that they are in asun 2.1.3.
>>
>> Does anyone have any leads on solving this problem? I'm sure I'm
>> not the first one to see it, but I've come up dry on dejanews,
>> freebsd.org, and altavista (well, _too_ many hits there...)
>> -
>> Douglas E. Wegscheid
>Did you try installing the netatalk-1.4b2+asun2.1.3 port from the
>FreeBSD ports collection? I would guess that there is also a package
>of this. Make sure your ports tree is up to date and check it
>out. There are 16 patches in the FreeBSD ports 'patches' directory for
>netatalk-asun, some of them to source code files.
>
>If you try building netatalk on FreeBSD without at least looking at
>these patches I could understand why it might not work. Of course I
>would recommend just installing the port. If you have already done this
>then, well I don't know. I do know that netatalk-asun installed from the
>port worked fine for me on both FreeBSD 3.0 and FreeBSD 3.1.

there is a package for it, that was the 2nd one I tried (downloaded asun
2.1.3 from freebsd.org and pkg_added it). Perhaps I need to change
something on my clients (but that wouldn't explain why it's OK on
NetBSD...)...

I'm taking a sniffer home tonight...
-
Douglas E. Wegscheid
working for, but not expressing the position of, Whirlpool Corporation
[email-masked]
-
A wrong note played hesitatingly is a wrong note. A wrong note played with
conviction is interpretation.

---

From: Glenn Johnson <[email-masked]>
Date: Thu, 6 May 1999 09:42:40 -0500

Hope this helps.
-- 
Glenn Johnson
Technician
USDA, ARS, SRRC
New Orleans, LA

---

From: "Douglas E. Wegscheid" <[email-masked]>
Date: Fri, 07 May 1999 08:38:10 -0400

I am still trying to get the netatalk-1.4b2+asun2.1.3 (current package
downloaded from freebsd.org) running on FreeBSD-3.1 RELEASE, with no
success. problem is the FreeBSD box does not show up in Choosers or in
nbptool. Macs and FreeBSd show up on FreeBSD box when you do a nbplkup.

questions:

1) I am on an isolated LAN (no existing routers), running classic Appletalk
on the Macs (no OT, no IP). anyway, I think the kernel is OK; I can see
with the sniffer when netatalk comes up where it looks for other routers,
and I can see the exchange between the FreeBSD box and the Macs when I do a
nbplkup. Glenn Johnson (and anyone else), you said you had success running
this setup, do you have other routers? Can you share your atalkd.conf? I am
starting to suspect this is a bug that has gone undetected because everyone
else's FreeBSD boxes are talking to existing routers, and I have none. I
put a sniffer on the wire, and the FreeBSD box will originate lookups when
you do a nbplkup, correctly read the responses from the wire and display
them, but my FreeBSD box is not responding to lookups from the Macs at all...

2) Have I possibly overlooked something I need to do to my 7.5.3 and 7.5.5
Macs to get them to talk phase 2?

3) Blew away /usr/local/etc/atalkd.conf. Shut down. Turn every Mac in the
house off. Power up. Netatalk starts, comes up with address 65280.something.

This looks suspicious to me, I thought that was 65280.* was reserved for
startup. Edit the atalkd.conf to read:

le0 -seed -phase 2 -net 100-200 -addr 100.1 -zone foo

Reboot the box. atalkd rewrites atalkd.conf as

le0 -seed -phase 2 -net 0-65535 -addr 100.1

(perhap -net 0-65536, but definitely not -net 100-200). Why is it ignoring
my -net and -zone? Am I misunderstanding what -seed should do?

4) So I think to myself, hey, mebbe I would just run appletalk phase 1.
Blow away atalkd.conf, fix the netatalk.sh to start atalkd with -1,
shutdown all the Macs, cycle FreeBSD. atalkd won't start, get kernel
messages ('aa_addsingleroute: errno 17' (not sure if it was
aa_addsingleroute, sure the message origniated in at_control.c in the
kernel). Should blowing away atalkd.conf and putting -1 on atalkd
successfully bring up netatalk phase 1?

5) Is there anything I can do to atalkd to get it to provide me with more
information that I can use to debug this? I already enabled the debugging
printouts in the kernel netatalk/at_control.c, so I am getting more
information when the interface gets jiggled...

-
Douglas E. Wegscheid

---

From: Glenn Johnson <[email-masked]>
Date: Fri, 7 May 1999 11:21:04 -0500

On Fri, May 07, 1999 at 08:38:10AM -0400, Douglas E. Wegscheid wrote:

> success. problem is the FreeBSD box does not show up in Choosers or
> in nbptool. Macs and FreeBSd show up on FreeBSD box when you do a
> nbplkup.
Did you try building from the port rather than install the package? It
should not make a difference but sometimes a package built on one
machine does not work properley on another machine due to differences
in the environment. It is rare but I have experienced that for other
programs.
>
> questions:
>
> 1) I am on an isolated LAN (no existing routers), running classic
> Appletalk on the Macs (no OT, no IP). anyway, I think the kernel is ...
                                ^^^^^
I must have missed this bit of info in your previous mail. My setup had
IP on the Mac using MacTCP. I think if you are running Appletalk only
then you need something to bridge the Appletalk protocol to IP. Someone
more knowledgable than me will have to address this.

> with the sniffer when netatalk comes up where it looks for other
> routers, and I can see the exchange between the FreeBSD box and the
> Macs when I do a nbplkup. Glenn Johnson (and anyone else), you said
> you had success running this setup, do you have other routers? Can you
> share your atalkd.conf? I am ...

I did not have any routers. I used the default atalkd.conf. The Mac is
currently tucked away in a closet but maybe I can pull it out and try to
set it up again.

> starting to suspect this is a bug that has gone undetected because
> everyone else's FreeBSD boxes are talking to existing routers, and
> I have none. I put a sniffer on the wire, and the FreeBSD box will
> originate lookups when you do a nbplkup, correctly read the responses
> from the wire and display them, but my FreeBSD box is not responding
> to lookups from the Macs at all...
>
> 2) Have I possibly overlooked something I need to do to my 7.5.3 and
> 7.5.5 Macs to get them to talk phase 2?

If it means anything I was using System 7.1 on the Mac. As I said
though, I had MacTCP set up.
--
Glenn Johnson
[email-masked]

---

From: "Douglas E. Wegscheid" <[email-masked]>
Date: Fri, 07 May 1999 12:55:45 -0400

At 03:28 PM 5/7/1999 +0200, Stefan Bethke wrote:
>"Douglas E. Wegscheid" <[email-masked]> wrote:
>
>> Appletalk on the Macs (no OT, no IP). anyway, I think the kernel is OK; I
>> can see with the sniffer when netatalk comes up where it looks for other
>> routers, and I can see the exchange between the FreeBSD box and the Macs
>> when I do a nbplkup. Glenn Johnson (and anyone else), you said you had
>> success running this setup, do you have other routers? Can you share your
>> atalkd.conf?
>
>> I am starting to suspect this is a bug that has gone undetected because
>> everyone else's FreeBSD boxes are talking to existing routers, and I have
>> none. 
>
>Most definitly not.  I've run 2.2.8, 3.1 and -current in both router-less
>and networks with routers, and as far as I can tell, it works.

What does your atalkd.conf look like in a routerless environment? If I have
no other routers, do I need to put -router in atalkd.conf? Craig Summerhill
just told me about -router (and I see it furthur down in this note); it's
in the source, but I can't find any reference to it in any docs or FAQs (I
am a new subscriber to this list, I understand it has been discussed
recently, but I can't find a list archive for 1999).

would

le0 -router -phase 2 -net 100-100 -address 100.1 -zone Foobar

be right?

>No. Phase 1 is dead for quite some years now.  AFAIR, 7.5 needs OT (or at
>least defaults to it), and OT doesn't do Phase 1.

7.5 still has the 'classic' Appletalk option. I need Appletalk; I have some
7.0.1 on some old boxes, and hope to use the LocalTalk bridge that Apple
has for download to get to Macipgw after I get atalkd configured
correctly... Cheap browsers.

>That's correct if you don't have a router on the network.

Should it show up in the choosers then?

>No, but a router needs to route somewhere.  You'll either have to use the
>-router trick, or set up a (real or dummy) interface to route to.  I
>believe disc can be used for that.  Then, I've never tried, and it might
>well be that disc doesn't support AppleTalk.  I'll try over the weekend.

what is 'disc'? I see that the atalkd does set up an interface the lo0,
does that suffice?
-
Douglas E. Wegscheid
working for, but not expressing the position of, Whirlpool Corporation
[email-masked]
-
A wrong note played hesitatingly is a wrong note. A wrong note played with
conviction is interpretation.

---

From: Stefan Bethke <[email-masked]>
Date: Fri, 07 May 1999 15:28:26 +0200

> I put a sniffer on the wire, and the FreeBSD
> box will originate lookups when you do a nbplkup, correctly read the
> responses from the wire and display them, but my FreeBSD box is not
> responding to lookups from the Macs at all...
> 

> successfully bring up netatalk phase 1?

I suspect Phase 1 is broken in FreeBSD.  See above why it doesn't matter
anymore.  IMHO, all references to Phase 1 should be nuked to avoid
confusion.

> information when the interface gets jiggled...

atalkd is a mess (IMHO).  It would be really nice if someone :-) would try
and add decent debugging.

Stefan

--
Mühlendamm 12           |  Voice +49-40-256848, +49-177-3504009
D-22089 Hamburg         |  e-mail: [email-masked]
Germany                 |          [email-masked]

---

From: Stefan Bethke <[email-masked]>
Date: Fri, 07 May 1999 19:30:37 +0200

"Douglas E. Wegscheid" <[email-masked]> wrote:

> What does your atalkd.conf look like in a routerless environment? If I
> have no other routers, do I need to put -router in atalkd.conf? Craig
> Summerhill just told me about -router (and I see it furthur down in this
> note); it's in the source, but I can't find any reference to it in any
> docs or FAQs (I am a new subscriber to this list, I understand it has
> been discussed recently, but I can't find a list archive for 1999).
> 
> would
> 

Yes.

> 7.5 still has the 'classic' Appletalk option. I need Appletalk; I have
> some 7.0.1 on some old boxes, and hope to use the LocalTalk bridge that
> Apple has for download to get to Macipgw after I get atalkd configured

"Classic Networking" vs. "OpenTransport" is ortogonal to "EtherTalk Phase
I" vs. "EtherTalk Phase II".  Please forget about "Phase I," it doesn't
exist anymore.

Note that this has *nothing* to do with LocalTalk. (But see note below,
fellow Linux readers...)

>>> 3) Blew away /usr/local/etc/atalkd.conf. Shut down. Turn every Mac in
>>> the house off. Power up. Netatalk starts, comes up with address
>>> 65280.something.
>> 

Yes.

> what is 'disc'? I see that the atalkd does set up an interface the lo0,

disc is the discard network interface you can optionally add to your
kernel.  It's like the /dev/null of network interfaces.

The main point in being an AppleTalk router is to announce routes via RTMP.
However, and that is the problem with Adrian's hack, some AppleTalk
implementations choke on empty RTMP packets (which aren't really illegal,
but what is the point in sending out packets announcing zero routes?)

The best (read: most interoperable) way is to add a second interface to
your machine, and let netatalk route between that and your Ethernet.  It
doesn't matter that there's nothing connected to the dummy interface, it is
just there so atalkd has something to put into the RTMP packets it sends
out on the Ethernet.

Try the -router trick.  It seems to work with most equipment, and I guess
that even Classic Networking will work with it.

As for LocalTalk and Phase I: there is/were a driver for the old
Apple/Farallon LocalTalk/PC card for Linux.  This driver pretends to be an
Ethernet interface (the author cut short on implementing a complete new
hardware scheme), and needs Phase I support in order to work.
Incidentially, EtherTalk Phase I and LocalTalk packets share the same
structure, which is called a "non-extended network" in Inside AppleTalk,
2nd ed.

Stefan

--
Stefan Bethke
Muehlendamm 12            Phone: +49-40-256848, +49-177-3504009
D-22087 Hamburg           <[email-masked]>
Hamburg, Germany          <[email-masked]>

---

From: "Douglas E. Wegscheid" <[email-masked]>
Date: Tue, 11 May 1999 08:34:41 -0400

At 02:06 PM 5/7/1999 -0700, a sun wrote:
>in any case, i thought that this was a situation where nothing showed
>up in the chooser even in the routerless case. is that not correct?
>usually, that's a multicast problem. in addition, there used to be a
>problem with net.0 queries in linux, but that usually manifests in
>situations where you're going through routers.

well, I did more work this weekend, and that's where it is.  Macs are still
not seeing the FreeBSD 3.1 with the freebsd.org compiled asun 2.1.3, either
without a atalkd.conf (coming up zoneless), or with a

le0 -router -phase 1 -net 100-200 -addr 100.2 -zone Foo

I can take a netbsd-1.3.2-mac68k system, configure it identically (either
no atalkd.conf, or with -router), and all is well (the Macs see it). I am
not running both boxes at the same time, and I am shutting all Macs down on
the wire in between switching boxes.

My Appletalk knowledge is about nil, but I did some work with the sniffer;
when the mac comes up, it does a series of probes (to make sure it has a
unique address?), then sends a ZIP packet for 'info request'. NetBSD
running -router will answer, FreeBSD running -router will not. The
destination MAC address in the packet is the Apple broadcase address (I
didn't switch to numeric mode to see what that was).

Is there a known bug in FreeBSD-3.1 release receiving Appletalk multicasts
(broadcasts)? Is there some debugging switches or DEFINES I can throw onto
atalkd so I can see if it is getting ZIP packets or not? That would help
narrow it down to atalkd is getting the packets and ignoring them, atalkd
is never getting the packets, or atalkd is getting the packets, sending
them out, and there aren't getting to the wire? What more information can I
collect?

I haven't tested out bringing up the NetBSD system as -router, letting
FreeBSD come up and discover the router, and see what happens then. That's
tonight's exercise...
-
Douglas E. Wegscheid
working for, but not expressing the position of, Whirlpool Corporation
[email-masked]
-
A wrong note played hesitatingly is a wrong note. A wrong note played with
conviction is interpretation.

---

From: a sun <[email-masked]>
Date: Fri, 7 May 1999 14:06:19 -0700 (PDT)

well, it's not that much of a hack. the main difference is that i
allow RTMP broadcasts to be sent across a single interface. anyways,
i see a place that i can make atalkd a little quieter. i'll see what
happens here if i do that.

-a

---

From: "Douglas E. Wegscheid" <[email-masked]>
Date: Wed, 12 May 1999 08:36:47 -0400

At 02:28 PM 5/11/1999 -0700, you wrote:
>okay. would it be possible for you to try another ethernet card to see
>if the ethernet driver is the problem? i know that dec tulip-based
>cards should be good. 
>
>-a

That was it. After getting Adrian's note from yesterday ("usually a
multicast problem"), I was starting to wonder about the ethernet driver
myself (since netatalk works for scores of other people on 3.1-RELEASE, it
must be specific to my hardware or kernel). Recompiled atalkd -DDEBUG and
ran atalkd -d with the sniffer on the wire. None of the multicast packets
were getting through to atalkd. Switched to a 3C509 with the ep driver,
atalkd starting printing out the multicasts. It works now. Spent the rest
of the night cleaning up messes related to all the changes made for
debugging and network interface switching, undoing -router (I don't need it).

will be doing a FreeBSD bug report this weekend for the le driver, it
appears that the multicast support in the le driver for FreeBSD 3.1-RELEASE
is broken.

thanks to _everyone_ for their patient help. Icky problem.
-
Douglas E. Wegscheid
working for, but not expressing the position of, Whirlpool Corporation
[email-masked]
-
A wrong note played hesitatingly is a wrong note. A wrong note played with
conviction is interpretation.

---

From: Michael Bartosh <[email-masked]>
Date: Mon, 27 Sep 1999 02:19:17 -0500

I have posted a couple of times in the past and found no answer-

I have 2 cards- eth0  (ne) which sees my internal network and eth1 
(3c509) which is outside.

All I want is to route between the two interfaces. Running RH6.

atalkd.conf started out as:

en1 -seed
en0 -seed

(no zones are defined in either network)

After starting netatalk:

eth1 -seed -phase 2 -net 65280-65534 -addr 65280.70
eth0 -seed -phase 2 -net 65280-65534 -addr 65280.253

syslog says eth1 might not support multicast but of course it does-

I can see my internal net, but nothing else. nbplkup sees the 
internal net but not the external.

What am I doing wrong?

-mab

---

From: Rob Newberry <[email-masked]>
Date: Mon, 27 Sep 1999 07:37:55 -0500 (EST)

In order to seed, you must explicitly set the network information -- you
need to assign network addresses to both networks:

en1 -seed -phase 2 -net XXX-XXX
en0 -seed -phase 2 -net YYY-YYY

You get to fill in XXX-XXX and YYY-YYY with whatever you want.