Understanding AppleTalk Routing

Neon

Copyright 1996 Neon Software, Inc.
Used with permission




Beginning Guide To AppleTalk Routing

Definition of terms
Differences between a Bridge, Hub/Repeater, and Router
Types of Routers
What is an AppleTalk Network Number?
What is an AppleTalk Zone?
Local Zone and Local Network
Router States

Intermediate Guide To AppleTalk Routing

LAN physical media
Configuring an AppleTalk router

Advanced Guide To AppleTalk Routing

Routing Table Maintenance Protocol (RTMP)
Zone Information Protocol (ZIP)
Aging of network numbers
Aging of zone information
Changing a zone name

Beginning Guide To AppleTalk Routing

This chapter introduces concepts and terms needed in order to understand AppleTalk routing. This chapter gives you a basic understanding of AppleTalk network numbers and zones. In addition, we define the different configuration states that are available in an AppleTalk router.

Definition of terms
There are several terms that must be defined in order to understand AppleTalk routing concepts.

Medium
Medium is a set of rules for wiring and sending electronic signals between computers and computer peripherals on a network. Examples of medium standards in the computer industry are LocalTalk, Ethernet, Token Ring, and FDDI.

Protocol
A networking protocol is a means by which computers and computer peripherals communicate over a network. Examples of standard protocols in the computer industry are AppleTalk, IP, Netware, and DECnet. A protocol is an alagous to a language.

Packet
When information travels accross a network the protocol being utilized breaks the information into packets. Each packet has a source address and a destination address, just like a letter. A large file being tranferred accross a network will be broken down into multiple packets and sent to its destination on the network. It is a router's job to see that all the packets get routed to the correct destination. Think of packets as individual letters being mailed to a street address.

Broadcast packet
In most cases, a packet has a destination address designed to get a packet to a specific device on an internet. At times it is necessary that all devices on a network receive the information contained in a packet. This type of packet has a special destination address called a broadcast address. A packet with a broadcast address is called a broadcast packet. Think of a broadcast packet as mail addressed to everyone on your street.

AppleTalk
AppleTalk is the networking protocol built-in to every Macintosh. Many people confuse AppleTalk with LocalTalk. AppleTalk is a protocol and can be run over many types of medium. LocalTalk is one of those media.

Network Segment
An AppleTalk network segment is a collection of Maintosh computers and Macintosh peripheral devices interconnected using a standard networking medium.

Local Area Network (LAN)
A LAN is a collection of network segments interconnected using a variety of media and is usually contained within a close geographical area.

Wide Area Network (WAN)
A WAN is a collection of network segments interconnected, usually by some sort of telecommunications link, using a variety of media and is usually spread out across a large geographical area. A WAN is sometimes thought of as a number of interconnected LANs.

Internet
Internet is a generic term used to describe a corporate LAN or WAN. Not to be confused with The Internet with a capital I, a nationwide association of interconnected networks. Of late, the Internet has been referred to as the Information Superhighway.

Differences between a Bridge, Hub/Repeater, and Router
Each of the different mediums used in networking have limitations on the number of devices that can be networked together on a single segment. Routers, bridges, and repeaters provide a mechanism for extending these networks by interconnecting different network segments together to create a Local Area Network (LAN).

A hub/repeater is a device that simply repeats and amplifies the signal it receives. By retransmitting these signals, hub/repeaters extend the length of the network wiring. Hub/repeaters have little or no intelligence about the data they are transmitting.

A bridge is a network device that understands only the lowest layers of network protocols. For AppleTalk, that means knowing how to forward data between AppleTalk networks only. Some AppleTalk routers should actually be classified as bridges.

A router has all the intelligence of a bridge, plus it understands network protocols at a slightly higher level so that, for example, AppleTalk data can be forwarded to DECnet nodes.

A gateway operates at an even higher level than routers and is usually customized to allow the forwarding of data to diverse network operating systems or protocols.

Types of Routers
A router is used to interconnect AppleTalk networks in close proximity to one another. The AppleTalk Router is connected directly to each of the AppleTalk networks they serve. A half-router is used primarily to interconnect remote AppleTalk systems. An example would be two routers interconnected by a long-distance communications link. The combination of the two routers and the intervening link serves as a routing unit between the AppleTalk networks.

