Subject: Netatalk was running before, now broken...

From: Dan Ramaley <[email-masked]>
Date: Thu, 14 Feb 2002 18:30:14 -0600 (CST)

I work as the tech guy in the library at a university. We have a file
server running OpenBSD 3.0 with whatever version of netatalk comes with
it; the package is labeled as netatalk-990130. Before Christmas break
everything was working fine. After break the netatalk server is no
longer working. It does not show up in the Chooser on the Macs, nor is
it accessible by IP. I have spoken with the network administrator about
this problem. He told me that the only things that changed over break
that could possibly affect it was upgrading the router that services our
building from a 3Com to a Cisco, and new net.node numbers were assigned.
All the Macs on campus still work just fine. The only machine having any
trouble is our netatalk server. I don't know what is wrong, but below i
will include lots of information and hopefully someone will notice
something that is amiss and can please offer some assitance. Thanks
much.

Here are the commands that my netatalk start script executes:

# Change this to set the machine's atalk name:
ATALK_NAME="Backup Server"
# Change this to set the machine's atalk zone:
ATALK_ZONE="Cowles Library"
# Change this to increase the maximum number of clients that can connect:
AFPD_MAX_CLIENTS=25
# Comment out this line to enable guest logins:
#AFPD_NOGUEST=-G
# Change this to set the id of the guest user:
AFPD_GUEST=nobody
/usr/local/libexec/atalkd -f /etc/netatalk/atalkd.conf
/usr/local/bin/nbprgstr -p 4 "${ATALK_NAME}:Server@${ATALK_ZONE}"
/usr/local/bin/nbprgstr -p 4 "${ATALK_NAME}:netatalk@${ATALK_ZONE}"
/usr/local/libexec/afpd -f /etc/netatalk/AppleVolumes.default \
     ${AFPD_NOGUEST} -g ${AFPD_GUEST} -n \
     "${ATALK_NAME}:AFPServer@${ATALK_ZONE}" -c ${AFPD_MAX_CLIENTS}

My /etc/netatalk/atalkd.conf is empty except for comment lines. The
/etc/netatalk/AppleVolumes.default contains 2 non-comment lines that
look like this:

/home/netatalk/boot_images "Boot Images" noadouble
/home/netatalk/public "Public" noadouble

Now, the error messages. During boot this is what appears on the console:

starting appletalk daemons:pflog0: disabled.
enc0: disabled.
bridge0: disabled.
bridge1: disabled.
vlan0: disabled.
vlan1: disabled.
 atalkdnbp_rgstr: Undefined error: 0
Can't register Backup Server:Server@Cowles Library
nbp_rgstr: Undefined error: 0
Can't register Backup Server:netatalk@Cowles Library
 nbprgstr afpd.

If i check the /var/log/daemon log file, i get this:

Feb 14 17:36:01 backup atalkd[15550]: restart (990130-OpenBSD-1.1.2)
Feb 14 17:36:03 backup atalkd[15550]: zip_getnetinfo for dc0
Feb 14 17:36:04 backup atalkd[15550]: zip_getnetinfo for dc0
Feb 14 17:36:04 backup atalkd[15550]: zip gnireply from 202.60 (dc0 12)
Feb 14 17:36:06 backup atalkd[15550]: zip_packet configured dc0 from 202.60
Feb 14 17:36:14 backup atalkd[15550]: rtmp_packet gateway 202.60 up
Feb 14 17:36:51 backup atalkd[15550]: as_timer can't get zone for 101
Feb 14 17:36:51 backup atalkd[15550]: as_timer can't get zone for 300
Feb 14 17:36:51 backup atalkd[15550]: as_timer can't get zone for 400
Feb 14 17:36:51 backup atalkd[15550]: as_timer can't get zone for 500
Feb 14 17:36:51 backup atalkd[15550]: as_timer can't get zone for 600
Feb 14 17:36:51 backup atalkd[15550]: as_timer can't get zone for 9010
Feb 14 17:36:51 backup atalkd[15550]: ready -2/0/0
Feb 14 17:37:09 backup afpd[14552]: Can't register Backup Server:AFPServer@Cowles Library
Feb 14 17:51:15 backup atalkd[25690]: restart (990130-OpenBSD-1.1.2)
Feb 14 17:51:15 backup atalkd[25690]: bind 0.0:6: Address already in use
Feb 14 18:19:31 backup atalkd[15550]: as_timer can't get zone for 101
Feb 14 18:19:31 backup atalkd[15550]: as_timer can't get zone for 300
Feb 14 18:19:31 backup atalkd[15550]: as_timer can't get zone for 400
Feb 14 18:19:31 backup atalkd[15550]: as_timer can't get zone for 500
Feb 14 18:19:31 backup atalkd[15550]: as_timer can't get zone for 600
Feb 14 18:19:31 backup atalkd[15550]: as_timer can't get zone for 9010

