Subject: RE: Thank you.

From: "Seitz, Matt" <[email-masked]>
Date: Wed, 5 Sep 2001 12:41:48 -0700

>Please help me keep this all straight (newbie!).  What protocols
>are used when one connects to a Linux server with:

>OS9  Chooser

Protocols:  
Datagram Delivery Protocol (DDP), Name Binding Protocol (NBP), AppleTalk
Transaction Protocol (ATP), AppleTalk Session Protocol (ASP), AppleTalk
Filing Protocol (AFP)

Stacks:
NBP and ATP run on top of DDP.  ASP runs on top of ATP.  AFP runs on top of
ASP.

   /-NBP
DDP
   \-ATP-ASP-AFP

Semantics:
The OS 9 Chooser uses Name Binding Protocol (NBP) to find servers and
display their names.  When a user selects a server in Chooser, the client
uses NBP to get the server's AppleTalk Address.  The client then connects to
the server using AFP on ASP/ATP.  

>OS9  Chooser Server IP

Protocols:  
Datagram Delivery Protocol (DDP), Name Binding Protocol (NBP), AppleTalk
Transaction Protocol (ATP), AppleTalk Session Protocol (ASP), TCP/IP, Data
Stream Interface (DSI), AppleTalk Filing Protocol (AFP)

Stacks:
NBP and ATP run on top of DDP.  ASP runs on top of ATP.  TCP runs on top of
IP.  DSI runs on top of TCP.  AFP runs on top of ASP and DSI.

   /-NBP
DDP
   \-ATP-ASP-\
              AFP
  IP-TCP-DSI-/

Semantics:
The OS 9 Chooser uses Name Binding Protocol (NBP) to find servers and
display their names.  When a user selects a server in Chooser, the client
uses NBP to get the server's AppleTalk Address.  The client then sends an
AppleTalk Filing Protocol (AFP) command on AppleTalk to the server, asking
for the server's IP address.  If the server responds with an IP address,
then the client establishes a connection to the server using AFP on
DSI/TCP/IP.  If the server does not return an IP address, or the client
fails to connect to the server using AFP on DSI/TCP/IP, then the client
establishes a connection to the server using AFP on ASP/ATP.  If the user
types the server's IP address into the Chooser, then the client immediately
connects to the server using AFP over DSI/TCP/IP.

>OS X 10.0 Connect To Server:

Protocols:  
TCP/IP, Service Location Protocol, Data Stream Interface (DSI), AppleTalk
Filing Protocol (AFP)

Stacks:
TCP runs on top of IP.  DSI and SLP run on top of TCP.  AFP runs on top of
ASP and DSI.

        /-SLP
  IP-TCP
        \-DSI-AFP

Semantics:

The OS X 10.0 Connect to Server dialog does not support NBP.  Instead, it
uses Service Location Protocol (SLP) to find servers and their IP address.
If your server does not support SLP, you must type in the IP address by
hand.  The client will then connect to the AFP server using AFP on
DSI/TCP/IP.

>Windows Network Neighborhood

Protocols:  
TCP/IP, Microsoft NetBIOS on TCP/IP (NBT), Microsoft Network Browser
(Browser), Windows Internet Naming Service (WINS), Directory Naming Service
(DNS), Common Internet File System (CIFS) [previously called Server Message
Block (SMB)]

Stacks:
TCP runs on top of IP.  Browser, WINS, and DNS run on top of TCP.  NBT runs
on top of WINS, DNS, TCP, and IP.  CIFS runs on top of NBT.

           |-Browser
     /-TCP-|-WINS-|
    /      |-DNS--|
  IP       |------|-NBT-CIFS
    \             |
     \------------|

Semantics:  Network Neighborhood uses the Browser protocol to find and
display server names.  When a user selects a server name, NBT uses a
combination of WINS, DNS, and IP broadcasts to find the IP address of the
server.  CIFS then uses NBT on top of TCP to connect to the server.

---

From: Thomas Kaiser <[email-masked]>
Date: Wed, 05 Sep 2001 23:46:05 +0200

On Wed, 5 Sep 2001 12:41:48 -0700, Seitz, Matt wrote:

> The client then sends an AppleTalk Filing Protocol (AFP) command on AppleTalk
> to the server, asking for the server's IP address.