What is an AppleTalk Network Number?
AppleTalk uses an addressing scheme to uniquely identify each device on an AppleTalk LAN or WAN. This AppleTalk addressing scheme consists of a network number, a node number, and a socket number. Think of this addressing scheme as an address on an envelope. The network number is equivalent to the street name, the node number is equivalent to the street number, and the socket is equivalent to a suite within the building. When an AppleTalk router is used to combine two different AppleTalk network segments, each segment is assigned its own unique network number by the router. The Macintoshes and Macintosh peripherals are responsible for assigning themselves a valid node and socket number. Users are rarely interested in the socket number so an AppleTalk address is usually written as a net and node pair.

What is an AppleTalk Zone?
The Macintosh uses a mechanism called the Chooser for selecting network resources on an AppleTalk network. Rather then using the AppleTalk network number, Apple decided to introduce the concept of a zone to make the Chooser more user friendly. A zone is a logical grouping of AppleTalk networks on a LAN or WAN. There can be multiple networks within a zone and, in some cases, multiple zones assigned to a network segment. An AppleTalk router is responsible for assigning zone information to the AppleTalk networks to which it is attached.

Local Zone and Local Network
As mentioned before, an AppleTalk router is responsible for assigning a network number and zone name(s) to each AppleTalk network segment to which it is directly attached. These network numbers and zone names are considered to be the local network and local zone information for that specific router. Therefore, there is a set of local network and local zone information for each router on a LAN or WAN.

Router States
When setting up a router on an AppleTalk network there are three options for configuring that router: seed, nonseed, and, for some routers, soft seed.

A seed router has been explicitly configured with the local zone and local network information to be used when it starts up on the network segment to which it will be attached. A seed router will maintain this configuration information even if it is in conflict with other routers on the same segment.

A nonseed router acquires its local zone and local network information from other routers attached to the same network segment. Note that for a nonseed router to acquire its network configuration properly, there must be at least one other router running on that network segment that has the proper configuration information.

Soft seed router. Some router manufacturers have implemented what is referred to as a soft seed router. A soft seed is configured with the local zone and local network information just like a seed router. However, when when a soft seed router starts up it also acquires the local zone and local network information from other routers attached to the same network. If the seeded information is in conflict with the acquired information then the soft seed router will use the acquired information rather then cause configuration problems on the network.

Intermediate Guide to AppleTalk Routing

This chapter will explain how to configure an AppleTalk router and provides a list of rules to live by.

LAN physical media
The AppleTalk protocol is able to run on a number of standard LAN physical media. One of the functins of an AppleTalk router is to enable Macintosh users on one physical medium to connect to Macintosh users on another physical medium. The following LAN physical media is supported by AppleTalk: LocalTalk, Ethernet, TokenRing, FDDI, and CDDI.

Configuring an AppleTalk router
This section takes an in-depth look at configuring routers with network numbers and zone names.

Defining a router port
A router port is a hardware or software connection to an AppleTalk network within a router; it is expected that a router has more than one port. For example, some routers have a connection to a LocalTalk network and a connection to an Ethernet network. That router will have two router ports, one for the LocalTalk side and one for the Ethernet side of the router. An Ethernet-to-Ethernet router will also have two ports. Half-routers, including some routers engaged in tunneling AppleTalk through a foreign protocol stack, will only have one AppleTalk port since the other side of the router is not using the AppleTalk protocol.

The following is an example of a router with three ports:

One Ethernet port attached to network segment 2-9, and two LocalTalk ports attached to network segments 128 and 132.

The following is an example of two half-routers, Router 1 has a port on network 132 and Router 2 has a port on network 65000:

Local Zone and Local Network
With the definition of a router port we can now be more specific in our definition of a local zone and a local net number. The network number and zone information assigned to a specific router port is considered to be the local net and local zone for that port.

Router states
The concept of router ports complicates the issue of a seed vs. non seed routers because it really isn't the router that is a seed or non seed, it is the router port. For instance, if you are configuring an Ethernet-to-LocalTalk router that is being attached to an Ethernet segment that contains an existing seed router, you might decide to configure the Ethernet port to be a non seed port. However, the LocalTalk side of the router still needs to be seeded since there are rarely two routers connected to the same LocalTalk segment.

Assigning network numbers to seed routers
In order to assign a network number to a seed router port, you must take the following factors into account:

1. Rules to live by #1 - Network numbers must fall within a specific range. AppleTalk requires that a network number on a routed network be between the numbers 1 and 65279, inclusive. The network number range 65280 through 65534 is called the startup range and is used by the Macintosh when it is on a network without any routers. Network numbers that fall within the startup range cannot be assigned to a router port.

