1 of 28

1

Token Ring

krraju.in

2 of 28

  • What is a token and how it controls the access to the network?
  • Why Token ring (IEEE 802.5 standard) and How token ring operates?
  • What is a Ring interface and what are its functions?
  • How data is inserted, received and removed from the ring?
  • Differentiating Token Ring with Ethernet.

2

What you’ll learn

Token Ring

krraju.in

3 of 28

Token

3

  • In bit-map protocol, every station transmits a frame in a predefined order.
  • Another way to accomplish the same thing is to pass a small message (special control frame) called a token from one station to the next in the same predefined order.
  • Token represents permission to send.
    • A station which is in possession of the token only can transmit frames. It may transmit one or more frames but before the expiry of Token Holding Time (typically 10 msec).
    • After the token holding time, the token must be handed over to some other station.

krraju.in

4 of 28

Token Ring

4

  • Developed by IBM in early 1980’s.
  • It is basically a polling system.
  • A token does the polling and it circulates around the ring.
  • Stations are connected into a ring through interfaces by unidirectional point-to-point links forming a single closed path.
    • Interface is a repeater that regenerates the received data and sends to the next station after some delay
      • It acts as an attachment point
      • It performs data insertion, data reception, data removal

krraju.in

5 of 28

Token Ring Protocol

5

Topology of the network defines the order in which stations send.

  • Passing the token to the next station simply consists of receiving the token in from one direction and transmitting it out in the other direction.
  • When a station receives the token,
    • Has frame to send: it can send the frame before it passes the token to the next station.
    • Has no frame to send: it simply passes the token
  • Frames are also transmitted in the direction of the token.
    • They will circulate around the ring and reach the destination.
  • Frame is removed by transmitter after one trip round ring

krraju.in

6 of 28

IEEE 802.5 Frame Formats

6

Dest. Addr

AC

FC

Bytes

1

Data Frame

Source Addr

FCS

Data

1

2 or 6

2 or 6

Upto 4500

4

SD

FS

ED

1

1

1

AC

Token

SD

ED

Abort Sequence

SD

ED

Start Delimiter

Access Control

Frame Control

End Delimiter

Frame Status

krraju.in

7 of 28

Start Delimiter (SD)

7

This 8-bit field is used to:

  • Inform the receiving station that a new frame is arriving.
  • Synchronize the transmit and receive clocks
  • Bits
    • J & K are Manchester coding violations and have no change of state during the half bit.
      • The J code violation is a steady high state and the K code violation is a steady low state.

J

K

0

J

K

0

0

0

krraju.in

8 of 28

Access Control (AC)

8

This 8-bit field is used to:

  • Set priority of Token
  • Indicate if it is a Token or Information (Data) Frame
  • To stop frames from continuously circulating the ring
  • Bits
    • P = Priority Bits to indicate priority of the token
    • T = Token Bit (0-Token , 1-Information)
    • M = Monitor Bit
    • r = Reservation Bits

P

P

P

T

M

r

r

r

krraju.in

9 of 28

Access Control (AC)

9

The Priority Bits are used to indicate the priority of the Token. Each workstation is assigned a priority for their transmissions: 000 is the lowest and 111 is the highest (7 levels of priorities). The LAN administrator sets the priority levels. For a workstation to claim a Token, it must have a priority equal to or greater than the priority of the Token.

It is the responsibility of the node when finished transmitting data, to release the Token and to return the priority bits to the Reservation Bits.

The Reservation Bits are used to negotiate the priority of the next token as a transmission passes by. When a Token or Token Frame goes by, a node is allowed to reserve the priority of the next Token to be released by placing its priority in the Reservation Bits. In order to change the Reservation Bits, the node's priority must be greater than the existing Reservation bits.

P

P

P

T

M

r

r

r

krraju.in

10 of 28

Access Control (AC)

10

The Token Bit is used to indicate whether the frame is a Token or Token Frame (information frame).

  • T=0 indicates a Token,
  • T=1 indicates a Token Frame.

The Monitor Bit is used by the Active Monitor (AM) to stop frames from continuously circulating the ring.

  • The Monitor bit is set to M=0 by the Source and when a frame passes by the AM, the monitor bit is set to M=1. If the AM receives a frame with the monitor bit set to M=1.
  • The frame is removed from the ring, purges the ring and issues a new token.

