Subject: RE: Apple Share of IP

From: Brian Curtis <[email-masked]>
Date: Tue, 11 Dec 2001 11:44:07 -0500

I can see the server through the chooser and I can load the shared point ok.
It just uses AppleTalk and I want it to go through ASIP.
 
I entered eth0 into atalkd.conf
 
It now says
eth0 -phase 2 -net 0-65534 - addr 65280.153

Brian Curtis 

Information Technology Manager 
Red-Wire 
Kelliher Samets Volk 
802.862.8261 

-----Original Message-----
From: Wes Yates [mailto:[email-masked]] 
Sent: Tuesday, December 11, 2001 11:43 AM
To: [email-masked]
Subject: RE: Apple Share of IP

I have the version of netatalk 1.4b2+asun2.1.3-6.i386

I get something similiar to you

localhost afpd[2513]:  FileServer:AFPServer@* started on 65280.153:128
(1.4b2+asun2.1.3)

localhost afpd[2513]:  ASIP started on 127.0.0.1:12000(2) (1.4b2+asun2.1.3)

localhost afpd[2517]:  session from 65280.249:246 on 65280.152.129

What stands out to me is my local loop back address, should that be my IP
192.168.10.57?

I am using Mac OS 9 and connecting through the chooser.

Brian Curtis

Information Technology Manager
Red-Wire
Kelliher Samets Volk
802.862.8261

As mine goes, yes. What do you have for your atalkd.conf? OS 9 has ASIP
client, so thats no issue. Can you see the server from a Mac?

65280.153:128 is your appletalk net:node number and 127.0.0.1 is the
interface its working off. mine is working off eth0.

-Wes Yates

-- 

-Wes Yates
[email-masked]
wesyates.homeip.net

-----------------------------------------------------------------------
"The source flows through all living things, some more than others. Only 
those in tune with the source are worthy of being called, Jedi.

Proprietary code leads to fear... fear leads to anger... anger leads to
hate... hate leads to suffering!"

~spot, Jedi master

---

From: Wes Yates <[email-masked]>
Date: Tue, 11 Dec 2001 11:52:34 -0500

>I can see the server through the chooser and I can load the shared 
>point ok.  It just uses AppleTalk and I want it to go through ASIP.
>

That should work. restart atalk and check the /var/log/messages.

-wes

-- 

-Wes Yates
[email-masked]
wesyates.homeip.net

<-= Tag removed to protect the innocent =->

---

From: Thomas Kaiser <[email-masked]>
Date: Tue, 11 Dec 2001 18:04:26 +0100

> eth0 -phase 2 -net 0-65534 - addr 65280.153

Okay. AppleTalk is working fine.

Now you should configure the correct settings so that your server will also
supply the correct IP address when connecting, so that your AppleShare
clients will try it with AFPoverTCP instead of AFPoverAppleTalk (what's
happening behind the scenes while you are logging in is discussed here
<http://www.umich.edu/~rsug/netatalk/archive/admins/2001/0016.html> -- you
might want to try google's cached version as the host seems to be down right
now: <http://www.google.com/search?q=cache:_fy_Vwp6Dpg:www.umich.edu/~rsug/n
etatalk/archive/admins/2001/0016.html>).

What looks your afpd.conf like? You are using netatalk 1.42 with
asun-patches so you should have there a line with your Servers NBP name
(AppleTalk name as shown in chooser) followed by "-address [eth0's ip
address]"

As you are using redhat please take care of your /etc/hosts file. Make sure
the first line in it lists also the real eth0 ip address and *not*
"127.0.0.1 localhost" (I think this will fix it already but it might also be
better to explicitely configure the ip address in afpd.conf)

Regards,

Thomas

---

From: Wes Yates <[email-masked]>
Date: Tue, 11 Dec 2001 15:22:03 -0500

>better to explicitely configure the ip address in afpd.conf)

Oh yes! Do this. I forgot...

-wes

-- 

-Wes Yates
[email-masked]
wesyates.homeip.net

"...no, your other backslash."

---

From: Jamie Flournoy <[email-masked]>
Date: Sun, 16 Dec 2001 09:49:51 -0800

At some point, someone said that for ASIP to work, you should see a line
in the log that looks like this:

  afpd[2872]: ASIP started on 127.0.0.1:548(1) (1.5cnid)

except the 127.0.0.1 indicated it was using the loopback interface.

The line above is what mine says and ASIP works - at least, I can telnet
to port 548 on that machine from elsewhere, and I can connect using a
MacOS 9 client by typing the IP address into the Chooser.

Since you're running Red Hat, but I don't think you said which version,
maybe you're getting nailed by the same problem that puzzled me with
SAMBA yesterday as I was getting that set up on a brand-spanking-new Red
Hat 7.2 box... the built-in firewall functionality. Yeah, OK, so I *was*
the one who enabled it during installation, but I forgot about it
because I'm used to RH 6.2 with a firewall I created, so I didn't think
of it when troubleshooting until I had already hacked my smb.conf to
bits :)

Anyway, the moral of the story is, if you can telnet to port 548 and if
you can get to the server by typing the IP address in the Chooser, I
think that proves it works regardless of whether the log entries show
your eth0 IP address.

Brian Curtis wrote:

> point ok.  It just uses AppleTalk and I want it to go through ASIP.I
> entered eth0 into atalkd.confIt now sayseth0 -phase 2 -net 0-65534 -
> addr 65280.153

---

From: gmac63 <[email-masked]>
Date: Sun, 16 Dec 2001 13:44:17 -0500

> > entered eth0 into atalkd.confIt now sayseth0 -phase 2 -net 0-65534 -