2. Rules to live by #2 - Physical medium type determines network number assignments. AppleTalk has two types of network numbering schemes depending on the physical medium to which you are connecting a router port. LocalTalk networks require you to assign a nonextended network number. A nonextended network number consists of a single network number such as 1, 100, or 250. All other LAN physical media can be assigned an extended network range. An extended network range must be a contiguous set of numbers and can be of any length. Examples of an extend network range are 2-2, 20-30, 125-130, and 65000-65100.

3. Rules to live by #3 - Plan for growth. Within AppleTalk, there are 253 node numbers available for each network number. This limitation is rarely a problem on LocalTalk networks. However, on other physical media this can present a problem. Therefore, it is important to assign an extended network range to a network segment that allows for the number of AppleTalk devices you require. It is easy to calculate how many AppleTalk addresses are available on an extended network, just multiply 253 by the number of network numbers in the extended range. For example, the network range 10-15 has 6 network numbers (10, 11, 12, 13, 14, and 15) and therefore will support up to 1518 (6 x 253) AppleTalk devices. Planning for growth means assigning a network range that is big enough for your current and future needs. As we will see later, changing a network number after the fact can be troublesome.

4. Rules to live by #4 - Each network segment must be assigned a unique network number or range. Realize that this means that extended ranges can not overlap. For example, you have a network with one Ethernet segment and three LocalTalk segments. The following network has a valid set of network numbers:

the Ethernet segment has the network range 2-9 and LocalTalk segments have network numbers 128, 132, and 65000.

On the other hand, the following network does not have valid network numbering scheme since the LocalTalk network numbers 100, 200, and 300, fall within the Ethernet network range of 100-500.

A final note: be careful with overlapping extended network ranges. Range 10 - 20 and range 20 - 30 would not be a set of valid network numbers because network 20 overlaps both network ranges.

5. Rules to live by #5 - All routers attached to the same local network segment must be configured with the same network number or range. For example, suppose you have an Ethernet segment to which multiple routers are connected and you have assigned the extended network range 2 - 9 to the Ethernet segment. All seed router ports placed on that Ethernet segment must be configured with a network range of 2-9.

A final thought on network numbers: nobody sees these but you so create a numbering scheme that means something to you. For example, some network numbering schemes tell the network administrator what physical medium a segment is on. For example, all network numbers starting with 5000 are Ethernet, 6000 are Token Ring, and 7000 are LocalTalk.

Determining zone names for seed routers
In determining the zone name(s) to assign a network segment you must take the following factors into account:

1. Rules to live by #6 - The physical medium type determines zone assignments. Just as you can only assign one network number to a nonextended network, you can only assign a single zone name to a router port on a non extended network. For router ports on extended networks, you may assign as many zone names to the network segment as you wish.

2. Rules to live by #7 - Zone name lengths are limited. Zone names can not exceed 32 characters.

3. Rules to live by #8 - All router ports attached to the same local network segment must be configured with the same local zone names. For example, suppose you have an Ethernet segment, network range 2-9, with multiple routers connected to it and you have assigned the zone names "Marketing", "Sales", and "Finance" to that Ethernet segment. All seed router ports placed on that Ethernet segment must be configured with the zone names "Marketing", "Sales", and "Finance."

The end result of rules to live by #5 and #8 is that all seed router ports attached to the same local network segment will have the same network number (or range) and zone(s) configured for that network segment. In the preceding example, it can be said that network 2-9 has the zones "Marketing", "Sales", and "Finance" associated with it.

A full discussion of how nonseed router ports acquire their network and zone information is in the next chapter.

Advanced Guide To AppleTalk Routing

This chapter explains the process by which AppleTalk routers propagate their local net and local zone information to the other routers on an AppleTalk internet. In addition, appropriate ways to accurately change network numbers and zone names on your internet are explained.

Routing Table Maintenance Protocol (RTMP)
Routing Table Maintenance Protocol is one of the AppleTalk protocols. RTMP is the process by which AppleTalk routers propagate the local net information from one router to the rest of the routers on an internet. RTMP packets are broadcast packets that every router on a network segment sends out every ten seconds. This section explains how the RTMP process works and how nonseed routers acquire their network number configuration.

