Data Network Resource
       Earn on the Web


Appletalk



Introduction


Appletalk can be used in a variety of environments:
  • 1: Daisy-chained Localtalk cabling or Farallon's PhoneNet cabling (all MACS and Apple printers have this interface built in already).
  • 2: Bus topology ethernet on thick or thin coaxial cable.
  • 3: Star topology using repeaters on UTP.
  • 4: Token Ring topology.
LocalTalk uses CSMA/CA (Carrier Sense Multiple Access with Collision Avoidance) for controlling data traffic across the media. Before a computer actually transmits data, it sends a signal on to the cable as a sign to other devices that it is about to send. This way, collisions are avoided, however, the broadcasts of intent increases the amount of traffic on the cable c.f. CSMA/CD.

Appletalk Phase 1 (or Non-extended), the original specification, only allowed 254 nodes per network (made up of 127 hosts and 127 servers) and one network number per cable and used the ethernet broadcast address $FFFFFFFFFFFF, also complete routing tables are propagated every 10 seconds. Appletalk Phase 2 allowed for Extended networks (multiple networks per cable), uses multicast addresses $090007FFFFFF for ethernet broadcasts and $C00040000000 for token ring broadcasts, allows 253 nodes per network, allows for Split Horizon routing table updates, allow multiple zones per cable range to be configured and multiple network numbers per cable and uses 802.2 with LLC and 802.3 frames with SNAP. A zone is normally used as a 'like-minded community' and would be named as such e.g. Marketing, Sales, Engineering etc.

OSI Layers


At the Data Link layer three protocols are used; LocalTalk Link Access Protocol (LLAP), EtherTalk Link Access Protocol (ELAP) and TokenTalk Link Access Protocol (TLAP). For routing of datagrams at the Network Layer Appletalk uses Datagram Delivery Protocol (DDP). For the delivery of datagrams to the end station the Transport Layer protocols are:
  • RTMP: Routing Table Maintenance Protocol which propagates routing table information.
  • NBP: Name Binding Protocol maps named entities to network addresses.
  • ATP: AppleTalk Transaction Protocol ensures reliable datagram delivery.
Session Layer protocols are:
  • ADSP: Appletalk Data Stream Protocol handles flow control.
  • ASP: Appletalk Session Protocol handles opening and closing session and session management.
  • PAP: Printer Access Protocol is used for initiating, maintaining and terminate printer connections.
  • ZIP: Zone Information Protocol propagates zone information throughout the network.
At the Presentation Layer the AppleTalk Filing Protocol (AFP) is used for file sharing across networks.

Below is a diagram of the DDP packet:

DDP

The Source socket field (0x01 - 0xFE) identifies the socket associated with the source and destination process (e.g. file sharing or printing). The DDP Type field indicates the type of packet found in the DDP data field, the following values are used:
  • 0x01: RTMP Response or Data
  • 0x02: NBP
  • 0x03: ATP
  • 0x04: AEP
  • 0x05: RTMP Request
  • 0x06: ZIP
  • 0x07: ADSP
AppleTalk addresses comprise of a 16-bit network number and an 8-bit node id written as two decimal numbers separated by a period e.g. 45.156 which is node 156 on network 45. We define the network number whilst the node number is normally dynamically assigned making it difficult to trace problems.

Reserved Network Addresses (in hex) are 0x0 (any network) and 0xFF00-0xFFFE (used during node startup and address acquisition). Reserved Node Addresses are 0x0 (unknown), 0xFE (reserved for extended networks) and 0xFF (reserved for broadcasts).

Appletalk Address Resolution Protocol (AARP)


There are three types of AARP packet; Request, Response and Probe.

This works in a similar manner to IP ARP. Given that nodes 16.45, 16.56, 16.112 and 16.124 sit on a network and node 16.45 wishes to communicate with 16.56, then the following happens:

16.45 needs to find out 16.56's physical address so it broadcasts an AARP request for this physical address. All the nodes see the request, but 16.56 is the only one that sees a match with its own protocol address, the other nodes ignore it. 16.56 now sends an AARP response to 16.45 which receives it and updates its AARP cache.

On startup, a node selects a node id and uses an AARP Probe to see if that address is already being used, if the address is already being used by a particular node, say 16.112, then 16.112 sends an AARP Response 'defending' its address. The new node will keep trying until it finds a valid address.

