Subject: [netatalk-admins] routing problem

From: "Mike Durian" <[email-masked]>
Date: Fri, 25 Jul 1997 10:13:09 -0600

I'm very new to netatalk and AppleTalk in general.  I don't know
if this is an netatalk problem or just an AppleTalk configuration
problem.
  My Unix system is a FreeBSD-current system from Feb 4, 1997.  After
patching atalkd to use a sockaddr_dl argument to the SIOCMULTI ioctl(2),
I was able to get netatalk to run.  I was even able to communicate
to a Mac on the same subnet and access files using afpd.  However,
I'm having no luck routing across multiple ethernets.
  Here's my atalkd.conf before starting atalkd:

fxp0
fxp1
fxp2
ep0

  After running atalkd, atalkd.conf gets modified and reads:

fxp0 -phase 2 -net 65280-65534 -addr 65280.35
fxp1 -phase 2 -net 65280-65534 -addr 0.0
fxp2 -phase 2 -net 65280-65534 -addr 0.0
ep0 -phase 2 -net 65280-65534 -addr 0.0

  With atalkd running, ifconfig -a reports:

fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	inet 206.168.67.137 netmask 0xffffff80 broadcast 206.168.67.255
	atalk 65280.35 range 65280-65534 phase 2 broadcast 0.255
	ether 00:a0:c9:48:cf:b2 
fxp1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	inet 206.168.67.1 netmask 0xffffff80 broadcast 206.168.67.127
	ether 00:a0:c9:48:cf:e2 
fxp2: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	inet 10.168.67.137 netmask 0xffffff80 broadcast 10.168.67.255
	ether 00:a0:c9:48:cf:aa 
lp0: flags=8810<POINTOPOINT,SIMPLEX,MULTICAST> mtu 1500
ep0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	inet 10.168.67.1 netmask 0xffffff80 broadcast 10.168.67.127
	ether 00:a0:24:35:20:4a 
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
	inet 127.0.0.1 netmask 0xff000000 
	atalk 0.0 range 0-0 phase 2

  And when I finally killed atalkd, it reported the following error
three times:

Jul 25 09:55:16 pluto atalkd[5168]: difaddr: Can't assign requested address

  We have a very simple network setup.  There is only one (sometimes two)
Apples on the fxp1 net along with an HP printer.  When I change
/etc/atalkd.conf and only enable fxp1, nbplkup reports:

                          pluto:AFPServer                          65280.188:128
                          pluto:netatalk                           65280.188:4
                          pluto:Workstation                        65280.188:4
                   Tom Goldberg:Canvas4481224630                   65280.1:2
                    tralfamador:NUB6500001206776                   65280.1:251
                    tralfamador:  Power Macintosh                  65280.1:252
                    tralfamador:Workstation                        65280.1:4
                    Pluto Print:SNMP Agent                         65281.128:8
                    Pluto Print:LaserWriter                        65281.128:157
                    Pluto Print:LaserJet 4 Plus                    65281.128:158
              Pluto Print North:SNMP Agent                         65281.129:8
              Pluto Print North:LaserWriter                        65281.129:157
              Pluto Print North:LaserJet 5                         65281.129:158

  I'd like to start routing from some FreeBSD machines running netatalk
on the other subnets to the Macs but I just can't figure out what's
going on.  Our router just won't see the other machines on the other
ethernets even if they are up and running netatalk.  In fact, our
router won't even see the machines on fxp1 if fxp0 is enabled since
it doesn't seem to route anything after the first interface.

  Does anybody have any suggestions for me?

mike

---

From: Bill Studenmund <[email-masked]>
Date: Fri, 25 Jul 1997 11:55:27 -0700 (PDT)

>   With atalkd running, ifconfig -a reports:

[no atalk addresses on fxp1, fxp2, ep0]

> /etc/atalkd.conf and only enable fxp1, nbplkup reports:

[ok I think nbplkup]

>   Does anybody have any suggestions for me?

Yes. Get routers on these nets. You can use your FreeBSD box to be that
router. 

Try something like:

fxp0 -phase 2 -net 1-1 -addr 1.1 -zone "FirstZone"  -seed
fxp1 -phase 2 -net 2-2 -addr 2.1 -zone "SecondZone" -seed
fxp2 -phase 2 -net 3-3 -addr 3.1 -zone "ThirdZone"  -seed
ep0  -phase 2 -net 4-4 -addr 4.1 -zone "FourthZone" -seed

Also, your FreeBSD box will now, I think, route between the nets.

Take care,

Bill

---

From: Stefan Bethke <[email-masked]>
Date: Fri, 25 Jul 1997 21:09:17 +0200

>if this is an netatalk problem or just an AppleTalk configuration
The latter.

>ep0 -phase 2 -net 65280-65534 -addr 0.0
Try:

fxp0 -seed -phase 2 -net 1-1 -zone "My Zone"
fxp1 -seed -phase 2 -net 2-2 -zone "My Zone"
fxp2 -seed -phase 2 -net 3-3 -zone "My Zone"
ep0 -seed -phase 2 -net 4-4 -zone "My Zone"

