Token Bus Ring
Token Bus Ring
4)
Token Bus is described in the IEEE 802.4 specification, and is a Local Area Network (LAN) in which the stations on the bus or tree form a logical ring. Each station is assigned a place in an ordered sequence, with the last station in the sequence being followed by the first, as shown below. Each station knows the address of the station to its "left" and "right" in the sequence.
A Token Bus network This type of network, like a Token Ring network, employs a small data frame only a few bytes in size, known as a token, to grant individual stations exclusive access to the network transmission medium. Token-passing networks are deterministic in the way that they control access to the network, with each node playing an active role in the process. When a station acqires control of the token, it is allowed to transmit one or more data frames, depending on the time limit imposed by the network. When the station has finished using the token to transmit data, or the time limit has expired, it relinquishes control of the token, which is then available to the next station in the logical sequence. When the ring is initialised, the station with the highest number in the sequence has control of the token. The physical.topology of the network is either a bus or a tree, although the order in which stations are connected to the network is not important. The network topology means that the we are essentially dealing with a broadcast network, and every frame transmitted is received by all attached stations. With the exception of broacast frames, however, frames will only be read by the station to which they are addressed, and ignored by all other stations. As the token frame is transmitted, it icarries the destination address of the next station in the logical sequence. As each individual station is powered on, it is allocated a place in the ring sequence (note that in the diagram above, station two is not participating in the ring). The Token Bus medium access control protocol allows stations to join the ring or leave the ring on an ad-hoc basis. Token Bus networks were conceived to meet the needs of automated industrial manufacturing systems and owe much to a proposal by General Motors for a networking system to be used in their own manufacturing plants - Manufacturing Automation Protocol (MAP). Ethernet was not considered suitable for factory automation systems because of the contention-based nature of its medium access control protocol, which meant that the length of time a station might have to wait
to send a frame was unpredictable. Ethernet also lacked a priority system, so there was no way to ensure that more important data would not be held up by less urgent traffic. A token-passing system in which each station takes turns to transmit a frame was considered a better option, because if there are n stations, and each station takes T seconds to send a frame, no station has to wait longer than nT seconds to acquire the token. The ring topology of existing token-passing systems, however, was not such an attractive idea, since a break in the ring would cause a general network failure. A ring topology was also considered to be incompatible with the linear topology of assembly-line or process control systems. Token Bus was a hybrid system that provided the robustness and linearity of a bus or tree topology, whilst retaining the known worstcase performance of a token-passing medium access control method. The transmission medium most often used for broadband Token Bus networks is 75 Ohm coaxial cable (the same type of cable used for cable TV), although alternative cabling configurations are available. Both single and dual cable systems may be used, with or without head-ends. Transmission speeds vary, with data rates of 1, 5 and 10 Mbps being common. The analogue modulation schemes that can be used include:
Phase continuous frequency shift keying Phase coherent frequency shift keying Multilevel duobinary amplitude modulated phase shift keying
therefore be used to implement a real-time control system. As an example, if a network running at 10 Mbps and having fifty stations has been configured so that level 6 traffic is allocated onethird of the bandwidth, each station has a guaranteed bandwidth of 67 kbps for level 6 traffic. The available high priority bandwidth could thus be used to synchronise robots on an assembly line, or to carry one digital voice channel per station, with some bandwidth left over for control information.
The Token Bus frame format The Token Bus frame format is shown above. The Preamble field is used to synchronise the receiver's clock. The Start Delimeter and End Delimeter fields are used to mark the start and end of the frame, and contain an analogue encoding of symbols other than 0s and 1s that cannot occur accidentally within the frame data. For this reason, a length field is not required. The Frame Control field identifies the frame as either a data frame or a control frame. For data frames, it includes the priority level of the frame, and may also include an indicator requiring the destination station to acknowledge correct or incorrect receipt of the frame. For control frames, the field specifies the frame type. The Destination and Source address fields contain either a 2-byte or a 6-byte hardware address for the destination and source stations respectively (a given network must use either 2-byte or 6byte addresses consistently, not a mixture of the two). If 2-byte addresses are used, the Data Field can be up t0 8,182 bytes. If 6-byte addresses are used, it is limited to 8,174 bytes. The Checksum is used to detect transmission errors. The various control frames used are shown in the table below.
Token Bus Control Frames Frame control field Name Meaning 00000000 Claim_token Claim token during ring initialisation 00000001 Solicit_successor_1 Allow stations to enter the ring 00000010 Solicit_successor_2 Allow stations to enter the ring 00000011 Who_follows Recover from lost token Used when multiple stations want to 00000100 Resolve_contention enter the ring 00001000 Token Pass the token 00001100 Set_successor Allow stations to leave the ring
Periodically, a station will transmit a SOLIT_SUCCESSOR frame to solicit bids from stations wishing to join the ring. The frame includes the sender's address, and that of its current successor in the ring. Only stations with an address falling between these two addresses may bid to enter the ring (in order to maintain the logical order of station addresses on the ring). If no station bids to enter within a slot time, the response window is closed, and the token holder returns to its normal business. If only one station bids to enter, it is inserted into the ring and becomes the token holder's successor. If two or more stations bid to enter, their frames will collide and be garbled. The token holder then runs an arbitration process, that begins with the broadcast of a RESOLVE_CONTENTION frame. The algorithm is a variation of binary countdown, using two bits at a time. All station interfaces maintain two random bits which are used to delay all bids by 0, 1, 2 or 3 slot times to further reduce contention. Two stations will only collide on a bid, therefore, if the current two address bits being used are the same and they happen to have the same two random bits. To prevent stations that must wait 3 slot times from being at a permanent disadvantage, the random bits are regenerated either every time they are used, or every 50 msec. The solicitation of new stations is not allowed to interfere with the guaranteed worst case for token rotation. Each station has a timer that is reset whenever it aquires the token. When the token arrives, the existing value of this timer (i.e. the previous token rotation time) is inspected before the timer is reset. If a pre-determined threshold value has been exceeded, recent levels of traffichave been considered to be too high, and no bids may be solicited this time round. In any case, only one station can enter the ring during each solicitation, to limit the amount of time that can be used for ring maintenance. There is no guaranteed time limit set on how long a station has to wait to enter the ring when traffic is heavy, but in practice it is not normally longer than a few seconds. To leave the ring, a station X with a predecessor P and a successor S simply sends a SET_SUCCESSOR frame to P telling it that from now on its successor is S. Station X then just stops transmitting. Ring initialisation is a special case of adding new stations. When the first station comes on line, it registers the fact that there is no traffic for a specified period. It then broadcasts a CLAIM_TOKEN frame. Not receiving a reply, it creates a token and sets up a ring consisting of just itself, and periodically solicits bids for new stations. As new stations are powered on, they will respond and join the ring, if necessary using the contention algorithm described above. If the first two stations are powered on simultaneously, they are allowed to bid for the token using the standard modified binary countdown algorithm and the two random bits. Problems sometimes arise with the token or the logical ring due to transmission errors (for example a station tries to pass a token to a station which has been taken offline). After passing the token, therefore, a station monitors the network to determine wther its successor has either transmitted a frame or passed the token. If neither of these events occurs, it generates a second token. If that also fails to produce the required outcome, the station transmits a WHO_FOLLOWS
frame specifying the address of its successor. When the failed station's successor sees a WHO_FOLLOWS frame naming its predecessor, it responds with a SET_SUCCESSOR frame, naming itself as the new successor. The failed station is then removed from the ring. If two consecutive stations go offline, the WHO_FOLLOWS frame will fail to ellicit a response. In this situation, the station that originally passed the token sends a SOLICIT_SUCCESSOR_2 frame to see if any other stations are still active. The standard connection protocol is run once again, with all active stations bidding for a place until the ring is re-established. A problem can also occur if the token holder goes down and takes the frame with it. In this case, the ring initialisation algorithm is used to re-establish the ring. Multiple tokens on the ring are another problem, and if a station currently holding a token notices a transmission from another station, it discards its token. If multiple tokens are present on the network at the same time, this process is repeated until all but one of the tokens are discarded. If all of the tokens are discarded by accident, the lack of activity will cause one or more of the stations to try and claim the token.
Frame format
Two basic frame types are used - tokens, and data/command frames. The token is three bytes long and consists of a start delimiter, an access control byte, and an end delimiter. The format of the token is shown below.
The Token Ring token A data/command frame has the same fields as the token, plus several additional fields. The format of the data/command frame is shown below.
Start delimiter - alerts each station of the arrival of a token or frame. Access control byte - contains the priority field, the reservation field, the token bit and a monitor bit. Frame control byte - indicates whether the frame contains data or control information. In a control frame, this byte specifies the type of control information carried. Destination and source addresses - two six-byte fields that identify the destination and source station MAC addresses. Data - the maximum length is limited by the ring token holding time, which defines the maximum time a station can hold the token Frame check sequence (FCS) - filled by the source station with a calculated value dependent on the frame contents. The destination station recalculates the value to determine whether the frame was damaged in transit. If so, the frame is discarded. End delimiter - signals the end of the token or frame, and contains bits that may be used to indicate a damaged frame, and to identify the last frame in a logical sequence.
Frame status - a one-byte field that terminates a frame, and includes the one-bit addressrecognized and frame-copied fields. These one-bit fields, if set, provide confirmation that the frame has been delivered to the source address and the data read. Both fields are duplicated within the frame status byte.
If the network is quiet and none of the stations has any data to transmit, the token simply circulates around the ring continuously. When a station has data to transmit, it waits until it receives the token, marks it as "busy" by setting the token bit, adds the data and/or control information to create a data or command frame, and transmits the frame to the next station. Each station that receives the frame will re-transmit the frame to the next staion until it reaches the destination station. This station reads the data, sets the address recognised and frame copied bits in the frame status field, and transmits the frame to the next node. When the frame arrives back at its point of origin, the originating station generates a new token, which it transmits to the next station, even if it has further data to send. In this way, each station network has an equal number of opportunities to transmit data. Because only one token is allowed to exist on the network, only one station can transmit at any one time, and collisions cannot occur. Although the IEEE 802.5 specification reflects IBM's Token Ring technology, the specifications differ slightly. IBM specifies a star topology, with all end stations star-wired to a multi-station access unit (MSAU), wheras IEEE 802.5 does not specify a topology (although virtually all IEEE 802.5 implementations were based on a star). In addition, IEEE 802.5 does not specify a media type, while IBM originally specified shielded twisted pair cable. The table below summarises the IBM and IEEE 802.5 specifications.
IBM Token Ring v. IEEE 802.5 IBM Token Ring Data rate Stations per segment Topology Media Signalling Access method Encoding 4 or 16 Mbps STP - 260 UTP - 72 Star Twisted pair Baseband Token passing IEEE 802.5 4 or 16 Mbps 250 Not specified Not specified Baseband Token passing
Priority System
Token Ring networks provide a user-configurable priority system that allows stations that are designated as having a high-priority to use the network more frequently. Token Ring frames have two fields that control priority - the priority field, and the reservation field. Only stations with a priority equal to, or higher than, the value contained in a token's priority field can aquire the token. Once the token is in use, only stations with a priority value higher than that of the transmitting station can reserve the token for the next pass around the network. When the next token is generated, it is set to the priority of the reserving station. Any station that raises the token's priority level must restore it to the previous level after use.
Fault Management
One station (it can be any station on the network) is selected to be the active monitor. The active monitor acts as a central source of timing information for the other stations on the network, and performs various maintenance functions, including making sure that there is always a token available on the network. The active monitor also sets the monitor bit on any data or command frame it encounters on the ring so that, in the event that a sending device fails after transmitting a frame, the frame can be prevented from circling the ring endlessly and thereby denying access to the network for other stations. If the active monitor receives a frame with the monitor bit already set, it removes the frame from the ring and generates a new token. The use of a multi station access unit (or wiring center) in a star topology contributes to network reliability, since these devices can be configured to check for problems and remove faulty stations from the ring if necessary. A Token Ring algorithm called beaconingcan be used to detect certain types of network fault. When a station detects a serious problem on the network (a cable break, for example), it transmits a beacon frame which initiates an auto-reconfiguration process. Stations that receive a beacon frame perform diagnostic procedures and attempt to reconfigure the network around the failed areas. Much of this reconfiguration process can be handled internally by the MSAU. The MSAU contains relays that switch a computer into the ring when it is turned on, or out of the ring when the computer is powered off. A MSAU has a number of ports to which network devices can be connected, a ring-out port allowing the unit to be connected to another MSAU, and a ring-in port that can accept an incoming connection from another MSAU. A number of MSAUs can thus be connected together in daisy-chain fashion to create a larger network. The ring-out port of the last MSAU in the chain must be connected back to the ring-in port of the first MSAU.