Anda di halaman 1dari 45

Ring Networks

All rights reserved. No part of this publication and file


may be reproduced, stored in a retrieval system, or
transmitted in any form or by any means, electronic,
mechanical, photocopying, recording or otherwise,
without prior written permission of Professor Nen-Fu
Huang (E-mail: nfhuang@cs.nthu.edu.tw).
Ring Networks -1

Ring Network
Active Repeater
Point-to-Point

Connections
Unidirectional
Transmission

Ring Networks -2

Ring Network
Functions of the Repeater
Frame Insertion: Medium Access
Control Dependent
Frame Reception: Address Recognition
Frame Removal: Close Loop without
Terminators

By Source: Automatic Acknowledgement


Multicast and Broadcast Addressing
By Destination: Increase Channel Utilization (for
High-Speed Network)

Ring Networks -3

Ring Network
Configuration

Token

Ring Networks -4

Repeater States
Listen State: Retransmission with

a small delay to allow the repeater


to perform necessary functions
Scan passing bit stream and
pattern identification
Copy incoming bit to the station
while retransmit each bit
Modify a bit as it passes by

Ring Networks -5

Repeater States
Transmit State: Transmit the

frame and receive bit from the


incoming link
Receive its own bit: if the bit
length of the ring is shorter than
the frame
Buffer others bits for
retransmission later
Ring Networks -6

Repeater States
Bypass State: If station falls or its

powered off
Provide a better network reliability
Eliminate unnecessary repeater
delay

Ring Networks -7

Bit Length
Total number of bits can reside in the ring

simultaneously
Example

100 repeaters (repeater delay = 1 bit)


Distance between two repeaters: 10 meters
Data rate: 10 Mbps
Propagation Velocity: 2x108 m/s
Bit Length Between two stations
((10 m)/(2x108 m/s)) x (107 bit/s) = 0.5 bit
Total Bit Length
100 + 100 x 0.5 = 150 bits

Ring Networks -8

Medium Access Control


Method
-- Token Ring
Free-token - A special bit pattern

(e.g., 11111111)
Busy-token -- The last bit of the
free token is changed (e.g.,
11111110)
Any station gets the free-token
may change it to a busy-token and
followed by the frame to be
transmitted.
Ring Networks -9

Medium Access Control


Method
-- Token Ring

Bit stuffing may be used to avoid data

confusing with the token.


The source station will remove the frame
from the ring
A new free-token will be regenerated if
the station has completed transmission of
its frame.
If the frame is short, multiple tokens are
possible. However, single token simplifies
priority and error recovery functions
Ring Networks -10

Medium Access Control


Method
-- Token Ring
Only one frame can reside on the ring

at a time. In single token, a free-token


is generated if the busy-token has
returned to the station.
Frame acknowledgement can be
easily implemented.
Fairness (Round-Robin Fashion)
Requirement of token maintenance

Ring Networks -11

Medium Access Control


Method
-- Token Ring
B

(a)

(b)

(c)

Ring Networks -12

Frame Format
15

(Header)
Ring No.

1
SD

(Trailer)

Node Addr.

2
PCF

6
DA

4
6

FCS

ED PCF

SA

PPPTMRRR

VV0VV
PPP = Priority bits
000
T = Token bit
M = Monitor bit
RRR = Priority
Reservation bits
FF = Format bits
rr = Reserved bits
ZZZZ = Control bits

FFrrZZZZ

1
VV0VV000

VV1VV10E
AC00AC00

E = Error Detected Indicator


A = Address Recognized Indi
C = Frame Copied Indicator
1

PPPTMRRR

1
Token
VV1VV100

Ring Networks -13

Token-Access
Control

Single token protocol: idle characters

(contiguous 0s) are transmitted if the


frame is too short
The source station will remove the
frame and regenerate the free token
ARI is set by the station who finds the
DA is same as its address
FCI is set by the station who copies
the frame
Ring Networks -14

Token-Access
Control
ARI is set while FCI is not set may

indicate that the destination station is


active but not able to copy the frame
(too busy, out of buffer,...)
Uniform access: single transmission
rather than exhaustive transmission
The FCS covers from the second PCF
bytes to itself.

Ring Networks -15

Token Monitor
Functions
Token Monitor: One of the active

stations in the ring to monitor


the token
Token lost
Circulating busy token (frame)

Ring Networks -16

Token Monitor
Functions
Token Lost
Cause: Interference or noise
Detection: The token monitor has a
timer which is set upon the passage of
either a busy token or a free token. The
timer expiration indicates the loss of
token.
Action: The token monitor will
regenerate the token

Ring Networks -17

