140 likes | 282 Views
Token Ring Neil Tang 9/22/2008. Outline. Basic Architecture Physical Properties MAC Protocol. Token Ring. Basic architecture: multiple hosts share a ring. MAC protocol: token passing. Basic Architecture. Basic Architecture. Physical Properties.
E N D
Token RingNeil Tang9/22/2008 CS440 Computer Networks
Outline • Basic Architecture • Physical Properties • MAC Protocol CS440 Computer Networks
Token Ring • Basic architecture: multiple hostsshare a ring. • MAC protocol: token passing CS440 Computer Networks
Basic Architecture CS440 Computer Networks
Basic Architecture CS440 Computer Networks
Physical Properties • Data flow: Itgoes 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
8 8 8 48 48 Variable 32 8 8 Start Access Frame Dest Src End Frame Body CRC delimiter control control addr addr delimiter status Frame Format 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: Afteraperiod of(NumSationTHT+RingLatency), if no token comes back, it creates a new token. • Monitor the corrupted or orphan (dead sender) frames: Itsets “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