Definition of a routing table
A routing table is a table maintained in each AppleTalk router and contains a list of all network numbers or ranges on the internet and their associated hop counts. The hop count is defined as the number of routers a packet must travel through to arrive at the destination network. A hop count of zero is used to represent a network directly connected to a router. AppleTalk only allows for up to 15 hops - any more than 15 hops and AppleTalk routing will fail. Every entry of a network number and hop count contained in the routing table is called a tuple. The following is an example of a routing table as seen in RouterCheck:

In the above example,network 22-29 is one hop away. Therefore, if this router wants to send a packet to network 22-29 it will have to send packets through one other router. Also, since there are seven table entries this RTMP packet has seven tuples.

Initialization of the routing table
When a router starts running on a network, the first entries into its routing table are the network numbers to which it is directly connected. For example, an Ethernet-to-LocalTalk router will have two entries in the initial routing table: the network number for the LocalTalk network and the network range for the Ethernet network. The hop counts for both will be zero. The following discussion explains how seed and non seed router ports initialize their routing tables.

1. Seed router ports - A seed router port has a simple initialization sequence. Since the seed router port already knows its network number or range, the router simply enters the seeded network information into the routing table with a hop count of zero.

2. Nonseed router ports - Since a nonseed router port does not know its network number or range, the nonseed router port must ask another router port on the network segment to which it is attached for the local network information. Within the AppleTalk protocols there is a special packet that can be sent to request this information - it is called the ZIP GetNetInfo packet. The nonseed router will send this request to the first router from which it hears a RTMP packet on the network. The router that receives the ZIP GetNetInfo request will send back the network number or range for the network to which it is attached. This router may or may not be a seed router. Once the nonseed router receives the reply, it places network information into the routing table with a hop count of zero.

The following is an example of a GetNetInfo reply as seen in RouterCheck:

A nonseed router port starting up on the same network segment as the "Neon Ether€Route" would receive the above reply to its GetNetInfo request and configure its router port to be on network range 2-9. The GetNetInfo reply also returns the Default Zone and Multicast address information. Default Zones are discussed later in this chapter.

After each router, whether seed or nonseed, initializes its routing table with its directly connected tuples, RTMP is used to acquire the rest of the AppleTalk internet configuration information.

The RTMP process
1. Sending RTMP packets - Once a router has initialized its routing table, it then sends out a RTMP packet every ten seconds. A RTMP packet is a broadcast packet, and is the means by which a router conveys new network information to the other routers on the network. In order to maintain network connectivity, a router must continue to send out RTMP packets every ten seconds for as long as the router is running. (Note: there is work in the AppleTalk community to allow the network manager to adjust this ten second timer. In this manual, however, the RTMP timer will always have a value of ten seconds.)

2. Receiving RTMP packets - Because a RTMP packet is a broadcast every other router on the same network segment will see every other routers RTMP packets. Every time a router sees a RTMP packet on the network it compares the information to its own routing table. When a RTMP packet contains a network number that is new to the router, the router adds the network information to its own routing table and increases the hop count by one. Through this mechanism, eventually all the routers on an internet will have the same list of network numbers in their routing table.

3. Using split horizon routing tables - On large networks, RTMP packets can get very sizable if they contained every network number and network range on an internet. In order to reduce the size of an RTMP packet, and therefore the amount of traffic generated by RTMP, routers use a special version of RTMP called split horizon. A split horizon routing table contains only the routing tuples that may be used by routers on the network connected to that port.

For example, the following network has three Ethernet-to-LocalTalk routers on an Ethernet backbone:

The Ethernet network range is 2-9 and the LocalTalk network number for Router A is 128, Router B is 132, and Router C is 65000. They have routing tables as follows:

By using the split horizon technique, a router provides only the routing tuple that may be used by routers on the network connected to that port. For example consider Router C. On network segment 65000 there are no other routers so the only means by which router C could discover networks 128 and 132 is from the port attached to network 2-9. Therefore, the split horizon routing table broadcasted on network segment 65000 by Router C will be as follows:

Alternatively, from the Ethernet port on network 2-9, Router C need not broadcast networks 132 or 128 - Router A and Router B will be broadcasting their presence. Therefore, the split horizon routing table broadcasted on network segment 2-9 by Router C will look like this:

Zone Information Protocol (ZIP)
Zone Information Protocol is one of the AppleTalk protocols. ZIP is the process by which AppleTalk routers create their Zone Information Table (ZIT) which contains the zone names associated with a network number. The list of zones that is built up in the ZIT is the zone list that is displayed in the Chooser.