Token Monitor
Functions
Circulating busy token
Cause: Transmitting station fails
Detection: The Monitor Count flag is
reset by the transmitting station and
set by the token monitor. If the token
monitor detects an already set flag, it
is a circulating busy token.
Action: The token monitor removes the
frame and issues a free token

Ring Networks -18

Token Monitor
Functions
Multiple tokens
Cause: Noise
Detection: Two or more stations are
in transmit state. The station will
find that the removed frame has a
different source address.
Action: No free token will be issued
by that station. As a result, it is in a
lost-token condition.
Ring Networks -19

Token Monitor
Functions
Minimum Bit Length
If all stations are idle (in listen
state), only the free token is
circulating around the ring.
The token monitor has to
maintain the minimum bit
length (24 bits of the token
length)
Ring Networks -20

IEEE 802.5 Token Ring


Network
Frame Format
Token Format
Token Ring Priority

Operation
Token Ring Priority Scheme
Priority Scheme Examples

Ring Networks -21

IEEE 802.5 Frame


Format/Token
Format
FCS Coverage

SFS

SD

AC

FC

DA

SA

SFS = Start of Frame Sequence


SD = Starting Delimiter (1 octet)
AC = Access Control (1 octet)
FC = Frame Control (1 octet)
DA = Destination Address (2 or 6 octets)
SA = Source Address (2 or 6 octets)

FCS

EFS
ED

FS