Once a new node has a valid node address it must verify or find its network address by broadcasting a ZIP GetNetInfo Request packet (sometimes called a ZIP GetZoneList Request) containing its complete address and its zone name. A router will respond with a ZIP GetNetInfo Reply with the valid network number range and the default zone name (if the new node's address was incorrect). This ZIP GetNetInfo Reply will be sent directly to the new node (if its address was correct) or broadcast. On reception of the ZIP GetNetInfo Reply, the new node changes its addresses and goes through the AARP probe process again. If the new node fails to find an available node address in the current network, then it switches to another network number within the defined range.

Routing Table Maintenance Protocol (RTMP)


An AppleTalk router maintains a routing table containing the following information:
  • Distance to the network
  • Port to use to send packets to the destination network
  • Address of the next router to get to the destination network
  • State (good, suspect, bad).
On startup, a seed router creates an initial routing table based on its configuration information about local networks to which it is connected. Once up, it will use RTMP to notify other routers of its routing table information. RTMP is broadcast every 10 seconds from each AppleTalk interface of the router in Split Horizon format.

When a router receives an RTMP it first reads each tuple (a record from the table containing the network number and the metric, or hop count), compares the information contained within the tuple with its own routing table, updates its own table if necessary and finally resets the ageing timer on the net in its routing table. The aging algorithm uses a validity timer that goes off every 20 seconds at which point it changes the status of all routes by setting good routes to suspect, suspect routes to bad1 and bad1 routes to bad2 which are then deleted. Therefore the time it takes for a route to age out from the time of the last RTMP is between 60 and 80 seconds.

There is a new protocol called AppleTalk Update Routing Protocol (AURP) which gives better routing efficiency.

Seed and Non-Seed routers


A seed router (or Hard router) contains configured network information which it uses to create an initial routing table on startup. A non-seed router (or Soft router) acquires its network information by listening for RTMP data packets from other routers (seeding). There must always be at least one seed router per network in fact it is a good idea to have two seed routers in a network for backup purposes. All seed routers on a particular network must be configured with the same network number range. If you need to change the network number, all seed routers on that network need to be reconfigured and then all routers need to be restarted since a non-seed router will seed off any router (seed or non-seed) and unless all routers are restarted it will still learn the old network number from a router that was not restarted.

Tip: If you are on an AppleTalk site, in order to learn the network addresses, first configure one of the routers as a non-seed router and then, once it has learned the network addresses, make it a seed router.

Zone Information Protocol (ZIP)


A Zone is a name (up to 32 characters) associated with one or more networks and is how MAC users see the network. An AppleTalk router maintains the Zone Information Table which contains all the known networks and associated zone names. Initially, when a router first comes up, it constructs a Zone Information Table consisting of the zone names that are associated with each of its directly connected nets for which it is the seed router. The router learns about new networks via RTMP and adds them to the routing table, then it sends out a ZIP query to the particular router that advertised the network, asking for the zone name(s). A ZIP Reply comes back with the zone name(s) and the router updates its Zone Information Table. Old zones are aged out once all the associated networks have aged out. Using Chooser on the Mac gives access to the zones so the user can access the services such as printers, file and mail servers. Using Chooser causes the Mac to send a ZIP GetZoneList Request to the router, and the router responds with a ZIP GetZoneList Reply with all the zones in its Zone Information Table.

Network Visible Entity (NVE)


Or 'Named Entities', these are processes that run on nodes and are available for general use to others on the network. The NVE actually refers to the socket through which the node offers a service. The descriptive format is [object]:[type]@[zone] e.g. Big Mac:AFPServer@Sales where 'Big Mac' is the name of the device, the type or an attribute of this device is that it is an AppleShare server and it resides in a zone called Sales. Using the wildcard = in an object or type field means 'any', whilst an '*' in the zone field means the local zone.

Common Entity types include:
  • AFPServer - System 7 File sharing
  • LaserWriter - AppleTalk Postscript Laser Printer
  • 2.0Mail Server - Microsoft Mail Server
  • Workstation - System 7.0 MAC

Network Services (NBP)


In Chooser, once a zone has been selected, the user selects a service type. The Chooser uses Name Binding Protocol (NBP) to send out queries to find out what services of a particular type are available. These queries used to be sent out as broadcasts every 10 seconds which were very bandwidth hungry. Since System 7.0 an exponential timing backoff algorithm has been incorporated to minimise the NBP traffic. The Process operates as follows:
  1. The Mac sends a NBP Broadcast Request to the router asking for a lookup to be done for all NVEs (using the = wildcard, meaning 'all') of the requested type.
  2. The router looks at the zone name in the packet and checks the Zone Information Table to find the networks associated with that zone.
  3. If the network is directly connected, then the router broadcasts an NBP Lookup on the network(s) for the requested service.
  4. If the network is not directly connected, then the router sends NBP Forward Request to the other routers.
  5. All nodes examine the NBP Lookup and compare the requested service type with their socket tables and those nodes that find a match send back an NBP reply to the router giving the name of the service and its address, which consists of the network number, the node id and the socket number.
  6. The Mac displays the list of service names in the Chooser.

This process generates alot of traffic.

NBPs name binding feature means that NBP provides network addresses of requested services as well as just a list.

AppleTalk Transaction Protocol (ATP)


This protocol operates at the Transport layer and is connection-oriented. AppleTalk Filing Protocol (AFP) and Printer Access Protocol (PAP) use it because it provides reliable transport of data.

Once the client knows the address, zone and NBP information so that it knows how to reach the server, it sets up a connection using ATP and AFP and an echo frame to work out ATP timeout values.

Zone Filters


The are two types of zone filters 7-series and 5.x series filters.

7-series filters


Exclude filter rules are:
  • Information learned on a port is never filtered out that same port.
  • For a specified zone in the zone filter list, no networks associated with that zone are advertised.
  • Do not advertise any filtered zones.
Exclude filter actions are:
  • RTMP data packets - does not advertise any network that has at least one zone specified in the zone filter list (including unfiltered zones). This means that a network range, say 10 - 20, has two zones called Managers and Marketing, then if you create an exclude filter on zone Managers, the zone Marketing will also be hidden.
  • ZIP - filtered zones are not included in GetZoneList replies or ZIP queries.
  • NBP - BrRq not exploded to FwdReq (Forward Request) or LkUp (Look Up) for excluded zones, the routed LkUpReply dropped if the source network is filtered and routed FwdReq, BrRq and LkUp are dropped if the zone is filtered.
Include filter rules are:
  • Information learned on a port is never filtered out that same port.
  • All networks associated with a given zone specified in the zone filter list are advertised.
  • If a network has multiple zones, and one of them is specified in the zone filter list, then they are all advertised.
Include filter actions are:
  • RTMP data packets - advertises all networks that have at least one zone specified in the zone filter list (even if the networks are also associated with non-included zones). This means that if there is an include filter for Physics where Physics and Chemistry come from networks 110 - 120, then both Physics and Chemistry zones will be advertised even though Chemistry is not defined within the include filter.
  • ZIP - includes all zones associated with networks in GetZoneList replies or ZIP queries.
  • NBP - BrRq not exploded to FwdReq or LkUp unless zone is in the include filter, also the routed LkUpReply is dropped and routed FwdReq, BrRq and LkUp are dropped unless the zone is in the receiving interface's include filter.

5.X Zone Filters


Exclude 5.X filter rules are:
  • Information learned on a port is never filtered out that same port.
  • Advertises all networks.
  • Excludes zones not in the filter list if the network has multiple zones.
  • Uses the default zone of the filtering interface for the network if the zone filter list specifies all network zones (this is to allow the answer of ZIP Queries).
Exclude 5.X filter actions are:
  • RTMP data packets - advertise all networks. This means that if a network range, say 10 - 20, has two zones called Managers and Marketing, then if you create an exclude filter on zone Managers, the zone Marketing will still be visible with networks 10 - 20.
  • ZIP - filtered zones are not included in GetZoneList replies or ZIP queries. also advertises the default zone of the advertising interface if all zones are excluded.
  • NBP - BrRq not exploded to FwdReq or LkUp for excluded zones unless the the network is learned through the interface, the routed LkUpReply and LkUp are allowed through, routed FwdReq, BrRq and LkUp are dropped if the zone is filtered and routed FwdReq is dropped if the zone is not associated with the destination network.
Include 5.X filter rules are:
  • Information learned on a port is never filtered out that same port.
  • All networks are advertised.
  • If a network has multiple zones, then they are all advertised.
  • Uses the default zone of the filtering interface for the network if the zone filter list specifies no zones.
Include 5.X filter actions are:
  • RTMP data packets - advertises all networks.
  • ZIP - advertises only zones specified in the zone filter list to answer GetZoneLists or ZIP queries, and advertises the default zone of the filtering interface for the requested network if no zones are included to answer ZIP query.
  • NBP - BrRq not exploded to FwdReq or LkUp unless zone is in the include filter or the the target network is learned through the interface. also LkUp and the routed LkUpReply are allowed through and routed FwdReq, BrRq and LkUp are dropped unless the zone is in the receiving interface's include filter.
RFC 1378 describes AppleTalk ATCP.

Valid HTML 4.01 Transitional




Earn on the Web    


All rights reserved. All trademarks, logos, and copyrights are property of their respective owners.