Thursday, 18 January 2007

Token Ring

Ethernet developed before the microprocessor revolution, so it is a rather simple protocol that make limited demands on the intelligence of the individual stations. Token Ring developed later, after it had become possible to assume that every adapter card could have its own small CPU. It adopts a much more complicated protocol than Ethernet, and accepts a higher cost, but in return it can provide a higher level of reliability and graceful handling of heavier loads.

In "classical" Ethernet, all stations are connected to a common data path. Anything sent by any station is received by all other stations. In the Token Ring, every station is connected to the next station by a pair of wires. That station is connected to the next station, and so on until the ring is completed when some station connects back to the first. Messages flow on the ring from station to station until they return to the point of origin.

However, the wires do not actually run just between the stations. Instead, wires run to every desktop from a central wiring closet. Each circuit therefore runs from one desktop to the closet, and then from the closet back out to the next desktop.

The cable to the desktop is called a lobe. It contains two pair of wires. One "receive" pair brings in the signal from the previous station, while the other "transmit" pair sends out a signal that goes to the next station.

The trick that makes a Token Ring work is that the lobe cable is connected in the wiring closet through a relay that is under the control of the adapter card in the workstation at the end of the lobe. In one position, the lobe cable is isolated from all other traffic and the transmit wire is looped back to the receive wire. Any data that the adapter sends goes down to the wiring closet and then is immediately sent back. Before anything else, or when a problem has been detected on the LAN, the adapter card can activate the loopback and send a test pattern to itself. This verifies integrity or detects any breaks or shorts in the lobe cable.

If the lobe cable is working correctly, the adapter can trip the relay into the active position. It then "enters" the ring, receiving and forwarding data from the other stations. When there is no data to send, the stations circulate a one byte "token" message. Any station that has data to transmit can do so upon receiving the token.

By election, one of the stations on the ring is designated the Active Monitor. This station pays particular attention to the data and tokens that pass by on the ring. The Active Monitor has two jobs:

  1. If the token is lost (most commonly because it is passing by a station when the relay is switched from one position to another and the circuit is broken for a few milliseconds) then the Active Monitor waits for a time-out period and then generates a new token.
  2. If a station sends a message, but then malfunctions before the message gets all the way around the ring, then the Active Monitor detects that the message is looping around and removes it from the ring on its second pass.

After sending any data, a station must generate a Token and pass it on to the next station. In normal use, each station is given an opportunity to send one data message before any station is allowed to send its second message. Thus the token ring handles congestion much more smoothly than the Ethernet collision system.

Each station has a unique address, either the value assigned to the card at the factory or a number configured locally by the system administrator. In the process of passing data from one station to another, each station learns the address of the station immediately before it (its "nearest upstream neighbor"). If a station has not received any data or token in the last few seconds, it begins to transmit an alert message called a "beacon" supplying in that message its own address and that of its nearest upstream neighbor. When any workstation receives the beacon message, it knows that some other workstation is handling the problem and it simply forwards the beacon on. Almost instantly, every station on the ring is receiving a message that says that "I am station 1227 and I am no longer receiving data from 1224, so there must be a break in the wire between us." Even if human intervention were required, most of the problem determination has already been done.

However, the adapter cards can usually respond to the beacon themselves. The station generating the beacon (1227) and the station being accused (1224) will trigger their relays to remove themselves from the ring and to rerun the loopback test. Any problem in either lobe cable will be detected. Human intervention is only required when the equipment in the wiring closet malfunctions, or when the cable between closets is cut.

Ethernet originally was a fairly simple system in which many stations with relatively dumb cards were connected by a single wire. The Token Ring showed that improved reliability could be achieved by putting greater intelligence in the adapter cards. The original Token Ring design, however, assumed dumb hub wiring devices in the closets. Microprocessor technology has continued to advance. Modern Ethernet equipment puts intelligence in the hubs. The Ethernet equivalent of the lobe cable may now be isolated from the traffic between stations by electronic circuits instead of a mechanical relay.

Thus it is no longer possible to make simple judgments that one LAN technology is "lower cost" or "more reliable" than another. Since intelligent hubs eliminate collisions, it is not even possible to predict response to heavy loading. Either Ethernet or Token Ring can be made more reliable or more robust by spending more money on hub equipment in the wiring closet.

Additional information is available in self-study courses from SRA (1-800-SRA-1277)

  • Local Area Network Media [34608]

Copyright 1995 PCLT -- Token Ring -- H. Gilbert

This document generated by SpHyDir another fine product of PC Lube and Tune.

No comments:

Post a Comment