There is a technical reason for not having your loopback address as the first 
entry in /etc/hosts (I for the life of me can't remember), but its a real 
issue. As for Brian, it should have worked in his favour.

Moral to the story: if it works, it works.

-Wes Yates

---

From: Thomas Kaiser <[email-masked]>
Date: Sun, 16 Dec 2001 21:49:46 +0100

> afpd[2872]: ASIP started on 127.0.0.1:548(1) (1.5cnid)

This means that your Netatalk server will answer FPGetSrvrInfo requests with
this address as a legal way to connect to it.

When you open your chooser and your netatalk servers appears, all
communication is AppleTalk (NBP --> Name Binding Protocol). If you
doubleclick your server, a short ASP session will be opened to get
information from the server (FPGetSrvrInfo request). The server will supply
a list of possible connection methods: each entry with type, address and --
ASIP only -- probably the port too.

If your syslog reports for example:

Dec 16 16:37:25 notebook-tk afpd[7716]: datenschleuder:AFPServer@* started
    on 65280.59:128 (1.5rc1)
Dec 16 16:37:25 notebook-tk afpd[7716]: ASIP started on 127.0.0.1:548(1)
    (1.5rc1)

that means that your server will supply the following two alternatives:

- AFPoverAppleTalk on AppleTalk address 65280.59
- AFPoverTCP on IP address 127.0.0.1, Port 548

as an answer to the client's FPGetSrvrInfo request. And this is important if
you want to use the automagically switch between AppleTalk (for service
location --> looking up the server via NBP in the chooser) and TCP/IP for
the connection itself (recent AppleShare clients prefer AFPoverTCP and will
try to connect to the IP address supplied by the server)

(again: <http://www.umich.edu/~rsug/netatalk/archive/admins/2001/0016.html>)

> except the 127.0.0.1 indicated it was using the loopback interface.

If you use MacOS < 10.1.x then the mac will try to connect to 127.0.0.1 (or
himself ;-). As no server answers, the AppleShare client will do a fallback
to AppleTalk and try to reach the server via AppleTalk on 65280.59. If that
works, the connection itself will be established via AppleTalk (even if the
server can handle AFPoverTCP!).

With MacOS 10.1.x the situation is different. A built-in mechanism prevents
the AFP-client from trying 127.0.0.1 (loopback). The mac will only report
"This server is hosted on this local machine. Please browse the files and
folders locally" and won't try the fallback to AppleTalk.

I hope, you understand why it is important, which IP address your netatalk
box will publish itself on...

> to port 548 on that machine from elsewhere,

You can reach port 548 on every address TCP/IP, your setup allows (so if
your box is a multihomed one with 20 IP addresses then you can connect to
each one of them on the appropriate ports -- note: you can set up different
servers listening on different IP addresses and ports in afpd.conf).

> and I can connect using a MacOS 9 client by typing the IP address into the
> Chooser.

Uhh... Why typing IP addresses if live can be so easy? Set up your server
correctly and let your users just open the chooser and double click the
server, the connection itself will be made over AFPoverTCP... if it is the
right one, the server supplies (aka not 127.0.0.1 ;-)

Regards,

Thomas

---

From: Jamie Flournoy <[email-masked]>
Date: Sun, 16 Dec 2001 17:29:07 -0800

Aha, very interesting... I knew the bit about the automagic DDP->TCP/IP
preference on the client side but I didn't realize that the list of addresses
which was returned would *only* include the first IP address...

When I did it by selecting the name from the list box, I got:

afpd[1722]: ASIP started on 127.0.0.1:548(1) (1.5cnid)
...
afpd[1772]: session from 65280.128:250 on 65280.95:129

Doh! DDP... but now that I've fixed my /etc/hosts, it looks like this, even
when picking the server name from the list:

afpd[18992]: ASIP started on 192.168.0.11:548(1) (1.5cnid)
...
afpd[19027]: ASIP session:548(1) from 192.168.0.131:49159(2)

Thanks for the correction.

---

From: Thomas Kaiser <[email-masked]>
Date: Mon, 17 Dec 2001 23:43:50 +0100

On Sun, 16 Dec 2001 17:29:07 -0800, Jamie Flournoy wrote:

[afp server's answer to client's FPGetSrvrInfo request regarding the
possible connection methods]
> I didn't realize that the list of addresses which was returned would *only*
> include the first IP address...

This is obviously the case if you don't specify addresses in your afpd.conf
(note: with Netatalk 1.42b+asun2.1.3 the syntax is '-address', with 1.5 you
have to write '-ipaddr')

I would strongly recommend to use the afpd.conf feature as it avoids
confusion...

> [...] now that I've fixed my /etc/hosts, it looks like this, even

There is another side effect with this. With AFP 2.2 (or 2.1 -- don't
remember) a feature called server signatures has been introduced. If a
server supplies server signatures, the AppleShare client can use them to
determine whether a server is already mounted or not (avoiding another
authentication session against it). The code to create such a server
signature relies on the same information, from which the 'default'
AFPoverTCP address is created, I believe -- I'm no coder, so I cannot read
the sources :-(

Imagine you have two servers on your location, both set up with 127.0.0.l as
first address (and no address defined in afpd.conf). When you mount a volume
from one of them, your Finder won't let you mount the volumes from the other
one (you will get a message stating "already connected") since it believes,
both servers are the same.

This seems to happen only if you don't specify an IP address in afpd.conf
(what I realized these days, so apologies for my previous partial
misunderstandings to charlie wood -- thread "problem mounting two servers"
starting on Fri, 07 Sep 2001)

Regards,

Thomas