Académique Documents
Professionnel Documents
Culture Documents
All r ights r eser ved. No par t of this publication and file may be r epr oduced, stor ed in a r etr ieval system,
or tr ansmitted in any for m or by any means, electr onic, mechanical, photocopying, r ecor ding or other wise,
without pr ior wr itten per mission of Pr ofessor Nen-Fu Huang (E-mail: nfhuang@cs.nthu.edu.tw).
Token-bus - 1
Page 1
60
20
60
50
40
30
10
us
30
20
30
50
60
20
Token-bus - 3
Pr eamble SD
l
l
l
l
l
l
l
l
2,6 2,6
>= 0
FC
DA SA
LLC
FCS ED
Page 2
Pr eamble SD 00000000
DA SA
= (0,2,4,6)
FCS ED
(a) - (Claim Token, CT). The fr ame has a data-unit whose value is ar bitr ar y
and whose length in octets (between addr esses and FCS exclusive) is 0,2,4, or 6
times the systems' s slot-time also measur ed in octets.
Pr eamble SD
00000001
DA
SA
FCS
ED
(b) --1 (Solicit-Successor -1, SS1). The fr ame has a DA= the contents of
the station' s NS r egister and a full data unit. One r esponse window always follows
this fr ame.
v Response Window: One slot time (Round-Tr ip pr opagation delay). The Token
holder exptects r esponse or acknowledgement fr om other stations in a given
number of Response Windows.
v Possible events in the r esponse window
l No r esponse
l One Response
l Multiple Response -- A gar bled Response (Contention)
Token-bus - 5
Pr eamble
SD 00000010
DA
SA
FCS
ED
(c) --2 (Solicit-Successor -2, SS2). The fr ame has a DA= the contents of
the station' s NS or TS r egister and a full data unit. Two r esponse windows always
follows this fr ame.
Pr eamble
SD
00000011
DA SA
FCS
ED
(d) - (Who-follows, W). The fr ame has a data-unit = the value of the
station's NS r egister . The for mat and the length of the data-unit is the same as
a sour ce adr ess. Thr ee r esponse windows always follows this fr ame.(This gives
r eceiver s two extr a slot-time to make a compar ison with an addr ess other than TS.)
Pr eamble SD
00000100
DA
SA
FCS
ED
(e) - (Resolve-contention, R). The fr ame has a null data-unit. Four r esponse
windows always follows this fr ame.
Token-bus - 6
Page 3
Pr eamble SD 00001000
DA
SA
FCS
ED
(f) (Token, T). The fr ame has DA = the contents of the station's NS r egister , and
has a null data-unit.
Pr eamble SD
00001100
DA SA
FCS
ED
(g) - (Set-Successor , S). The fr ame has DA = the SA of the last fr ame
r eceived, and data-unit = the value of the station' s NS or TS r egister . The
for mat and the length of the data-unit is the same as a sour ce addr ess.
Pr eamble
SD
01MMMPPP
DA
SA
LLC
FCS
ED
(h) LLC . LLC data fr ames have a DA and data-unit specified by a station's
LLC sublayer . A fr ame of this type with a nonnll data unit shall be passed to the
r eceiving staions' s LLC sublayer .
Token-bus - 7
v In numer ically descending or der (60 -> 50 -> 30 -> 20 -> 60)
v Each station in the r ing has knowledge of
l TS: This Stations' s addr ess ()
l NS: Next Station' s addr ess ()
l PS: Pr evious Stations's addr ess ()
v A station as a token holding timer to limit the time it can hold
Page 4
l
l
20
50
60
60
50
30
DA SA
30 50 T
10
30
20
30
60
50
20
Token-bus - 9
Addition of a Station
v Token holder has the r esponsibility of per iodically (an inter -solicit-
count timer ) gr anting an oppor tunity for new stations to enter the
logical r ing befor e it passes the token.
v A Solicit-Successor -1 (SS1) contr ol fr ame is issued with
l DA = NS
l SA = TS
l Data = Null
v One r esponse window is r eser ved for those stations desr ied to enter
the logical r ing and their addr ess is between DA and SA. (If the
addr ess of the token-holder has the smallest addr ess in the logical
r ing, then a Solicit-Successor -2 fr ame is issued)
v The station desir ed to enter the logical r ing will r espond with a SetSuccessor fr ame with
l DA = Token-holder addr ess
l SA = TS (Its addr ess)
l Data = TS
Token-bus - 10
Page 5
station will update its NS value by r ecall the DA field of the pr eviously
r eceived Solicit-Successor -1 fr ame.
l Multiple Responses:
u
60
60
50
20
40
30
DA SA
1
30 50 SS1
30
20
20
50
60
30
DA SA DATA
50 40 40 S
50
60
20
60
50
40
30
50
30
20
30
40
60
40
20
Token-bus - 12
Page 6
60
40
60
50
20
20
DA SA
1
DA SA
20 50 SS1
XX 50 R
DA SA DATA
50 30 30 S
30
20
DA SA DATA
50 40 40 S
60
50
60
60
50
20
40
40
50
30
20
20
60
40
Token-bus - 13
11
10
01
00
11
10
01
00
A B
C
2
11
10
01
B C
3
11
10
Give up
00
A
01
Give up
10 00 11 10
10 10 01 11
10 10 01 01
01 10 01 11
00 10 11 00
00
B C
4
11
B
10
01
C
00
Give up
Page 7
Token-bus - 14
with the smallest addr ess in the logical r ing). In this case SolicitSuccessor -2 (SS2) fr ame is issued followed by two Response
Windows.
v The fir st r esponse window is r eser ved for stations (X) whose
60
50
20
DA SA DATA
20 10 10 S
30
DA SA
1
60 20 SS2
10
30
20
30
60
60
50
20
50
50
60
10
50
60
30
Newly added
Station
10
20
30
20
60
30
10
50
20
Token-bus - 16
Page 8
Deletion of a Station
v The station wishes to be deleted may wait until it r eceives the
will modify its NS and send a token to its new next station.
v The next station once r eceives the Set-Successor fr ame will
Deletion Example
50
60
60
50
10
30
DA SA
1
30 50 T
10
30
20
60
20
30
50
10
60
50
20
50
10
60
DA SA DATA
50 30 20 S
20
DA SA
3
20 50 T
Deleted Station
10
20
30
20
60
50
10
Token-bus - 18
Page 9
Fault Management
Token-bus - 19
Multiple Tokens
v Cause:
l Noise
l Duplicate Addr ess, each one may " r eceive" a token
v Detection:
l While holding the token, the station may hear a fr ame on
v Action:
l Dr op the token
l If all stations dr op the token, the networ k becomes the
Page 10
v Cause
l The token passed to the next station may be gar bled
l The next station fails
v Detection:
l No r esponse (Channel is idle) in one r esponse window
v Action:
l Tr y to pass token one mor e time
l It still no r esponse, then the next station is assumed to have failed
l The token holder then issues a Who-Follows fr ame with
u DA = XX, SA = TS, Data = NS
l All other stations once r eceived Who-Follows fr ame will compar e the
data with its PS value. If ther e is a match, it will issue a Set-Successor
fr ame back. Thr ee r esponse windows ar e r eser ved after Who-Follows.
The fir st two ar e needed to make a compar ison.
l If no r esponse to the Who-Follows fr ame, the above pr ocedur e will be
tr ied one mor e time.
Token-bus - 21
l
l
l
l
l
l
Token-bus - 22
Page 11
60
60
50
10
30
DA SA
50 60 T
DA SA DATA
XX 60 50 W
10
DA SA DATA
60 30 30 S
30
20
60
20
30
20
50
10
50
60
30
10
DA SA
5
30 60 T
10
20
30
20
60
30
20
60
10
Token-bus - 23
60
60
50
10
1
2
DA SA
50 60 T
3
4
DA SA DATA
6
60 10 10 S
XX 60 50 W
60 60 SS2
DA SA DATA
60 20 20 S
30
20
30
60
10
50
60
10
DA SA
DA SA DATA
10
20
30
20
20
50
DA SA
20 60 T
20
30
20
10
60
60
10
Token-bus - 24
Page 12
No Token or Initialization
v Cause:
l The Token-holder station fails
l The token is destr oyed
l Networ k Initialization
v Detection:
l No channel activity has been hear d for a cer tain amount of time (BusIdle Timer expir ed)
v Action:
l Any station when its Bus-Idle timer is expir ed will issue a Claim-Token
fr ame, with
u DA = XX, SA = TS, Data = Any value with (0,2,4,6) slot times
depending on its addr ess
l The station with the gr eatest addr ess will get the token. This is done by
compar ing the addr ess. Two bits of the addr ess ar e compar ed at a time.
In each pass, only those stations who tr ansmitted the longest fr ame on
the pr evious pass tr y again.
Token-bus - 25
No Token or Initialization
l The station that succeeds on the last pass consider s itself the token holder .
l The differ ence is 2 slots in the fr ame padding. The station waits one slot for its
or other fr ame to pass. It then samples the channel at the second slot.
l The logical r ing can then be established by issuing Solicit-Successor fr ames as
SD
00000000
DA
SA
FCS ED
0
01: Pr eamble
SD 00000000
DA SA
FCS ED
2
10: Pr eamble
SD 00000000
DA SA
FCS ED
4
11: Pr eamble
SD 00000000
DA SA
FCS ED
6
Token-bus - 26
Page 13
l4
l2
l 0 : The lowest pr ior ity
v Hi-Pr i-Token-Hold-Time
l an upper bound set in each station that deter mines the
maximum time the highest pr ior ity fr ame can hold the token
l to avoid one station dominating the networ k
v Each lower access class in the station has a Tar get token
...
l Class 1: TRT(1)
l TRTC: Token-Rotation-Time-Counter
l TT: Tempor ar y Timer
N-1
TRTC
TT
Token-bus - 28
Page 14
Gener al
Pr ior ity
Algor ithm
TT 0
TT < HPTHT Y
Queue(N) <>
N
i = N-1
N
i=i-1
i=0
Y
TRTC TT
Token-bus - 29
TRT = 1600
TRT = 1600
50
20
60
10
1
2
3
4
5
6
7
8
9
l
l
l
l
l
l
l
l
50
TRTC
76
2270
1782
1070
1870
1782
1070
1565
1877
3
3
3
3
3
3
3
3
3
60
20
TRTC
460
2270
1782
1070
1870
1782
1070
1565
1877
3
0
0
2
0
0
2
1
0
50
10
10
TRTC
1660
1070
1782
1870
1070
1782
1870
1165
1477
0
2
0
0
2
0
0
2
1
20
60
TRTC
1660
1782
1070
1870
1782
1070
1870
1877
1121
2
2
2
2
2
2
2
1
1
N=2
Station 60: Fr ame-size = 128 Bytes, Tr ansmit thr ee Class-2 fr ames at a time
Station 50: TRT(1) = 1600, Fr ame-size = 400 Bytes, Tr ansmit as many Class-1 fr ames as possible
Station 20: TRT(1) = 1600, Fr ame-size = 356 Bytes, Tr ansmit as many Class-1 fr ames as possible
Station 10: Fr ame-size = 305 Bytes, Tr ansmit two Class-2 fr ames at a time
Token passing time = 19 bytes
Initially all stations ar e idle
TRTC Calculation:
l Station 50: (Token Rotation no. 6), 1782 = 2(356)+2(305)+3(128)+4(19) > 1600
l Station 20: (Token Rotation no. 9), 1477 = 2(356)+1(305)+3(128)+4(19) < 1600
Token-bus - 30
Page 15
Token-bus
Pr ior ity
Algor ithm
Token-bus - 31
SD +
V1 V0
V1 V0
V1 V0
V1 V0
1s
0s
+
-
0: (TT) T: Tr ansition
1: (T)
: No Tr ans.
NN: ( )(T )
ED
+
-
SD: NN0NN000
ED: NN1NN1IE
I: 1 if mor e fr ame
E: 1 if er r or
Token-bus - 32
Page 16