The as_timer messages repeat every 30-40 minutes for as long as the
machine is up. Doing a "ps ax" to actually see what is running shows
only one relevant entry:

  PID TT   STAT      TIME COMMAND
15550 ??  S       0:00.07 /usr/local/libexec/atalkd -f /etc/netatalk/atalkd.con

I tried running "ifconfig dc0" to see if it would reveal anything:

dc0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        media: Ethernet autoselect (100baseTX full-duplex)
        status: active
        inet6 fe80::2a0:ccff:fe57:b82d%dc0 prefixlen 64 scopeid 0x1
        inet 10.2.1.48 netmask 0xffff0000 broadcast 10.2.255.255
        AppleTalk 220.94 range 200-299 phase 2 broadcast 220.94

>From the last line it looks to me like netatalk picked up a network
number of 220, which is within the range (200-299) that the network
administrator said it should be within. I have tried manually setting
the network number and node to values provided by the network
administrator for testing in atalkd.conf, but it did not work. Any
ideas?

------------------------------------------------------------------------
Dan Ramaley
Digital Media Library Specialist
(515) 271-1934
Cowles Library 140, Drake University

---

From: Damien MATTEI <[email-masked]>
Date: Fri, 15 Feb 2002 09:11:16 +0100

> administrator for testing in atalkd.conf, but it did not work. Any

you're problem is really interesting!
it's probably due to the new router, i had a printer (Lexmark Optra
C710) using a 
net.node number (>65000) out of the routing capacity of the router, and
she was invisible from others users , and i could't do anything but use
TCP/IP lpr with it.
But in your system it seems that the appletalk server is in a valid node
range.
-- 
Damien Mattei					Phone: +33 (0)4 93 37 76 66
C.N.R.S / U.N.S.A				Fax:   +33 (0)4 93 53 30 71
UMR 6549 Instabilite & Alterations des Genomes	E-mail: [email-masked]
Faculte de Medecine - Avenue de Valombrose - 06107 NICE Cedex 2 - France

---

From: Dan Ramaley <[email-masked]>
Date: Fri, 15 Feb 2002 08:36:15 -0600 (CST)

To make sure the network is good, i plugged an iMac into the same switch
that the netatalk server is plugged into and set up filesharing. From a
different Mac i was able to see the iMac in the chooser just fine. To
further test it i mounted a share and was able to access files within
the share. I ran a utility called CheckNET and it showed the iMac with
an address of 294.99. As i posted in my last message, the netatalk
server appears to be trying to use 220.94. Since both the iMac and the
netatalk server are on the same switch and the iMac works but the
netatalk server does not, i am led to believe that the new router is not
the problem. Are there any other tests i should perform to help clarify
this or to show that the router is in fact the problem? Any other ideas
as to what could be wrong?

---

From: Thomas Kaiser <[email-masked]>
Date: Sun, 17 Feb 2002 11:38:17 +0100

On Thu, 14 Feb 2002 18:30:14 -0600 (CST), Dan Ramaley wrote:

> My /etc/netatalk/atalkd.conf is empty except for comment lines.

If you have multiple interfaces on this host then try to use:

dc0 -phase 2

Atalkd tries to modify atalkd.conf, so if it is not acting as a seed router
on an interface, it will write its AppleTalk address (given by the AppleTalk
router) and the published zonenames for this segment into atalkd.conf, so
you will get something like eg.

dc0 -phase -net 200-299 -addr 220.94 -zone "Another zone name"

afterwards. For debugging purposes you can use nbplkup and getzones or the
output of nbprgstr (read the man pages for details)

Regards,

Thomas

---

From: Dan Ramaley <[email-masked]>
Date: Mon, 18 Feb 2002 09:39:16 -0600 (CST)

> output of nbprgstr (read the man pages for details)

I thought i'd already tried adding stuff to atalkd.conf at one point,
but i tried again. I added "dc0 -phase 2" as you suggested (even though
the server only has one interface) and restarted netatalk. What happened
was all the same stuff i've discussed in previous messages except the
line i wrote into atalkd.conf was changed to:

dc0 -phase 2 -net 200-299 -addr 291.192 -zone "Select Proper Zone"

"Select Proper Zone" is the default zone on the AppleTalk network here.
I still get the same error messages in the logs and the netatalk server
does not show up in the chooser.

