Title: Ring Local Area Network
1Ring Local Area Network
2Ring LANs
- The ring is a series of bit repeaters, each
connected by a unidirectional transmission link - All arriving data is copied into a 1-bit buffer
and then copied out again (1-bit delay) - Data in the buffer can be modified before
transmission - Ring interface can be in one of three states
- Listen State
- Transmit State
- Bypass State
3States of the Ring Interface
- Listen State Incoming bits are copied to output
with 1-bit delay - Transmit State Write data to the ring
- Bypass State Idle station does not incur
bit-delay
4Ring LANs
- If a frame has traveled once around the ring it
is removed by the sender - Ring LANs have a simple acknowledgment scheme
- Each frame has one bit for acknowledgment.
- If the destination receives the frame it sets the
bit to 1. - Since the sender will see the returning frame, it
can tell if the frame was received correctly.
5What is the "Length" of a Ring?
- The length of a ring LAN, measured in bits, gives
the total number of bits which are can be in
transmission on the ring at a time - Note Frame size is not limited to the length of
the ring since entire frame may not appear on the
ring at one time. Why? - Bit length propagation speed length of ring
data rate No. of stations bit delay at
repeater
6Example
- Calculate the length of the following ring LAN
- 3 km ring
- 1 Mbps data rate
- 5 us/km propagation speed
- 20 stations _at_ 1 bit delay
- Bit length 15 20 35 bits
7Ring LAN
- Advantages
- Can achieve 100 utilization
- No collisions
- Can achieve deterministic delay bounds
- Can be made efficient at high speeds
- Disadvantages
- Long delays due to bit-delays
- Solution Bypass state eliminates bit-delay at
idle station - Reliability Problems
- Solution 1 Use a wire center
- Solution 2 Use a second ring (opposite flow)
8Ring LANS Wire Center (802.5)
9Ring LANS Use a second ring
10Token Ring LANS
- Token is a small packet that rotates around the
ring - When all stations are idle, the token is free and
circulates around the ring - Possible Problem All stations are idle and in
the Bypass state. What is the problem?
11802.5(Token Ring) MAC Protocol
- In order to transmit a station must catch a free
token - The station changes the token from free to busy
- The station transmits its frame immediately
following the busy token - IF station has completed transmission of the
frame AND the busy token has returned to the
station THEN station inserts a new free token
into the ring
12Token Ring LANs
- Note
- If the bit length of the ring is less than the
packet length, then the completion of a packet
transmission implies return of busy token - Only one station can transmit at a time. If a
station releases a free token, the next station
downstream can capture the token
13Transmission in a Token Ring
Sender looks for free token
14Transmission in a Token Ring
Sender changes free token to busy token and
appends data to the token
15Transmission in a Token Ring
- Receiver recognizes that it is the destination of
the frame - Receiver copies frame to station
- Note Frame also returns to sender
16Transmission in a Token Ring
- Receiver recognizes that it is the destination of
the frame - Receiver copies frame to station
- Note Frame also returns to sender
17Transmission in a Token Ring
Sender generates free token when it is done
transmitting (Note The busy token has returned)
18Properties of the 802.5 Token Ring
- No collisions of frames
- Full utilization of bandwidth is feasible
- Transmission can be regulated by controlling
access to token - Recovery protocols is needed if token is not
handled properly, e.g., token is corrupted,
station does not change to "free" etc
19Token Format / Data Frame Format
20IEEE 802.5 Frame Format
- One 3-byte token circulates if all stations are
idle. - AC "PPPTRRR" where
- "PPP" Priority fields
- "RRR" Reservation fields
- "T" Indicates "Token" or "Data frame"
- SD, ED Start/End delimiter of a frame
- FC Identifies type of a control frame
- FS Contains address recognized bit (A bit) and
frame copied bit (C bit) - Receiver sets A1 when frame arrives
- Receiver sets C1 when frame has been copied
21Priority of Transmission in 802.5
- Eight levels of priorities
- Priorities handled by 3-bit priority field and
3-bit reservation field - Define
- Pm priority of the message to be transmitted
- Pr token priority of received token
- Rr reservation priority of received token
22IEEE 802.5 (Token Ring)
- 1. A station wishing to transmit a frame with
priority Pm must wait for a free token with Pr lt
Pm - 2. The station can reserve a future priority Pm
token as follows - If busy token comes by, then set Rr Pm (if Rr lt
Pm) - If free token comes by, then set Rr Pm (if Rr lt
Pm Pm lt Pr)
23IEEE 802.5 ( Token Ring)
- 3. If a station gets a free token, it sets the
reservation field to 0 and leaves the priority
field unchanged and transmits - 4. After transmission send a free token with
Priority max(Pr, Rr, Pm), Reservation max(Rr,
Pm) - 5. Station which upgraded the priority level of a
token must also downgrade the priority (if no one
used the token)
24Ring Maintenance
- Token ring selects one station as the monitor
station - Duties of the monitor
- Check that there is a token
- Recover ring if it is broken
- Detect garbled frames
- Make sure the token (24-bit) is shorter than the
ring length
25Terms in IEEE 802.5
- IEEE 802.5 requires to maintain a large number of
counters - THT Token Holding Timer (one per station)
- Limits the time that a station can transmit
(Default 10 ms) - TRR Time-to-Repeat Timer (one per station)
- Limits the time that a station waits for return
of own message (Default 2.5 ms) - TVX Valid Transmission Timer (in monitor
station) - Verifies that station which accessed the token
actually used it (Default THT TRR 12.5 ms) - TNT No-Token Timer (one per station)
- If expire, a new token is generated (Default N
(THT TRR))
26Performance of Token Rings
- Parameters and Assumption
- End-to-end propagation delay a
- Packet transmission time 1
- Number of stations N
- Assume that each station always has a packet
waiting for transmission - Note The ring is used either for data
transmission or for passing the token
27Performance of Token Rings
- Define
- T1 Average time to transmit a frame. Per
assumption, T1 1 - T2 Average time to pass the token
- Maximum Throughput
- Frame Time T1
- ------------------------------ ----------
- Time Frame Overhead T1 T2
28Effect of propagation delay
- Effect of propagation delay on throughput
- Case 1 a lt 1 (Packet longer than ring)
- T2 time to pass token to the next station a/N
- Case 2 a gt 1 (Packet shorter than ring)
- Note Sender finishes transmission after T1 1,
but cannot release the token until the token
returns - T1T2 max(1, a) a/N
29Performance of Token Rings
- Illustration of Analysis (agt1)
30Performance of Token Rings
- Illustration of Analysis (alt1)
31Ethernet vs. Token Ring
- Maximum throughput as a function of "a"
32Ethernet vs. Token Ring
- Maximum throughput as a function of N
33FDDI
- Some Facts
- FDDI Fiber Distributed Data Interface
- FDDI is a high-speed token ring
- Fiber-optic (dual redundant counter rotating)
ring LAN - Multimode fiber
- Standardized by ANSI and ISO X3T9.5 committee
- 100 Mbps data rate
- Maximum frame size is 4500 bytes
- Allows up to 1000 connected stations
- Maximum ring circumference 200 km
34FDDI
- FDDI distinguishes 4 Service Classes
- Asynchronous
- Synchronous
- Immediate (for monitor and control)
- Isochronous (only in FDDI-II)
35FDDI - Protocol Architecture
36Dual Redundant Counter Rotating Ring
- Second ring adds a certain level of fault
tolerance
37Station Types - Class A Station
- Two PHY (and one or two MAC) entities
- Connects to another Class A station or to a
concentrator
38Station Types - Class B Station
- Class B station has one PHY (and one MAC) entity
- Connects to a concentrator
39Station Types - Concentrator
- Connects Class A and Class B stations into one of
the counter rotating rings. - Concentrator can bypass failing stations.
40Topology Example
41FDDI Media Access Control
- FDDI uses a Token Ring Protocol, similar to 802.5
- Differences of FDDI and 802.5
- To release a token, a station does not need to
wait until the token comes back after a
transmission. The token is released right after
the end of transmission - In FDDI, multiple frames can be attached to the
token - FDDI has a different priority scheme
42FDDI Token Ring Protocol
- 1. A awaits token
- 2. A seizes token, begins transmitting frame F1
addressed to C
43FDDI Token Ring Protocol
- 3. A appends token to end of transmission
- 4. C copies frames F1 as it goes by
44FDDI Token Ring Protocol
- 5. C continues to copy F1 B seizes token and
transmits frame F2 addressed to D - 6. B emits token D copies F2 A absorbs F1
45FDDI Token Ring Protocol
- 7. A lets F2 and token pass B absorbs F2
- 8. B lets token pass
46Frame and Token Format
- SD Starting Delimiter
- FC Frame Control (type of frame)
- DA Destination Address
- SA Source Address
- FCS Frame Check Sequence (CRC)
- ED End Delimiter
- FS Frame Status
- Total Frame length lt 4500bytes
47Timed Token Protocol
- FDDI has a timed token protocol which determines
how long a station can transmit - Each station has timers to measure the time
elapsed since a token was last received - TTRT Target Token Rotation Time
- Value of TTRT is negotiated during initialization
(default is 8 ms) - Set to the maximum desired rotation time
48Parameters of Timed Token Protocol
- Station Parameters
- TRT Token Rotation Time
- Time of the last rotation of the token.
- If TRT lt TTRT, then token is early,
asynchronous traffic can be transmitted - If TRT gt TTRT then token is late, asynchronous
traffic cannot be transmitted. - THT Token Holding Time
- Controls the time that a station may transmit
asynchronous traffic. - fi Percentage of the TTRT that is allocated for
synchronous traffic at station i.
49Timed Token Protocol
- If a station receives the token it sets
- THT TRT
- TRT TTRT
- Enable TRT (i.e., start the timer)
- If the station has synchronous frames are waiting
the transmit synchronous traffic for up to time
TTRTfi (with sum(fi) lt1) - If the station has asynchronous traffic
- enable THT
- while THT gt 0 transmit asynchronous traffic.
50Timed Token Protocol
- Note
- Transmission is not interrupted if THT expires
during a transmission. - If a station does not utilize its maximum
transmission time (i.e., THT), the next station
can use it.
51FDDI Synchronous Traffic
Assume not all transmit buffers are full. TTRT
5 msec, Sync 4 msec, Asy 1 ms
Station 1 Station 2 Station 3 Station 4
Frames
Frames
Frames
Frames
1.0ms
1.0ms
1.0ms
1.0ms 1.0msec
No Tx Nothing to Tx
Frames
Frames
Frames
1.0ms
1.0ms 1.0ms
1.0ms 1.0ms
No Tx Nothing to Tx
No Tx Nothing to Tx
Frames
Frames
1.0ms 1.0ms
1.0ms 1.0ms
52FDDI Asynchronous Traffic
Assume 4 stations, all have full buffers to
send. TTRT 3ms
Station 1 Station 2 Station 3 Station 4
Frames
No Tx TRT expired
No Tx TRT expired
No Tx TRT expired
3ms
gt 3ms
No Tx TRT expired
No Tx TRT expired
No Tx TRT expired
Frames
No Tx TRT expired
No Tx TRT expired
No Tx TRT expired
Frames
53FDDI Asynchronous Traffic
Assume not all transmit buffers are full.
Station 1 Station 2 Station 3 Station 4
Frames
No Tx Nothing to Tx
Frames
Frames
0.8ms
0.5ms
1.0ms
lt 3ms
No Tx TRT expired
Frames
Frames
Frames
1.0ms
0.7ms
0.5ms
No Tx Nothing to Tx
No Tx Nothing to Tx
Frames
Frames
1.5ms
0.5ms
54Analysis of FDDI
- Analysis of
- Synchronous traffic
- Asynchronous traffic
- Synchronous Traffic
- Recall that each station can transmit synchronous
traffic for up to time TTRTfi (with sum(fi)lt1) - If sum(fi)1, the maximum throughput of
synchronous traffic is 100. - One can show that the maximum delay until a frame
is completely transmitted is - Maximum Access Delay lt 2TTRT
55Analysis of FDDI
- Asynchronous Traffic
- Parameters
- D Ring latency
- n Number of active sessions (all heavily loaded)
- T Value of TTRT
- Assumption
- No synchronous traffic
56Analysis of FDDI
- From the Example we see
- Cycle in a system has a length of nT D
- Time in a cycle used for transmission n(T - D)
- We obtain for the maximum throughput for
asynchronous traffic is
- ... and the maximum access delay for asynchronous
traffic - Max. Access DelayT(n-1)2D
57Analysis of FDDI
- Numerical Example
- Number of stations 16
- Length of fiber 200 km
- Speed of Signal 5 ms/km
- Delay per station 1 ms/station
- TTRT 5 msec
- Ring Latency D (20 km) x (5 msec/km) (16
stations) x 1 msec/station 0.12 ms.
58Analysis of FDDI
59Numerical Results
- We show plots for 3 different FDDI networks.
- "Typical" FDDI
- 20 stations (single MAC)
- 4 km ring
- "Big" FDDI
- 100 stations (single MAC)
- 200 km ring
- "Largest" FDDI
- 500 stations (dual MAC)
- 200 km ring
60Throughput vs. TTRT
61Maximum Access Delay vs. TTRT
62Other LANs
63IEEE 802.4 (Token Bus)
- Problems with 802.3
- Collisions of frames can lead to unpredictable
delays - In some real-time scenarios, collisions and
unpredictable delays can be catastrophic - Solution via Token Bus
- A control packet (Token) regulates access to the
bus - A station must have the token in order to
transmit - A station can hold the token only for a limited
time - The token is passed among the stations in a
cyclic order - This structures the bus as a logical ring
64IEEE 802.4 (Token Bus)
- Stations form a logical ring
- Each station knows its successor and predecessor
in the ring
65Feature of Token Bus
- Bandwidth is 1, 5, or 10 Mbps
- The token bus MAC protocol is very complex
- Typically, token bus is free of collisions
- Defines priority transmissions and can offer
bounded transmission delays
66IEEE 802.4 (Token Bus)
- 802.4 requires each station to implement the
following management functions - Ring Initialization
- Addition to ring
- Deletion from ring
- Fault management
67Adding a Station to the Token Bus
- Each node periodically sends a solicit successor
packet which invites nodes with an address
between itself and the next node to join the ring - Sending node waits for response for one round
trip - One of the following three cases apply
- (1) No Response
- Pass token
- (2) Response from one node
- Reset successor node
- Pass token to new successor node
- (3) Response from more than one node
- Collision has occurred
- Node tries to resolve contention
68Add a station to the Token Bus
- Assume Response from more than one node has
resulted in a collision. - Station sends a resolve contention packet and
waits for four windows - (window 1 round trip time) for a response
- In window 1, stations with address prefix 00 can
reply - In window 2, stations with address prefix 01 can
reply - In window 3, stations with address prefix 10 can
reply - In window 4, stations with address prefix 11 can
reply - If there is a another collision, procedure is
repeated for the second pair of bits. Only the
nodes which replied earlier can join the next
round - First successful reply joins the ring
69IEEE 802.4 (Token Bus)
- Four priority levels
- Levels 6, 4, 2, 0
- Priority 6 is the highest level
- Token Holding Time (THT)
- Maximum time a node can hold a token
- Token Rotation Time for class i (TRTi)
- Maximum time of a full token circulation at which
priority i transmissions are still permitted
70Token Bus Transmission Rules
- Each station can transmit class 6 data for a time
THT - For i 4, 2, 0
- Transmit class i traffic if all traffic from
class i2 or higher is transmitted - and the time of the last token circulation
(including the transmission time of higher
priority packets during the current holding of
the token) is less than TRT i .
71Token Bus Priority Scheme