P

P

P

T

M

r

r

r

krraju.in

11 of 28

Frame Control (FC)

11

This field Indicates frame type (MAC or LLC)

  • Provides communication at the MAC level between stations

It consists of 8 bits where

  • F = Frame Type (00 = MAC, 01 = LLC, 1x = not defined) indicates whether it is a MAC layer addressed or an LLC layer addressed communication.
  • Z = Control Bits indicate the type of MAC level communication.
    • 00 - Normal Buffer
    • 01 - Express Buffered
    • 02 - Beacon
    • 03 - Claim Token
    • 04 - Ring Purge
    • 05 - Active Monitor
    • 06 - Standby Monitor

F

F

Z

Z

Z

Z

Z

Z

krraju.in

12 of 28

Address Fields

12

Destination Address (DA) indicates the destination address of the Token Frame (information frame). It consists of 48 address bits.

  • The first bit is the Individual/Group (I/G) bit - indicates an individual or broadcast (to everyone).
  • The 2nd bit is used to indicate naming convention (Universal/ Local).
    • Universal: use the MAC address burnt into the NIC's ROM.
    • Local: set by the LAN administrator.
  • The remaining 46 bits are the stations unique address.

Source Address (SA) is identical to the DA field except that the I/G bit is always set to Individual (0) for IEEE 802.5.

krraju.in

13 of 28

Data (Information) Field

13

This Field is used to carry data communication to:

  • the MAC layer (IEEE 802.5)
  • the LLC layer (IEEE 802.2)

The Frame Control bits FF determine whether the information is for the MAC (FF=00) or LLC (FF=01) layer.

The Routing Bit determines whether the frame uses normal MAC layer communication or if Source Routing is used. Only, IBM Token Ring uses Source Routing, IEEE 802.5 does not.

  • If the Routing Bit is set, then the MAC Frame INFO field contains routing information used during Source Routing. The Routing Bit instructs the bridge to pass the Token Frame or ignore.
  • If the Routing Bit is not set then normal MAC layer local ring communication is active.

No size limitation. The token holding time will decide the maximum size of the data field.

krraju.in

14 of 28

End Delimiter (ED)

14

This 8-bit field is used to indicate the end of the frame.

  • It consists of a "J K 1" sequence
    • where J & K are Manchester coding violations
  • I = Intermediate bit, indicates that a frame is part of a multiframe transmission
  • E = Error bit indicates that there is an error in the frame such as bad FCS, Manchester code violation, non-integral number of bytes.

J

K

1

J

K

1

I

E

krraju.in

15 of 28

Frame Status (FS)

15

This is used to indicate whether the address was recognized by the destination and if the frame was copied.

  • This acts as an indication to the source that the destination station is present and accepting data.

This FS field consists of 8 bits, where

  • A - address recognized bit
  • C - Frame copied bit
  • r - Reserved bit

Note: The A/C bits are provided twice for redundancy.

A

C

r

r

A

C

r

r

krraju.in

16 of 28

Ring Operation

  • Token circulates when idle
  • Station waits for token
  • Changes one bit in token [Busy token: 01111111. Free token: 01111110]
  • Append rest of data frame
  • Frame makes round trip and is absorbed by transmitting station
  • Station then inserts new token when transmission has finished and leading edge of returning frame arrives

16

krraju.in

17 of 28

Token Release

17

Release after Transmission

  • Station replaces token on the ring as soon as it is done transmitting the frame
  • Next station can use token after short propagation delay

Release after Reception

  • Station releases token only after its own frame has returned to it serves as a simple acknowledgement mechanism.

Physical ring is not needed to implement token passing. All that is needed is a logical ring, where each station knows its predecessor and successor

krraju.in

18 of 28

Frame Removal

18

To stop the frame circulating indefinitely (like the token), some station needs to remove it from the ring.

Frame removal is done at

  • Original station that sent the frame, after it has gone through a complete cycle.
  • The intended recipient station of the frame

Repeater regenerates and retransmits each bit

  • It has two states of operation
    • Listen state
    • Transmit state