Can you explain this a bit please? Using AFP 2.1/2.2, I thought that the
afp-client sends out a FPGetSrvrInfo request. The afp-server answers a lot
of stuff (its name, the uams it supports, etc. and finally a list of
connection methods the servers supports).

Each entry in this list will include

- AFP over AppleTalk or TCP
- address type (ip address + port or FQDN + port or AppleTalk address)
- the real address depending on the address type above

So the afp server provides _every_ connection method it has been configured
to publish. 

> If the server responds with an IP address, then the client establishes a
> connection to the server using AFP on DSI/TCP/IP.

I thought that this is the afp-clients decision if the afp connection can be
established by more than one method?

AppleShare clients prior to AFAIR 3.7.4 prefer AFP over AppleTalk (even if
the server says, that it can also 'speak' AFP over TCP). Recent versions do
the opposite. It also depends on whether you hold down the [option] key or
not to force the non-default behaviour.

If the AppleShare clients wants to connect via AFP over TCP then it will try
to ping the servers ip address before trying to establish a connection on
the afp port. If ICMP is filtered between client and server the client will
never attempt to use AFP over TCP and will instantly try to use AFP over
AppleTalk (but you can disable the 'Verify IP address' feature using Apple's
'AppleShare Client Setup' utility)

If the client can ping the server it will try to connect to the afp port on
that server. It will try this until the default timeout will be reached (you
can edit this value also using Apple's utility) and will do a fallback to
AFP over AppleTalk afterwards.

> [...]

MacOS X 10.0 speaks AFP 3.0. And this version only supports AFP over TCP.
No support for AppleTalk any longer (please note also: the definition of AFP
has changed --> these days it should be spoken as 'Apple Filing Protocol' to
avoid confusion with 'AppleTalk')                  ^^^^^

MacOS X 10.1 will speak AFP 2.2 too, so connections can be established also
via AppleTalk.

Maybe I'm completely wrong. Any input greatly appreciated.

Regards,

Thomas

---

From: Sak Wathanasin <[email-masked]>
Date: Wed, 5 Sep 2001 23:06:07 +0100

In reply to Thomas Kaiser's message of the 05/09/2001 at 23:46 +0200,

>established by more than one method?

This is exactly what happens; you are right in every detail. I was 
tracing down a problem where the client was always connecting via 
AppleTalk instead of TCP/IP and have a bunch of pkt traces showing 
exactly this sequence of events.
-- 
Sak Wathanasin
Network Analysis Limited

Internet: [email-masked]
Phone: (+44) 24 76 41 99 96        Mobile: (+44) 79 70 75 19 12 
Fax: (+44) 24 76 69 06 90

---

From: Leland Wallace <[email-masked]>
Date: Wed, 5 Sep 2001 15:25:08 -0700

> So the afp server provides _every_ connection method it has been 
Correct.

> established by more than one method?
yes
> not to force the non-default behaviour.
AppleShare Clients prior to 3.7 could only do AppleTalk
Client 3.7 and later would try to switch to AFP over TCP/IP if the 
server supported it.
There was a bit of a problem in the 3.8 & 3.8.1 clients where alias 
connections wound
up degrading to AppleTalk (long story)
> 'AppleShare Client Setup' utility)
correct
> AFP over AppleTalk afterwards.
correct.

> avoid confusion with 'AppleTalk')                  ^^^^^
Mac OS X 10.0 speaks AFP 3.0, AFP 2.3, AFP 2.2, and AFP 2.1 all over 
TCP/IP
AFP 3.0 is limited to TCP/IP only (255 char unicode names are just too 
big for
the AppleTalk packet size).

> MacOS X 10.1 will speak AFP 2.2 too, so connections can be established 
Mac OS X 10.1 will support connections over AppleTalk for AFP 2.3, AFP 
2.2,
and AFP 2.1.

> Maybe I'm completely wrong. Any input greatly appreciated.
Hope this helps
Leland Wallace
AppleShare Client Lead

+-----------------------------------------------------------------------------------
Leland Wallace           Working in            AppleShare Engineering
[email-masked]    but not speaking for      Apple Computer Inc.
http://www2.inow.com/~randall
+-----------------------------------------------------------------------------------