Token Ring Neil Tang 9/22/2008 CS440 Computer Networks
Outline Basic Architecture Physical Properties MAC Protocol CS440 Computer Networks
Token Ring Basic architecture: multiple hosts share a ring. MAC protocol: token passing CS440 Computer Networks
Basic Architecture CS440 Computer Networks
Basic Architecture CS440 Computer Networks
Physical Properties Data flow: It goes along a particular direction around the ring, with each node receiving frames from its upstream neighbor and then forwarding them to its downstream neighbor. Encoding: Manchester Error detection: CRC Max number of hosts: 250 Data rate: 4Mbps/16Mbps Cables: Twisted pair cable CS440 Computer Networks
Frame Format CS440 Computer Networks Body CRC Src addr Variable 48 Dest 32 End delimiter 8 Frame status control Access Start CS440 Computer Networks
MAC Algorithm Basic Idea: Token Passing A token (a special bit sequence) circulates around the ring. Every node forwards it. A node with data to send takes the token off the ring and inserts its frame into the ring. Each node along the way forwards the frame. The destination node save a copy and continue to forward it. The sender removes the frame when it gets back. CS440 Computer Networks
MAC Algorithm Token Holding Time (THT): THT: The maximum duration within which a node is allowed to hold the token. Default value: 10ms Tradeoff between throughput and fairness: allow one with a large volume of data to send as mush as it could VS. give everyone a chance to send. Token Rotation Time (TRT): TRT = i (Actual THT of Node i) + RingLatency (ring propagation delay) TRT NumNodes THT + RingLatency CS440 Computer Networks
MAC Algorithm Priority: Frames and token have priorities. Only the frame with priority higher than or equal to that of the token can be transmitted. The token’s priority changes over time. When a station X having frames with a higher priority n to send sees a frame with lower priority m passing by, X will set the frame’s reservation bits to n. When the station currently has the token gets the frame back, it elevates the priority of the token to n and release it. After X transmits its frames, it changes the priority of the token back to m and releases it. CS440 Computer Networks
MAC Protocol Reliable Transmission: 2 bits in “Frame Status”: A bit and C bit. Initial value: A=C=0. The destination node: sets A=1 when receiving the frame and sets C=1 after copying it to its adaptor. The sender: If A=0, the destination is down. If A=1 but C=0, the destination cannot accept the frame (error detected, lack of buffer), retransmit it later. CS440 Computer Networks
MAC Protocol Token Release: early VS. delayed CS440 Computer Networks
Maintenance A Monitor Station Monitor the token: After a period of (NumSationTHT+RingLatency), if no token comes back, it creates a new token. Monitor the corrupted or orphan (dead sender) frames: It sets “monitor” bit to 1 at the first time the frame passes and get rid of it at the second time. A monitor station will periodically announce its presence by a special control frame. If a station fails to see it for a certain period of time, it transmits a “claim token” frame to announce its intent to become a new monitor. Tie can be broken by “highest address wins” rule if multiple stations compete for this at the same time. CS440 Computer Networks