token ring neil tang 9/22/2008
DESCRIPTION
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. - PowerPoint PPT PresentationTRANSCRIPT
CS440 Computer Networks 1
Token RingToken Ring
Neil TangNeil Tang9/22/20089/22/2008
CS440 Computer Networks 2
OutlineOutline
Basic Architecture
Physical Properties
MAC Protocol
CS440 Computer Networks 3
Token RingToken Ring
Basic architecture: multiple hosts share a ring.
MAC protocol: token passing
CS440 Computer Networks 4
Basic ArchitectureBasic Architecture
CS440 Computer Networks 5
Basic ArchitectureBasic Architecture
Host
From previoushost
To nexthost
Relay
(a)
Host
Host Host
From previoushost
To nexthost
Relay
(b)
Host
Host
Host
Host
From previousMSAU
To nextMSAU
MSAU
CS440 Computer Networks 6
Physical PropertiesPhysical 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 7
Frame Format Frame Format
Body CRCSrcaddr
Variable48
Destaddr
48 32
Enddelimiter
8
Framestatus
8
Framecontrol
8
Accesscontrol
8
Startdelimiter
8
CS440 Computer Networks 8
MAC AlgorithmMAC 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 9
MAC AlgorithmMAC 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 vol
ume 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 10
MAC AlgorithmMAC 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 11
MAC ProtocolMAC 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 12
MAC ProtocolMAC Protocol
Token Release: early VS. delayed
Token
Fram
eToken Frame
(a) (b)
CS440 Computer Networks 13
MaintenanceMaintenance
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.