[comp.protocols.appletalk] Need help building Rutgers CAP on SunOS 4.1

scarpell@cnca.cnca-cam.fr (Claude Scarpelli) (10/03/90)

I'm in trouble building Rutgers CAP on SunOS 4.1. Here is my configuration :


                                                      Ethernet backbone
---------------------------------------------------------------------------
   |                                                     |
   |                                                     |
   |                                                 ------------
   |                                                 |  4/470   |
   |                                                 | SunOS 4.1|
---------                                            ------------         
|       | LocalTalk ---------------
|       |-----------| LaserWriter |
---------           ---------------
MacII MacOS
EtherPortII
Appletalk Phase 2
AppleTalk Internet Router


We have two AppleTalk zones : 
	PCD		on LocalTalk  (Network number 11)
	CEPHOM-RED	on EtherTalk  (Network number 25)


I Have installed enet in ther kernel
Then, I have built CAP (in facts, Rutgers CAP) :
	- Configure
	- gen.makes
	- make include
	- make libsmade
Here, some mistake : the lib/cap/encaps directory was empty !
So, I symbolikly link lib/cap/encaps with lib/cap/ethertalk (I don't have
any FastPath : All the Mac (in the future) will speek directly
on the ethernet)
	- (re) make libsmade
	(some warning from C compiler about log function)
	- make programs
	- make install
And then, according to the installation manual, it's time for 'verification' :
$ cat /etc/atalk.local
enet0   cephom-red
$
According to atalk.local(5), I only need the name of the enet device
(/dev/enet0) and the zone name (cephom-red), because I'm using EtherTalk.
Next, I run aarpd (as root)
# aarpd
Acquired node number 96
#
in lib/cap/aarpd, there is a program called aarptest :
#aarptest
zone cephom-red this 0.96 gw 0.0 nis 0.0 intf enet0
#
====> Is this relevant ?
With enet, there is a program called etherstat :
$etherstat
Ethernet device 0 assigned to le0

    Pid  Prio Instate Rcvd  Filter
   2785  128  idle      25 AARP

Totals: Input processed: 415, Input dropped: 0
        Output sent: 415, Output dropped: 0

$
====> Is this relevant ?
Then, I test atlook
# atlook
abInit: [ddp:   0.00, 96], [NBP (atis) Server:   0.00, 0] starting
Looking for =:=@* ...
# echo $?
1
#
# atlook -d ldanpis
abInit: [ddp:   0.00, 96], [NBP (atis) Server:   0.00, 0] starting
debugging LAP
debugging DDP
debugging ATP
debugging NBP
debugging PAP
debugging INI
debugging ASP
Looking for =:=@* ...
NBP SndNBP: sending
NBP nbp_timeout: 3 tick timeout on -134218768, 3 remain
NBP SndNBP: sending
NBP nbp_timeout: 3 tick timeout on -134218768, 2 remain
NBP SndNBP: sending
NBP nbp_timeout: 3 tick timeout on -134218768, 1 remain
NBP SndNBP: sending
NBP nbp_timeout: 3 tick timeout on -134218768, 0 remain
# echo $?
3
#
====> Is this relevant ? Sure, the answer is no. 
For all the '====>', is there anybody who can help me ?

After that, I also try atis :
# atis
abInit: [ddp:   0.00, 96], [NBP (atis) Server:   0.00, 0] starting
atis: Tue Oct  2 17:37:12 1990 Reply num max for lkup reply is 5 (based on 104)
#
# atistest
CAP distribution 5.00 using UDP encapsulation, March 1988
Copyright (c) 1986,1987,1988 by The Trustees of Columbia University in the City of New York

abInit: [ddp:   0.00, 96], [NBP (atis) Server:   0.00, 0] starting
debugging NBP
Registering "atis test:testing@*"
NBP SndNBP: sending
NBP nbp_timeout: 4 tick timeout on -134218756, 3 remain
NBP SndNBP: sending
NBP nbp_timeout: 4 tick timeout on -134218756, 2 remain
NBP SndNBP: sending
NBP nbp_timeout: 4 tick timeout on -134218756, 1 remain
NBP SndNBP: sending
NBP nbp_timeout: 4 tick timeout on -134218756, 0 remain
NBP SndNBP: sending
NBP nbp_timeout: 4 tick timeout on -134218756, 3 remain
NBP SndNBP: sending
NBP nbp_timeout: 4 tick timeout on -134218756, 2 remain
NBP SndNBP: sending
NBP nbp_timeout: 4 tick timeout on -134218756, 1 remain
NBP SndNBP: sending
NBP nbp_timeout: 4 tick timeout on -134218756, 0 remain
nbp register error because: couldn't register name - is atis running?
#                                                    ^
#                                                    |
====> Sure, atis is KO  ------------------------------
====> another question : the network number(25) appears nowhere : stange,
isn't it ?

Anybody cam help me ?
Thank's in advance

farrell@PANGEA.STANFORD.EDU (Phil Farrell) (10/03/90)