The ZIP process
As mentioned previously, when a router port receives a RTMP containing a network number currently not in its routing table, the router adds the new network number to its routing table. Once the router has added the new network to its routing table, it must now acquire the zones associated with this network number. To do this, the router sends a ZIP request to the router port from which the router learned of the new network number. The ZIP request contains the network number whose zone information is needed. The router receiving the query looks in its own ZIT and sends back a reply containing a list of the zone(s) associated with the requested network number. Once the reply is received, the requesting router adds the new zone information to its own ZIT. The following is an example of a zone list and a ZIT as seen in RouterCheck:

Zone List:

Zone Information Table (ZIT):

You will notice that when a network range has multiple zones associated with it, there is an entry for each of the zones.

On a stable network the ZIP process should only occur whenever a new router, and therefore a new network number, is introduced to the internet. Otherwise, there should be no ZIP traffic on your network unless there are problems.

Aging of network numbers
This section explains how routers remove, or age, network numbers that no longer exist.

20 second validity timer
When a router sees an RTMP packet on a network, it compares the network numbers in the RTMP packet to the information within its own routing table. At this time, the router is not only looking for new networks but is also confirming the validity of the existing networks in its routing table. A network entry is only valid for a short period of time, this time is called the validity time. In AppleTalk routers, the validity timer is 20 seconds. If after two validity timers a RTMP packet is not seen containing a network number already in the routers routing table, the router removes the network number from its routing table. The process by which a network is removed from a routers routing table is called the aging process.

40 second age out
Each network number in a routing table has a validity state associated with it. There are three validity states within a routing table: good, suspect, and bad. Every 20 seconds, the validity timer expires and every networks validity state is changed: good entries change to suspect entries, and suspect entries change to bad entries. For most routers, changing a networks validity state to bad means that the network is removed from the routing table. Some routers set the networks hop count to 31, which also indicates a bad network. A network number is reset to the good validity state when that network number is seen in an RTMP packet received from another router.

Hop count of 31
There is a mechanism within RTMP that can help speed the network aging process. When a networks validity state is suspect, a router can change that networks hop count to 31 and generate RTMP packets that contain that hop count. When other routers see the network number with a hop count of 31, those routers automatically set the state of that network number to bad. The hop count of 31 mechanism can bring the age out time on some nets down to 20 seconds, the length of the validity timer.

Aging of zone information
AppleTalk routers age out ZIT information using the RTMP process. When a network is removed from the RTMP table, the ZIT is also scanned. ZIT entries that contain the aged network number are then removed. The standard wait time for assuring that all the routers on your network have aged out a network number is called the ZIP bring back time. The ZIP bring back time is 10 minutes.

Changing a zone name
To change the zone(s) information associated with a network segment, you must time out the old zone information. Therefore, the first step to changing a zone name is to age out the network number associated with the old zone(s) from the entire internet. If you don't time out the network number, then some of the routers on the internet will never remove the network number from their routing table and will, therefore, never query for the new zone information. If this occurs, users may complain that they can't see the new zone in their Chooser. In fact, some users will still see the old zone information in their network while others see the new zone information.

Another method is to assign a new network number to the network segment on which you are changing the zone name. The old information will be removed from the ZIT when the old network segment is aged out and the new zone information will propagate through the internet with the introduction of the new network number.

Here are the two processes for successfully changing the zone(s) associated with an existing network number:

Time out the network number
1. Shut down all the routers on the network segment for which you want to change the zone information. A good way to determine if you have shut down all the routers is to run RouterCheck on the network segment you are working on -- any router you may have missed will show up in the router list. This will start the aging process for this network number in all other routers on the internet.

2. Wait the 10 minute ZIP bring back time. This is the minimum amount of time you should wait before going on to the next step.

3. Reconfigure all the seed router ports on the network segment so that they contain the appropriate new zone information.

4. Start the seed routers.

5. Start the nonseed routers.

Change the network number
1. Shut down all routers on the network segment for which you want to change the zone information. A good way to determine if you have shut down all the routers is to run RouterCheck on the network segment you are working on, any router you may have missed will show up in the router list. This will start the aging out process for this network number within other routers on the internet.

2. Reconfigure all the seed router ports on the network segment so that they contain the appropriate new network number and zone information. Because you are changing the network number, there is no reason to wait the standard ZIP bring back time. The new network number will propagate through the internet forcing all routers to ask for the new networks zone information

3. Start the seed routers.

4. Start the non seed routers.

"Copyright 1996 Neon Software, Inc. Used with permission"