Token Ring - The Data Link Layer

 

DCE logo

 line

An overview of Token Ring operation

The Token Ring technique is based on the use of a small frame called a token, that circulates when all stations are idle.Whenever a station wishes to send a frame it waits until it receives the token.As it seizes the token one bit is changed which then transforms the token into a start of frame sequence for a data frame.The station then transmits the remainder of the data fields necessary to complete a data frame.The data frame includes the destination station address at its head.

The frame is repeated (received, checked and retransmitted), by each station on the network until it circulates back to the source station, where it is removed.In addition to repeating the frame, the destination station retains a copy of the frame and this is indicated by the setting of the response bits, at the end of the frame.The manner in which stations release the token after transmitting data depends on the ring data rate.With rings which operate at the conventional 4 Mbps, the token is released only after the transmitted frames response bits have been received back at the transmitting station.With modern rings which operate at the higher rate of 16 Mbps., the token is released after transmitting the last bit of the frame.This is known as Early Token Release (ETR).


How Token Passing Operates

tkpass

 

A note on Early Token Release (ETR)

Stations on a 16 Mbps Token Ring network can release the token immediately after transmitting a frame instead of waiting until they have stripped the frame.

This increases the performance of the ring by allowing;


The Token Ring Medium Access Control (MAC) Sublayer Protocol

The protocol at the upper part of the Data Link Layer is not defined under IEEE 802.5.

The MAC sublayer forms the lower part of the Data Link Layer and is defined under IEEE 802.5.

This protocol is used by stations in a Token ring network to allow communication between each other.The data frame and token formats are defined under this protocol.

Operation of the MAC protocol:

It can be seen from the diagram above how token passing operates at a basic level.

When the ring is idle a 3 byte token circulates waiting for a station seize it by setting a specific o bit to a 1 bit.When this occurs the token is converted into the start of frame sequence.The station then outputs the rest of a normal data frame as shown in the diagram below.

 

frame

The Token format

Tokens are 3 bytes (24 bits) in length and consist of a start delimiter, an access control byte, and an end delimiter.

The Data Frame format

Data/command frames vary in size, depending on the size of the information field. Data frames carry information for upper-layer protocols; command frames contain control information and have no data for upper-layer protocols.

When the station which sent the frame strips it from the ring, it examines the A and C bits.The three possible combinations are;

  1. A=0 and C=0; Destination not present or powered up.
  2. A=1 and C=0; Destination present but frame not accepted.
  3. A=1 and C=1; Destination present and frame copied.

This arrangement provides an automatic acknowledgment of the delivery status of each frame.

Token Access Priority

Token Ring networks use a sophisticated priority system that permits certain user-designated, high priority stations the potential to use the network more frequently.The token frame contains two fields that control priority:The priority field and the reservation field.

The priority field in the middle byte of the token frame indicates the priority of the token.This operates as follows;

When a station wants to transmit a priority n frame, it must wait until it can capture a token whose priority is less than or equal to n.When a data frame goes by , a station can try to reserve the next token by writing the priority of the frame it wants to send into the frames Reservation bits.This can only be done however if a higher priority has already been reserved there.When the current frame has been striped the next token is generated at the priority that has been reserved.


Token Ring Maintenance and Management under the MAC protocol

Every Token Ring network has an active monitor station which oversees the operation of the ring and performs a management and maintenance function.This station acts as a centralised source of timing information and every station on the ring has the capability of becoming the active monitor. When the active monitor is functioning correctly, it alone is responsible for seeing that the ring operates correctly.All other stations on the ring are known as standby monitors.

So far only Token Ring networks which are in an active or steady state have been considered.When the ring is powered up after having been switched off there initially exists a situation where there is no active monitor.The first station to notice this transmits a Claim Token control frame.If this frame circumnavigates the the ring before any other Claim Token frames are sent, the sender becomes the new active monitor.

The following table exhibits the bit patterns in the Access Control frame which correspond to the various management and maintenance functions;

Control Field

Function Name

Meaning

00000000

Duplicate address test

Test if two stations have the same address

00000010

Beacon

Used to locate breaks in the ring

00000011

Claim token

Make attempt to become the active monitor

00000100

Purge

Reinitialize the ring

00000101

Active monitor present

Indicates that the active monitor remains in control

00000110

Standby monitor present

Announces the presence of standby monitors

Duties of the Active Monitor

Duties of the Standby Monitor(s)

 

One maintenance function that is not handled by the active monitor is locating breaks in the ring.When a station detects a failure of token claiming following a hardware error its transmits a Beacon frame (Beaconing initiates a process called Autoreconfiguration), giving the address of the presumed faulty station.When the beacon has travelled around the ring as far as it can, it is then possible to see how many stations are down and delete them from the ring using the bypass relays in the Multistation Access Units.