If i run getzones i get one line like this:

Select Proper Zone

It doesn't matter if getzones is run without command line arguments or
not; if i add either "-l" or "-m" as listed in the man page, the output
remains the same.

nbprgstr is already being run by the netatalk start script. If i run the
commands from the start script manually, the resulting interaction looks
like this:

bash-2.05# nbprgstr "Backup Server:Server@Cowles Library"
nbp_rgstr: Undefined error: 0
Can't register Backup Server:Server@Cowles Library
bash-2.05# nbprgstr "Backup Server:netatalk@Cowles Library"
nbp_rgstr: Undefined error: 0
Can't register Backup Server:netatalk@Cowles Library

nbplkup with no arguments gives a couple pages of output like so:

                   E100B1@LIBNT:Microsoft( Windows NT* Prt 4.00    292.244:2
028ED4A6E056730466F0A934@CCAIRNS:Microsoft( Windows 2000* Prt       248.179:2
0A70869ED0894104ED80975@MERID224:Microsoft( Windows 2000* Prt       232.223:2
04D1EBA0C0836C04D8@DISABILITY-PC:Microsoft( Windows 2000* Prt       248.79:2
0C65BDD470C28F049390BE1@SECURITY:Microsoft( Windows 2000* Prt       216.94:2
05EC6332407BBF04E@OPTIPLEX-WIN2K:Microsoft( Windows 2000* Prt       276.229:2
               El90x1@DIMENSION:Microsoft( Windows NT* Prt 4.00    256.251:2
                   Router.Vlan2:ciscoRouter                        202.60:254
                               :ARA - Personal Server              257.142:2
                      <Unnamed>:  Power Macintosh                  257.142:252
                   <Unnamed>-15:  Power Macintosh                  289.70:252
  0182767273|qTimes DelphicBy:QuarkXPress<                       281.194:249
                Managing Editor:AFPServer                          281.194:247
                Managing Editor:PPCToolBox                         281.194:250
                Managing Editor:ARA - Personal Server              281.194:2
                Managing Editor:Multi-User Client                  281.194:48
                Managing Editor:  Power Macintosh                  281.194:252
                Managing Editor:Workstation                        281.194:4
                   <Unnamed>-22:  Power Macintosh                  284.163:252
     Carol SpauldingUs Computer:ARA - Personal Server              245.24:2
     Carol SpauldingUs Computer:Multi-User Client                  245.24:48
     Carol SpauldingUs Computer:  Power Macintosh                  245.24:252
     Carol SpauldingUs Computer:Workstation                        245.24:4
                           tech:  Power Macintosh                  208.216:252
                           tech:Workstation                        208.216:4
     Arts & Sciences 2 - LW Pro:LaserWriter                        200.104:128
                   meridith 224:AFPServer                          219.82:250
                   meridith 224:ARA - Client-Only                  219.82:2
                   meridith 224:  Power Macintosh                  219.82:252
                   meridith 224:Workstation                        219.82:4
                    <Unnamed>-5:  Power Macintosh                  247.213:252
       George McTyreUs Computer:AFPServer                          257.244:250
       George McTyreUs Computer:ARA - Personal Server              257.244:2
       George McTyreUs Computer:  Power Macintosh                  257.244:252
       George McTyreUs Computer:Workstation                        257.244:4
        3rd flr Music LW rm 321:LaserWriter                        200.81:128
                        sanders:AFPServer                          278.239:249
                        sanders:EPSON IJ Notification              278.239:250
                        sanders:ARA - Client-Only                  278.239:2
                        sanders:  Power Macintosh                  278.239:252
                        sanders:Workstation                        278.239:4
                             du:AFPServer                          268.27:250
                             du:ARA - Personal Server              268.27:2
                             du:Multi-User Client                  268.27:48
                             du:  Power Macintosh                  268.27:252
                             du:Workstation                        268.27:4
              cowles maclab b10:AFPServer                          282.244:249
              cowles maclab b10:ARA - Client-Only                  282.244:2
           Cowles MacLab UserF4:Lunch                              282.244:251
              cowles maclab b10:  Power Macintosh                  282.244:252
              cowles maclab b10:Workstation                        282.244:4
                               :ARA - Client-Only                  254.154:2
                   <Unnamed>-19:  Power Macintosh                  254.154:252
     Arts & Sciences 1 - LW Pro:LaserWriter                        200.196:128
                    <Unnamed>-2:  Power Macintosh                  209.17:252
     MIRH to DU Security Burris:VAResponder                        276.213:251
     MIRH to DU Security Burris:  Power Macintosh                  276.213:252
     MIRH to DU Security Burris:Workstation                        276.213:4
                   <Unnamed>-24:  Power Macintosh                  249.250:252
                  DTMRC8-A46/98:TB2Pro.523 ....M.aI.d.coSxtdiAv.   22.207:2
                  DTMRC8-A46/98:AFPServer                          22.207:249
                  DTMRC8-A46/98:ARA - Client-Only                  22.207:2
                  DTMRC8-A46/98:  Power Macintosh                  22.207:252
                  DTMRC8-A46/98:Workstation                        22.207:4
086027C7D09BB104A@PETER-GOPLERUD:Microsoft( Windows 2000* Prt       224.42:2
            Electronic News Lab:LaserWriter                        200.37:128
Meredith 124C LaserWriter 16/600:LaserShared                        200.182:129

Since getzones returns the default zone (i would think it would return
the rest of the zones, but returning 1 seems like a start) and nbplkup
finds lots of stuff (but not even close to everything that exists on the
network), it would seem to me that at some level things are working. But
things aren't completely working else i wouldn't be getting error
messages from netatalk and it would show up in the chooser on the Macs.
I appreciate the suggestions so far. But are there any other ideas that
may help solve this problem?

---

From: Thomas Kaiser <[email-masked]>
Date: Mon, 18 Feb 2002 17:08:35 +0100

On Mon, 18 Feb 2002 09:39:16 -0600 (CST), Dan Ramaley wrote:

> the line i wrote into atalkd.conf was changed to:
> 
> 

Fine.

> "Select Proper Zone" is the default zone on the AppleTalk network here.

What about the other zones on your network? Are you using zone mapping, that
means, publishing the same zone name in several segments?

If you open the AppleTalk control panel on a macintosh in the same segment:
Can you choose from a zone list?

> does not show up in the chooser.

The server will only show up in chooser if afpd starts correctly and
registers itself as type "AFPServer".

> not; if i add either "-l" or "-m" as listed in the man page, the output

So 'getzones -l 202.60' won't show you more zones?
 
> [...]

But what happens, if you try to

    nbprgstr "Backup Server:AFPServer@Select Proper Zone"

Does something like 'Backup Server' appears in the chooser afterwards?

> Can't register Backup Server:netatalk@Cowles Library

Please remember: You set your zone to "Cowles Library" in netatalk.conf. If
this zonename isn't valid on this segment, you won't be able to register
services or names into this zone.

> nbplkup with no arguments

Which is equal to 'nbplkup @*' (looking for devices in the default zone)

> gives a couple pages of output like so:
> [...]

Is "Cowles Library" a valid zonename on your network? If so, try 'nbplkup
"@Cowles Library"'

> the rest of the zones, but returning 1 seems like a start)

In general it returns all zones available to atalkd expect when you use the
'-l' switch. 

> and nbplkup finds lots of stuff (but not even close to everything that exists
> on the network), 

You asked nbplkup to just look into the default zone and so it did.

> it would seem to me that at some level things are working.

The only thing, that's confusing to me, is the output of getzones.

> But things aren't completely working else i wouldn't be getting error messages
> from netatalk 

Probably you try to do something illegal (in AFP terms ;-) --> registering
in a wrong zone.

> and it would show up in the chooser on the Macs.

Same as above. Maybe an illegal zone in this segment.

Regards,

Thomas

---

From: Dan Ramaley <[email-masked]>
Date: Mon, 18 Feb 2002 12:14:47 -0600 (CST)

> > dc0 -phase 2 -net 200-299 -addr 291.192 -zone "Select Proper Zone"

Oddly enough though, before winter break when everything worked, the
atalkd.conf was empty and netatalk never tried writing stuff to it.

> means, publishing the same zone name in several segments?

I'm not familiar enough with how AppleTalk works to know with certainty
what you are asking, so i'll describe some network behavior: Each
building on campus has a zone named after it, plus there is an
additional default zone called "Select Proper Zone". If you plug a Mac
into the network which has not been set up to be in a specific zone, it
will show up in Select Proper Zone. Within the AppleTalk control panel
on the Mac you can then choose between several available zones. Where i
am on campus, 9 zones show up that correspond to the nearest building.
"Cowles Library" is one of the zones that are available, and is also the
name of the building i'm in. So the Macs in the building have been set
to the Cowles Library zone, although i could have chosen a different
zone for them. And back in December before the netatalk server broke, it
showed up just fine in the Cowles Library zone. Now, there are more than
9 zones on campus; if i look in the chooser on a Mac i see 36 different
zones. But from where i am at only 9 are available to place a machine
into in the AppleTalk control panel. If i were to go to a different
building on campus a different set of zones would be available in the
AppleTalk control panel. All 36 zone names are visible in the chooser
everywhere on campus, but within different areas on campus only some of
them are available to place the machine into in the AppleTalk control
panel, with the exception of "Select Proper Zone" which is available
everywhere and is the default everywhere.

> Can you choose from a zone list?

Yes. Right now i have a Mac plugged into the same switch as the netatalk
server. In the AppleTalk control panel there are 9 zones and i can
choose any of them.

> So 'getzones -l 202.60' won't show you more zones?

Here's what i get when running that:

bash-2.05# getzones -l 202.60
atp_rresp: Connection timed out

> Does something like 'Backup Server' appears in the chooser afterwards?

Hmmm, no that didn't do much:

bash-2.05# nbprgstr "Backup Server:AFPServer@Select Proper Zone"
nbp_rgstr: Undefined error: 0
Can't register Backup Server:AFPServer@Select Proper Zone

> services or names into this zone.

The Cowles Library zonename is valid. The netatalk server was using it 2
months ago just fine. Right now Macs are using it just fine.

> Is "Cowles Library" a valid zonename on your network? If so, try 'nbplkup

That command gives no output.

>From the chooser on a Mac there is one server and one LaserJet printer
in the zone. There are several other machines in the zone that don't
have any shares available and do not show up in the chooser, but an
AppleTalk scanning utility i have called CheckNET finds the other
machines in the zone.

> Same as above. Maybe an illegal zone in this segment.

Well, i am very sure that the "Cowles Library" zone is valid, since i
currently have Macs using it and netatalk was using it before winter
break. I don't know if you recall from my previous posting, but before
winter break it was working. After break it was not. I spoke with the
network adminstrator and he told me that over break a 3Com router was
replaced with a Cisco and the net.node numbers were reassigned.

Thank you again for your help so far. Anything else i should try? Or is
there anything else i should ask the network administrator that would
give some additional clues as to the problem?

---

From: Thomas Kaiser <[email-masked]>
Date: Mon, 18 Feb 2002 22:06:14 +0100

On Mon, 18 Feb 2002 12:14:47 -0600 (CST), Dan Ramaley wrote:

> Now, there are more than 9 zones on campus; if i look in the chooser on a Mac
> i see 36 different zones.

Okay. From your previous posting, I would assume, that you have 7 physical
network segments connected by the Cisco router. In every segment there are a
couple of zones published and one zonename "Select Proper Zone" in every
segment as default zone.

With the older 3Com Router you weren't able to see the other zones? If so,
then the 3Com has filtered ZIP in some way, I believe...

> But from where i am at only 9 are available to place a machine into in the
> AppleTalk control panel.

This is okay, as you can only use zone names, that are published in the
proper network range.

> winter break it was working. After break it was not.

But since then, you have more zones available in chooser than before?

> I spoke with the network adminstrator and he told me that over break a 3Com
> router was replaced with a Cisco and the net.node numbers were reassigned.

If that's all, then there shouldn't be problems...

Maybe atalkd is confused about the count of zones.

> [...] Anything else i should try?

You might want to give RouterCheck a try:

    <http://www.neon.com/RouterCheck.html>
    <http://www.neon.com/demos_goodies.html>

> Or is there anything else i should ask the network administrator that would

Well, I'm not familiar with Cisco's AppleTalk implementation at all (just
read some documentation). Maybe one can play around with RTMP and/or ZIP
filtering?

Or you give Netatalk 1.5 a try? (But I experienced some problems with
'getzones' in 1.5 that haven't been there before --> 1.4b2-asun2.1.3)

Regards,

Thomas

---

From: Dan Ramaley <[email-masked]>
Date: Tue, 19 Feb 2002 19:53:20 -0600 (CST)

> then the 3Com has filtered ZIP in some way, I believe...

With the old 3Com router i was able to see all zones. To a user on a
Mac, nothing appears to have changed. New net.node numbers were
assigned, but the Macs (for the most part) picked those up transparently.

> But since then, you have more zones available in chooser than before?

No. The zones in the chooser are the same as before.

>     <http://www.neon.com/demos_goodies.html>

Thanks for the suggestion. The summary report generated by the demo
version of RouterCheck is about 15 kB so i don't think i'll post it to
this list. I found a couple things in the report that seem odd to me,
but i know little about AppleTalk. I'll send the report to the network
administrator and ask him about it.

Thanks again for your help. Hopefully i'll be able to get this solved
soon; there are a few tasks that i can't do until it is fixed.

If anyone has any other ideas, i'd be most glad to hear them.