INFO = Information (0 or
FCS = Frame Check Seque
EFS = End of Frame Sequ
ED = Ending Delimiter (1
FS = Frame Status (1 octe

J = Non-data-J
K = Non-data-K
I = Intermediate frame bit
E = Error-detected bit
Ring Networks -22

IEEE 802.5 Frame


Format/Token
Format

JK0JK000

SD

PPP

RRR

AC

FF

JK1JK1

ZZZZZZ

E ACrr

ED

FC

PPP = Priority bits FF = Format bits


T = Token bit
ZZZZZZ = Control bits
M = Monitor bit
RRR = Reservation bits
8

A = Address-recognized bits
SD
C = Frame-copied bits
r = Reserved bits

JK0JK
000

PPP

AC

FS

ED

ACrr

Token

RRR

JK1JK1

Ring Networks -23

MAC Frame Control


Field

0: 1:

Reservation(RRR)
Priority(PPP)
Token(T)
Monitor(M)

Frame Type(FF)

MAC frame LLC frame

Intermediate Frame(I)
0:
1:
Error Detected(E)

Address Recognized(A)
Frame Copied(C)

Ring Networks -24

Token Ring Priority


Scheme Operation
(a) A waits for a low priority token.
(b) A gets a low priority token and
transmit a frame to C. D makes a
reservation with a higher priority level.
(c) A remove the transmitted frame and
issues a high priority token according to
the reservation field of the received
frame. A also keeps in mind that it
upgrades the token priority from low to
high.
Ring Networks -25

Token Ring Priority


Scheme Operation
(d) D waits for a high priority token.
(e) D gets the high priority token and
transmit a frame to B.
(f) D releases a high priority token after the
transmitted frame is received.
(g) A gets the high priority token and found
that this priority level is upgraded by
itself.
(h) A issues a new token by changing the
priority level from high to low.
Ring Networks -26

Token Ring Priority


Scheme Operation
Reservation for
D
Higher Priority
token

D
Low Priority
Token
A

(a)

(b)

Ring Networks -27

Token Ring Priority


Scheme Operation
D

A
High Priority
Token

(c)

(d)

Ring Networks -28

Token Ring Priority


Scheme Operation
D

HIgh Priority
Token

(e)

(f)

Ring Networks -29

Token Ring Priority


Scheme Operation
D

Low Priority
Token
B

(g)

(h)

Ring Networks -30

Token Ring Priority


Scheme
Pm : Priority of message to be

transmitted by station
Pr: Received priority
Rr: Received reservation
R: Transmitted reservation
Sr: Stack to store the old
priority level

Ring Networks -31

Token Ring Priority


Scheme
Sx: Stack to store the new

priority level

Rr
Pr
Token or Frame

Sx

Sr
A

Token or Frame

Pm

Ring Networks -32

Token Ring Priority


Scheme
A station wishing to transmit must wait for

a token with Pr <= Pm.


While waiting, a station may reserve a
future token at its priority level (Pm).

If a data frame goes by, it sets the reservation


field to its priority (R <- Pm) if the reservation
field is less than its priority (Rr < Pm).
If a token goes by, it sets the reservation field to
its priority (R <- Pm) if the Rr < Pm and Pm < Pr.
This has the effect of preempting any lowerpriority reservation.

Ring Networks -33

Token Ring Priority


Scheme
When a station seizes a token, it

sets the token bit to 1, the


reservation field to 0, and leaves
the priority field unchanged.
Following transmission, a station
issues a new token with the
priority set to the maximum of Pr,
Rr, and Pm, and a reservation set
to the maximum of Rr and Pm.
Ring Networks -34

Token Ring Priority


Scheme -- Issue Token
and Alter Token

Pr = Sx
Rr <= Pr &
Pm <= Pr

(Rr > Pr) or (Pm > Pr)


& Sx < Pr

Rr > Pr &
Sx = Pr

POP Sx
Rr <= Sr

Rr > Sr
P <- Pr
P <- Max(Rr,Pm)

P <- Max(Rr,Pm)
R <- 0
Sr <- Pr
Sx <- P

Issue Token Flow Chart

P <- Max(Rr,Pm)
R <- 0
PoP Sx
Sx <- P

P <- Sr
R <- Rr
POP Sr

P <- Rr
R <- 0
Sx <- P

Alter Token Flow Chart

Ring Networks -35

Token Ring Priority


Scheme -Ready to Transmit

Pm

Rr <
Pm

Pm >= Pr

Pm < Pr
Pr = Sx

POP Sx
Rr > Sr

P <- Rr
R <- 0
Sx <- P

Rr < Pm < Pr

R <- Pm

R <- Pm

Rr <= Sr

P <- Sr
R <- Rr
POP Sr

Ring Networks -36

Token Ring Priority


Scheme Example
(a) Station A has a frame with a priority of 4.
Stations B and D have frames of priorities 5
and 6, respectively.
(1) A transmitted the frame (P=4, R=0)
(2) B makes a reservation (P=4, R=5)
(3) D found that its priority is higher than
R (6>5)
(4) D also makes a reservation (P=4, R=6) to
overwrite the old reservation.

Ring Networks -37

Token Ring Priority


Scheme Example
(b) Station A received the frame.
(1) A issues a free token with a priority of
6 (P=6, R=0) and keeps in mind that it
upgrades the priority from 4 to 6 by
pushing Sr = 4, Sx = 6.
(2) B makes a second reservation (P=4,
R=5) on this token
(3) D gets this token (Pm = P = 6)
(4) D transmits a frame with a priority of 6
and a reservation of 5.
Ring Networks -38

Token Ring Priority


Scheme Example
(c) Station C has a frame with a priority of
7.
(1) The frame transmitted by D passing B (P=6,
R=5)
(2) B bypasses the frame. C found that this is a
data frame and it has a higher priority (Pm > R).
(3) C makes a reservation (P=6, R=7) to
overwrite the old reservation. D begins to
remove the transmitted

Ring Networks -39

Token Ring Priority


Scheme Example
(d) Station D received the frame.
(1) D issues a free token with a priority of 7
(P=7, R=0), and keeps in mind that it
upgrades the priority from 6 to 7 by pushing
Sr = 6, Sx = 7.
(2) A bypasses this frame
(3) B makes a reservation again (P=7, R=5)
on this token.
(4) C gets this token and transmits a frame
with (P=7, R=5).
Ring Networks -40

Token Ring Priority


Scheme Example
(e) C transmitted the frame.
(1) The frame transmitted by C passing A (P=7,
R=5)
(2) B bypasses the frame. C begins to remove this
frame.
(3) C issues a free token with (P=7, R=5).
(4) D found that the priority level in the incoming
token (7) is upgraded by itself and downgrades the
priority level from 7 to 6 by popping the Sx and Sr.

Ring Networks -41

Token Ring Priority


Scheme Example
(f) Station A received the downgraded
token.
(1) A found that the priority level in the
incoming token (6) is upgraded by itself and
tries to downgrade the priority level from 6 to
4. Nevertheless, it also found that the reserved
priority level in the token is 5. As a result, the
priority level is upgraded to 5 (Sx = 5, Sr=4).
(2) A issues a token with (P=5, R=0). B finally
found a token for itself.
(3)B uses this token to transmit a frame to C.
Ring Networks -42

Token Ring Priority


Scheme Example
B

5
Sx = 6
Sr = 4 1 0 6

5 4 2

1 04
A

C
6 4
4

5 4 3
6
D

(a)

5 6

C
5 6

5 6 3

4
D

(b)

Ring Networks -43

Token Ring Priority


Scheme Example

5 6

5 6

7
7 6

Sx = 6
Sr = 4
D

Sx = 62
Sr = 4

(c)

5 7

0 7

C
1 0 7

5 7

Sx = 7
Sr = 6(d)
Ring Networks -44

Token Ring Priority


Scheme Example
B

B
5
1 5 7

2
5 7 2

0 5
C

Sx = 64 5 6
Sr = 4

5 7

(e)

3
0 5

Sx = 6 -> 55 6
Sr = 4
1
D

(f)

Ring Networks -45

Anda mungkin juga menyukai