Reference
Ethernet
Fast Ethernet
Gigabit Ethernet
Token Ring
Overview
Introduction
Frame Formats
Ring Monitors
Contention
Ring Poll
Ring Purge
Token Priority
Soft Errors
Beaconing
Troubleshooting
State Machines
Timers
Protocol Analysis
FDDI
LLC
Interconnect Devices
TCP/IP Protocols
RS-232
IEEE 802.4
Architectures
Fiber Optics
Wireless LAN
ATM
Detailed Contents
Manual Appendices

Token Priority

Prioritized Token Passing

Prioritized Token Passing is a scheme outlined in the IEEE 802.5 specification that is designed to allow stations with higher priorities to get the token more times than stations with lower priorities. This essay will describe the behavior of stations using Prioritized Token Passing.

Description of the Token Passing Process

In this discussion, we will refer to an imaginary token ring network consisting of four stations, A, B, C, and D. Data travels downstream from Station A to Station B, Station B to Station C, Station C to Station D, and from Station D to Station A. Furthermore, Station A has been assigned a priority of 0, Station B a priority of 4, Station C a priority of 6, and Station D a priority of 5. The identity of the Active Monitor is not relevant to this discussion.

The prioritized token passing scheme is a little confusing and non-intuitive at first. The basic rules are:

  • Any station wishing to capture the token can only do so if the current priority of the token is lower than its priority. If the priority of the token is higher than the priority of the station, the station may set the priority reservation to request a lower priority, but only if another station has not already set the priority reservation to a higher value than this station's priority (this will probably make more sense when you walk through the example).
  • Any station that raises the priority of the token must lower the priority back down to its original value the next time it sees a free token. This makes sure that everybody gets a chance to talk eventually.

The following is an example of behavior on a Token Ring using Prioritized Token Passing. It might help to get a piece of paper and draw out the ring as described above, and trace the token and its priority as it rotates.

  1. The token is circulating the ring normally and at some point in time, comes to Station A. At this point in time, Stations A, B, and C, have data queued to transmit. The priority of the token is zero.
  2. Station A captures the token and uses it to transmit the queued frame.
  3. Station B receives Station A's frame. Because this is a data frame and not a token, and because station B wants to increase the priority to 4 (Station B wants to make sure it gets the next token), station B changes the priority reservation of the frame to 4 before repeating it onto the wire.
  4. Station C receives the frame and, because it has a frame queued for transmission and wants to be the next to get the token, repeats the frame with a priority reservation equal to 6. Station C has a higher priority than the current requested priority of the frame, and can do this.
  5. Station D bit-repeats the frame, having no data to send.
  6. Station A begins stripping the frame from the ring.
  7. Station A releases a new token. Because the priority reservation of the frame was equal to 6, the priority of the new token is also equal to six. The priority reservation is equal to zero.
  8. Station B receives the priority 6 token, but cannot capture the token because its priority is less than the priority of the token. Station B again sets the priority reservation of the frame to 4.
  9. Station C receives the priority 6 token and, having a priority equal to or higher than that of the token, can capture it. Station C begins transmission of its queued frame.
  10. The frame transmitted by station C circulates the ring normally. Stations A and D have no frames to transmit, and station B sees that the priority reservation is already equal to the highest priority it can request.
  11. Station C receives the frame and strips it from the ring.
  12. Station C releases a token with a priority of 6 and a priority reservation of 4.
  13. Station A receives the token. Station A has been waiting to lower the priority from the last time it raised it (from zero to 4). According to the rules, any station that raises the priority must lower it back down the next time it sees the token. Station A remembers that it raised the priority from 0 to 4, but it also sees that the current priority is 6, and current requested priority is 4. Station A lowers the priority of the token to 4, remembers that it is still responsible for returning the priority to zero, and regenerates the token with a priority of four and a priority reservation of zero.
  14. Station B receives the token and can finally capture it since the priority of the free token is less than or equal to its priority.
  15. Station B transmits its data frame, which circulates the ring completely without being changed.
  16. Station B strips the frame from the wire and generates a token of priority four. It does not change the priority of the token because no other station requested that the priority be changed, and Station B is not responsible for lowering the priority until the next time it sees the free token.
  17. Station A receives the priority 4 token. Station A is finally able to return the token to its original priority of zero (remember, Station A has been waiting all this time to return the token to the state that Station A raised it from).
  18. The ring is now in its original state.