You can use any zone name you like, also different zone names on different
interfaces.

>Jul 25 09:55:16 pluto atalkd[5168]: difaddr: Can't assign requested address
Probably due to the fact that fxp1, fxp2 and ep0 never got up.

>it doesn't seem to route anything after the first interface.

Does "our router" refer to the FreeBSD machine, or do you have another
router? If it is the FreeBSD machine, then try the above; as evident from
the ifconfig -au output, the other interfaces were not configured for
AppleTalk at all.

Hope this helps,
Stefan

--
Stefan Bethke
Promo Datentechnik      |  Tel. +49-40-851744-0
+ Systemberatung GmbH   |  Fax. +49-40-851744-44
Eduardstrasse 46-48     |  e-mail: [email-masked]
D-20257 Hamburg         |  http://www.Promo.DE/

---

From: Miles Nordin <[email-masked]>
Date: Fri, 25 Jul 1997 17:20:27 -0600 (MDT)

> Also, your FreeBSD box will now, I think, route between the nets.

as a standard disclaimer, i've never done this bevore either but have read
about it a lot.  hopefully i am not about to make a fool of myself.

I don't think you need to specify different zones on each net.  I think
you may be better off using one zone. 

Second, there is one more thing you need to know that he didn't tell you.
There is an ordedr this has to be done in.

1. Shut off _every_ mac on all four subnets.  NO EXCEPTIONS.  maybe use
   nbplkup starting atalkd one net at a time to ensure this.
2. Start atalkd on the FreeBSD machine with Bill's suggested atalkd.conf
3. Restart all the Mac's.

Mac's only choose their node address once at boot.  If there is no router
on the subnet, they will choose the zoneless nets above 65280.  If there
is a router, they will choose an address that falls in the acceptable
range indicated by the router.  but, you cannot start a -seed router if:

  a. there is another seed router on the subnet, or
  b. there is a Mac on the subnet powered on that did not boot under 
     the controlling influence of the seed router you are trying to 
     bring up.

so...  remember, 1 seed router per subnet, and don't start new seed
routers until everyone else is off the subnet. 

For example, if you were to get yet another FreeBSD box with two
interfaces routing between the net on fxp2 and a fifth subnet, you would
config the interface that shared fxp2's wire _without_ -seed, and the
fifth subnet _with_ -seed.  and, everyone on the fifth subnet would have
to power down before you started this second FreeBSD router.

make sense?  anyway good luck...  as i say i've never done this myself,
but as with most things that come out of Apple, the rules have an eerie
almost essential seductive logic to them.

Bill, feel free to correct (and cc: me) if i am wrong about any of this.
i don't have to do this now but probably will some day.  k.  tks, later
guys.

--
Miles Nordin                          home  1-888-857-2723
555 Bryant Street #182                 or  +1 510 608-1813
Palo Alto, CA 94301                   http://www.ivy.net/~carton

---

From: Bill Studenmund <[email-masked]>
Date: Fri, 25 Jul 1997 17:17:08 -0700 (PDT)

> you may be better off using one zone. 

That's a matter of choice. If you have a few macs, you're probably right.

> routers until everyone else is off the subnet. 

I've never heard of this latter restriction. It doesn't seem to be present
in netatalk, as far as I can tell. I've looked in etc/atalkd/main.c, and
there seems to be no checks to see if there are macs on the interface
before seeding an interface.

My copy of Inside Appletalk is at home, but I thought that if a mac booted
w/o seeing a router, but then saw a router, it would change its address to
be in the new netrange. Too bad for any existing connections.

I'll look it up, but it'll be a while before I can get back as I'm moving
across town this weekend.

> to power down before you started this second FreeBSD router.

I'd suggest you put -seed in the second box's config too. I thought (and
I'm sure I'll be corrected) that you can have multiple seed routers AS
LONG AS THEY ALL AGREE. The code in etc/atalkd/zip.c around line 600 in
1.4b2 only squalks if we get a zip reply on a SEED interface which
differes from the seed config. I think it's ok if they agree.

Thus it won't matter what order you started the servers on fxp2!

> almost essential seductive logic to them.

Yeah, but I thought they generally tried to deal with problems on the fly
(like not having a cable hooked up, etc).

Take care,

Bill

---

From: Bill Studenmund <[email-masked]>
Date: Tue, 29 Jul 1997 15:42:29 -0700 (PDT)

>      the controlling influence of the seed router you are trying to 

(sorry for the delay; I've been moving across town)

I looked into it more, and you're kinda right. If there's no router around
when a mac boots, it will pick an address in the routerless nets above
65280. If a router later shows up, it won't change its address. Inside
Appletalk v2 even says so. :-)

I don't think that'll mess up the router's booting with -seed, though, as
atalkd listens for other routers on the wire. Normal mac clients shouldn't
respond, so there won't be a problem. Please let me know if that's wrong.

