Read an Excerpt
Chapter 4: Token Ring Basic
Finite State MachinesIn token ring, you actually join a ring and become part of it-unlike in Ethernet, in which a device may be connected to a segment and (assuming the cable is clean, of the correct type, and the device is running at the correct speed) becomes a member of the segment, immediately ready to begin transmitting data. Again, when a station joins a ring, the other stations become aware of its presence, and the Token Ring protocol outlines certain rules for the joining process. The station first must successfully insert, which requires that it pass a series of tests and be configured with the correct parameters. This ensures that all stations coexist on the particular ring, and prevents an incorrectly configured station from upsetting ring performance.
Token ring maintains itself; a station may not insert at the wrong speed. This is true of Ethernet, as well; you can connect a 100Mbps connection in a 1OMbps port, but you will never establish a valid link. Likewise, you can plug a 4Mbps station into a 16Mbps ring, but the station will never insert. However, token ring does a lot more than just monitor ring speed-token ring stations are in constant communication with each other.
Basically, when all the stations first come onto the ring, they contend for the right to serve as these different state machines. This can be loosely compared to a series of bridges electing a root bridge. The process is different, of course, but it is similar in concept insofar as any station can potentially serve as any of these entities and, should one of them deinsert or experience a failure, any other station is equally competent to pick up the duties of that entity. These functions vary quite a bit and, in some cases, are vital to ring operation.
Seven types of these state machines exist, listed next. The first two listed are the primary state machines, and take perhaps the most active roles in basic ring functionality.
- Active Monitor
- Standby Monitor(s)
- Ring Error Monitor
- Configuration Report Server
- Ring Parameter Server
- LAN Bridge Server
- LAN Reporting Mechanism
Again, for the most part, these are not user-configured; they contend for the positions and assume them automatically. If one goes down, the contention process begins again as soon as the absence is noted, and another station takes over. These functions will not upset performance.
The Active Monitor (AM) is the most active token ring entity and is responsible for basic ring housekeeping; every ring has its own Active Monitor. The Active Monitor is responsible for the following ring-related operations:
PROVIDING THE MASTER CLOCK
Timing is everything, and on a token ring, this is truer than ever. All stations must be synchronized to a common clock, and the Active Monitor is responsible for providing this clock source.
MAINTAINING PROPER RING DELAY
To accommodate the token, ring delay must be introduced sometimes, which is the Active Monitor's responsibility. Because the token is 24 bits long, a 24-bit delay is incurred, when necessary, to prevent the token pattern from converging on itself during transmission.
HANDLING LOST TOKENS OR FRAMES
A token must always be on the ring. If the Active Monitor does not detect the token on the ring for 10 milliseconds, it purges the ring and releases a fresh token.
HANDLING ORPHANED FRAMES
Because stations in token ring are responsible for stripping the token of its data after transmitting, a mechanism needs to be in place in the event that a station transmits and then fails before stripping the token (for more information regarding token ring data transmission, see Chapter 26). If the token were never stripped by the sending station, the data could potentially traverse the ring endlessly, and the token would never again become available for use. The token contains a bit called the monitor bit. The Active Monitor sets this bit to 1 every time that a frame passes by it; this marks the frame as having circled the ring once. If the AM gets a frame with this bit set, then it knows the data was never stripped by the originating station, and that a failure of some kind has occurred. It thus purges the ring and releases a new token.
INITIATING THE RING-POLL OR NEIGHBOR-NOTIFICATION PROCESS
In token ring, each station must know the address of its nearest active upstream neighbor (NAUN). Circumstances may arise on the ring in which either a breakdown in the protocol occurs or an actual hard error of some kind exists. In such cases, it may be important for a station to know which station is immediately upstream of it, to help isolate where the problem is coming from. A station or device may be able to associate an error with the MAC of its NAUN. If the upstream neighbor deinserts from the ring, its downstream neighbor notes this and learns its new NAUN. Through this mechanism, stations on a ring are able to maintain a sense of their local surroundings. The ring poll is initiated by the Active Monitor, to update the upstream neighbor address in all stations and to inform the other stations that the AM is still active on the ring. The AM does this by releasing an Active Monitor Present (AMP) frame every seven seconds...