krraju.in

19 of 28

Listen State

  • Scan passing bit stream for patterns
    • Address of attached station
    • Token permission to transmit
  • Copy incoming bit and send to attached station
    • At the same time forwarding each bit
  • Modify bit as it passes
    • e.g. to indicate a frame has been copied (ACK)

19

krraju.in

20 of 28

Transmit State

  • Station has data. Repeater has permission
  • May receive incoming bits
    • If ring bit length shorter than frame
      • Pass back to station for checking (ACK)
    • May be more than one frame on ring
      • Buffer for retransmission later

Bypass State

  • Signals propagate past repeater with no delay (other than propagation delay)
  • Partial solution to reliability problem (see later)
  • Improved performance

20

krraju.in

21 of 28

Design Issues

21

  • Fairness: Can a node hold the token for a long time
    • Solution: maximum token hold time
  • Token failures: Tokens can be created or destroyed by noise
    • Distributed solution:
      • Nodes are allowed to recognize the loss of a token and create a new token
      • Collision occurs when two or more nodes create a new token at the same time
        • Need collision resolution algorithms
  • Node failures: Since each node must relay all incoming data, the failure of a single node will disrupt the operation of the ring

krraju.in

22 of 28

Token Ring Advantages

22

  • Stations don’t need carrier sensing, time synchronization, complex protocols to resolve contention.
    • MAC protocol is explicit and therefore simple.
      • If a station has a token, it can send data, otherwise it can’t.
  • Guarantees zero collisions
    • Since data flows in one direction, the chance of a packet collision is reduced
  • Guaranteed maximum waiting time for access.
  • Priorities are possible.
  • Short frames are possible as well as long ones (limited by token holding time)

krraju.in

23 of 28

Token Ring Advantages

23

  • A network server is not needed to control network connectivity
  • Maximum utilization of media bandwidth.
    • The throughput and efficiency at high load are excellent.
    • Better suited for high traffic environments than a bus topology
  • It uses point to point connections.
    • Rings can be built using virtually any transmission medium.
  • High reliability. Easy to identify and isolate single points of failure.
    • The use of wire centers make the token ring the only LAN that can detect and eliminate cable failures automatically.
    • Devices can be added without impacting network performance

krraju.in

24 of 28

Token Ring Disadvantages

24

  • Presence of a centralized monitor function, which introduces a critical component.
    • Token represents a single point of failure
  • Delay at low load.
    • Because the sender must wait for the token.
  • Monitoring tokens and stations introduce the complexity

Heavy Traffic: A queue to transmit frames is formed at each station. Station finishes transmitting, regenerates token. Next station downstream sees token and takes it. Process continues - round robin fashion.

Light Traffic: Token circles endlessly except for the rare occasion when a station grabs it and transmits a frame.

krraju.in

25 of 28

25

Token Ring (IEEE 802.5)

Ethernet (IEEE 802.3)

Token passing mechanism is used. Only one station stays active at a time to send data

Uses CSMA/CD mechanism. More than one station stays active at a time.

Deterministic.

Non-deterministic.

Ring (or Star shaped) topology.

Bus topology.

Handles priority

Does not employ priority.

Costs more than Ethernet.

Costs 70% less than token ring.

Telephone wire is used.

Coaxial cable is used.

Contains routing information.

Does not contain routing information.

Transmission speed is 4 to 16 Mbps.

Transmission speed is 10 to 100 Mbps.

Unidirectional data flow from a station to another only when the token is received.

Data frames can be transmitted by any of the station if the network is idle.

krraju.in

26 of 28

Recap

  • In token ring devices are connected in a ring or star topology and pass one or more tokens from node to node. In fact, the ring created is a logical one, not a physical one.
    • No collision in the network and, therefore, utilization can reach 100% under heavy load.
  • Ethernet beat out Token Ring on speed and performance

26

krraju.in

27 of 28

Video Links

27

krraju.in

28 of 28

Potpourri

  • FDDI (Fiber Distributed Data Interface)
  • RPR (Resilient Packet Ring) (IEEE 802.17): mix of metropolitan area rings in use by ISPs

28

krraju.in