Also, I don't think you have to have the macs off before booting the
server/router. You just have to restart them after the router comes up
before they will do appletalk correctly. Also, you only have to restart
the macs if they booted with the router off, or with the router in a
different configuration. So if the router just goes down, you can restart
it in the same configuration, and the macs are fine.

The latter's why I've never run into the problem. Our FastPaths are never
down for long, and the net number has been in place for about 7 or 8
years. :-)

Take care,

Bill

---

From: Roy Hockett <[email-masked]>
Date: Wed, 30 Jul 1997 00:12:45 -0400

On Tue, 29 Jul 1997 15:42:29 -0700 (PDT) [email-masked] (Bill

>> Mac's only choose their node address once at boot.

Appletalk devices AARP for network node information any time appletalk
services are started up, whether this be at startup or when you move a
mac from localtalk to ethernet. 

>atalkd listens for other routers on the wire. Normal mac clients
>shouldn't respond, so there won't be a problem. Please let me know if
that's
>wrong.

Mac clients will not respond, however, other appletalk routers will,
such as routers, netware servers routing appletalk (3.1x servers
providing appletalk services), HP directjet cards, will all respond to
the router query for existing network info
on the network.  However, if appletalk routing devices agree on the
network number/range, zone names, and default zone for the network then
bringing  up a new router should not be a problem.

>different configuration. So if the router just goes down, you can
>restart it in the same configuration, and the macs are fine.

You shouldn't have to restart them only toggle their network connection
from
ethernet to localtalk, back to ethernet.  With Open Transport you
shouldn't even need to taggle it, but just open the "AppleTalk" control
panel and it will pole the network to see if there is a router.

-Roy Hockett

/********************************************************************/
/* Roy Hockett                     *   Telephone: (313) 763-7325    */
/* Systems Resource Programmer,    *         FAX: (313) 763-2180    */
/* ITD,                            *    Internet: [email-masked]  */
/* University of Michigan          *   AppleLink: A0366             */
/********************************************************************/

---

From: Eric Fisher <[email-masked]>
Date: Tue, 29 Jul 1997 21:46:30 -0700 (PDT)

I'm setting up a print server on RedHat 4.2 and I want to connect to an
AppleTalk compatible printer.  The only information that I've found points
to a web page that no longer exists.  Does anyone know how to get linux to
talk to an appletalk printer, or at least a current valid reference?

Also, I was wondering if anyone else was experiencing a problem with
netatalk 1.3.3 and MacOS 8.  On my linux fileserver, when logged on and
viewing a directory from a mac, the files and directories literally bounce
around the screen.  Along with this, the number of total items in the
directory also change.  Does anyone have a possible solution?  Does
v1.4b fix this?

Thanks,
Eric Fisher

---

From: Eddy Thesee <[email-masked]>
Date: Wed, 30 Jul 1997 15:21:54 +0200

Eric Fisher wrote:
>  Does anyone know how to get linux to
 Try one of these links:
http://thehamptons.com/anders/netatalk/
or 
http://www.giub.unibe.ch/~eugster/appleprint.html

greetings,

		Eddy.

---

From: Jeffrey Thompson <[email-masked]>
Date: Wed, 30 Jul 1997 10:33:35 -0400 (EDT)

that's

I thought macs broadcasted their address every so often? It should be
the case that atalkd would listen for mac clients that may want to use
it's services. My problem is, when mac clients are turned on, after
atalkd starts, that the mac clients can't use the atlakd service. But
that's not what happens with our AppleShare server. It simply doesn't matter
if your mac is on or not, the AppleShare server listens for additional
clients coming online.  Since I can't rely on an atalkd connection, it makes 
atalkd all but unusable in a mac network.

   >before they will do appletalk correctly. 

Strange. Why does AppleShare not act this way?

I'm contemplating switching to Columbia Appletalk Server, CAP.

---

From: Bill Studenmund <[email-masked]>
Date: Wed, 30 Jul 1997 11:07:30 -0700 (PDT)

> atalkd all but unusable in a mac network.

Appletalk ROUTERS broadcast their address every so often. Actually, on
phase 2 nets, I think they limit themselves to the multicast addresses.

Is you appleshare server trying to be a router? If not, then what you
describe above makes sense. It's not the fact that atalkd will permit file
sharing, but that atalkd acts as a router. When atalkd fires up, the wire
goes from routerless to with-router. If your Appleshare server is just a
file server, it doesn't touch the router question, so its presance won't
change the net numbers on the wire.

I'm puzzled by the latter half of your comment above. If atalkd is acting
as a router (really linking nets together), why isn't it up 24/24 7/7? If
it's not going to be up all the time, then a better choice would be to run
it (atalkd and your net) routerless. Don't add a "-seed" to the
atalkd.conf line for that net. Then your net won't be going from router to
routerless all the time.

> Strange. Why does AppleShare not act this way?

As above, it's not the file serving of netatalk (afpd), but the routing,
which is the problem.

> I'm contemplating switching to Columbia Appletalk Server, CAP.

I think you'll have the same problem with CAP, if you configure it the
same (if you configure UAR to seed the network but don't have UAR up all
the time).

Take care,

Bill