Claude Scarpelli requests help debugging his installation of the ethertalk
version of CAP on a Sun 4 server, with Apple Internet Router on a Mac II
connecting the ethernet to a localtalk segment.

I can't make any sense of the detailed debugging information he presents,
but one thing struck me right off the top:  He says the Apple Internet 
Router is running "AppleTalk Phase II".  As far as I know, CAP is 
strictly Phase I only.  In that case, CAP would see nothing on AppleTalk
with his setup.

-Phil Farrell, Computer Systems Manager
Stanford University School of Earth Sciences
farrell@pangea.stanford.edu

tkr@praxis.co.uk (Tim Rylance) (10/04/90)

scarpell@cnca.cnca-cam.fr (Claude Scarpelli) writes:

>I'm in trouble building Rutgers CAP on SunOS 4.1.

I had the same problems:

  1. aarpd starts OK and acquires a node number
  2. atis starts OK but doesn't discover EtherTalk network number
     (even though it sees RTMP packets from Kboxes)
  3. aarptest always says "nis 0.0"
  4. atistest fails to register a service, as does aufs.

(I have a small network - a single ethernet backbone with 3 Kboxes
running K-Star 7.0, a bunch of Suns, and about 15 Macs with ethernet
cards.  I don't run atalkad.)

I fixed things with the following patches:

*** lib/cap/aarpd/aarpd.c-	Sat Jul 28 22:30:52 1990
--- lib/cap/aarpd/aarpd.c	Tue Oct  2 17:20:56 1990
***************
*** 79,85 ****
    init_fdlistening();  /* low level scheduler */
    etalk_init(&id, FALSE);
  
!   this_node = etalk_mynode(&id);
  
    printf("Acquired node number %d\n", this_node);
  
--- 79,85 ----
    init_fdlistening();  /* low level scheduler */
    etalk_init(&id, FALSE);
  
!   this_node = nis_node = etalk_mynode(&id);
  
    printf("Acquired node number %d\n", this_node);
  
*** etc/atis.c-	Sat Jul 28 08:50:51 1990
--- etc/atis.c	Tue Oct  2 17:24:32 1990
***************
*** 653,658 ****
--- 653,660 ----
    net = *(u_short *)pkt;
    log(7, "Got RTMP pkt net %d from %d.%d", net, addr->net, addr->node);
  
+   if (addr->net == 0) addr->net = net;	/* tkr: must be our net */
+ 
    if (net == addr->net)
      SetMyAddr(addr);
  
Initializing nis_node in aarpd is a "good guess", it would be better to do it
in atis but I couldn't stomach #include "../lib/cap/enacps/sharedpage.h"
(or rearranging the source tree).  This should make the package work on
an isolated EtherTalk network (no routers), though I have not tested this
configuration yet.

The change to atis makes it acquire the network number from the "Sender's
network number" of the first RTMP packet it sees.  "Inside AppleTalk" (1st ed)
says on page 5-12 "this field allows the receiver of the packet to determine
the network number through which the packet was received".

Have I missed something?  Comments and flames welcome...

Tim Rylance
tkr@praxis.co.uk

hedrick@athos.rutgers.edu (Charles Hedrick) (10/05/90)

First, I apologize for not having the encaps symlink installed
automatically.  You did right: it should be linked to ethertalk 
if you're using the ethertalk configuration.

I believe you built things correctly.

Your test results, except for atistest, are all consistent with a
correctly operating CAP that simply has nothing on the network to talk
to.  If everything else on the network is using phase II, that is
indeed the case.  The CAP version at Rutgers currently supports only
phase I, because it is based on the UAB Ethertalk code, and that only
supports phase I.  I do hope to do phase II, but it's like to be a few
months.  Among other things, I currectly have no documentation on the
differences between phase I and II.

Note that the configuration you're talking about, which is native
Ethertalk (i.e. not UAB) gets the network number dynamically from the
network, by looking at RTMP packets.  I believe this is the official
Apple way of finding your network number.  If you aren't hearing any
routers, then you won't ever get a network number.  That's the reason
for all the 0's.  Rocky Patel (who is really our Appletalk maintainer
-- I did the Ethertalk work, but don't normally work with CAP) is
probably going to put in an option to let you specify a network
number, for situations where there is no router on the network.

A later posting gives patches that one site found necessary because
atis wasn't getting the right information from their routers.  Atis
handles all the dynanimc stuff.  It acquires both the network number
and the address of the default router, based on the most recent RTMP
packet.  I believe the code is correct as distributed, and seems to
work here with a variety of routers.  But if you're having problems,
there's nothing wrong with hardwiring both the network number and
default router.  Probably the best way to do that would be to run atis
with listening to RTMP disabled, and make aarpd set up the network
number and default router.  To do the latter, in
lib/cap/aarpd/aarpd.c, right after

  this_node = etalk_mynode(&id);

add

 {
  AddrBlock addr;

  addr.node = <default router node number>;
  addr.net = <net number>;
  SetMyAddr(&addr);
 }

You can pass the router node number and net number as arguments to
aarpd or read them from /etc/atalk.local.  The latter is cleaner, but
would require more work.