1Ring Networks - Ring Networks All rights reserved. No part of this publication and file may be...

45
1 Ring Networks - 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, electr onic, mechanical, photocopying, recording or otherwi se, without prior written permission of Professor Ne n-Fu Huang (E-mail: [email protected]).
  • date post

    19-Dec-2015
  • Category

    Documents

  • view

    216
  • download

    1

Transcript of 1Ring Networks - Ring Networks All rights reserved. No part of this publication and file may be...

Page 1: 1Ring Networks - Ring Networks  All rights reserved. No part of this publication and file may be reproduced, stored in a retrieval system, or transmitted.

1Ring Networks -

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: [email protected]).

Page 2: 1Ring Networks - Ring Networks  All rights reserved. No part of this publication and file may be reproduced, stored in a retrieval system, or transmitted.

2Ring Networks -

Ring Network

Active RepeaterPoint-to-Point Connections

Unidirectional Transmission

Page 3: 1Ring Networks - Ring Networks  All rights reserved. No part of this publication and file may be reproduced, stored in a retrieval system, or transmitted.

3Ring Networks -

Ring Network

Functions of the RepeaterFrame Insertion: Medium Access Control Dependent

Frame Reception: Address RecognitionFrame Removal: Close Loop without Terminators

By Source: Automatic Acknowledgement

Multicast and Broadcast Addressing By Destination: Increase Channel Utilization (for

High-Speed Network)

Page 4: 1Ring Networks - Ring Networks  All rights reserved. No part of this publication and file may be reproduced, stored in a retrieval system, or transmitted.

4Ring Networks -

Ring Network Configuration

訊標 Token

網路卡

工作站

網路卡

工作站

網路卡

工作站網路卡

工作站

網路卡

工作站

Page 5: 1Ring Networks - Ring Networks  All rights reserved. No part of this publication and file may be reproduced, stored in a retrieval system, or transmitted.

5Ring Networks -

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

Page 6: 1Ring Networks - Ring Networks  All rights reserved. No part of this publication and file may be reproduced, stored in a retrieval system, or transmitted.

6Ring Networks -

Repeater States

Transmit State: Transmit the frame and receive bit from the incoming linkReceive its own bit: if the bit length of the ring is shorter than the frame

Buffer others bits for retransmission later

Page 7: 1Ring Networks - Ring Networks  All rights reserved. No part of this publication and file may be reproduced, stored in a retrieval system, or transmitted.

7Ring Networks -

Repeater States

Bypass State: If station falls or its powered offProvide a better network reliabilityEliminate unnecessary repeater delay延遲一個位元時間

工作站 工作站 工作站

Page 8: 1Ring Networks - Ring Networks  All rights reserved. No part of this publication and file may be reproduced, stored in a retrieval system, or transmitted.

8Ring Networks -

Bit LengthTotal number of bits can reside in the ring

simultaneouslyExample

100 repeaters (repeater delay = 1 bit)Distance between two repeaters: 10 metersData rate: 10 MbpsPropagation Velocity: 2x108 m/sBit Length Between two stations

((10 m)/(2x108 m/s)) x (107 bit/s) = 0.5 bitTotal Bit Length

100 + 100 x 0.5 = 150 bits

Page 9: 1Ring Networks - Ring Networks  All rights reserved. No part of this publication and file may be reproduced, stored in a retrieval system, or transmitted.

9Ring Networks -

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.

Page 10: 1Ring Networks - Ring Networks  All rights reserved. No part of this publication and file may be reproduced, stored in a retrieval system, or transmitted.

10Ring Networks -

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

Medium Access Control Method-- Token Ring

Page 11: 1Ring Networks - Ring Networks  All rights reserved. No part of this publication and file may be reproduced, stored in a retrieval system, or transmitted.

11Ring Networks -

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

Medium Access Control Method-- Token Ring

Page 12: 1Ring Networks - Ring Networks  All rights reserved. No part of this publication and file may be reproduced, stored in a retrieval system, or transmitted.

12Ring Networks -

Medium Access Control Method-- Token Ring

A

B

D

C

A

B

D

CA

B

D

C

(a) (b) (c)

Page 13: 1Ring Networks - Ring Networks  All rights reserved. No part of this publication and file may be reproduced, stored in a retrieval system, or transmitted.

13Ring Networks -

Frame Format

FF = Format bitsrr = Reserved bitsZZZZ = Control bits

PPP = Priority bits

T = Token bit

M = Monitor bit

RRR = Priority Reservation bits

E = Error Detected Indicator

A = Address Recognized Indicator

C = Frame Copied Indicator

15 位元組

PCFSD DA SA

VV0VV000

VV1VV10E AC00AC00 PPPTMRRR FFrrZZZZ

FCS ED PCF

訊框標頭 (Header) 資料

Ring No. Node Addr.

訊框尾標 (Trailer)

6 位元組

4 1 1 位元組 1 2 6 6 位元組

VV0VV000 PPPTMRRR VV1VV100

1 1 1 位元組

Token

Page 14: 1Ring Networks - Ring Networks  All rights reserved. No part of this publication and file may be reproduced, stored in a retrieval system, or transmitted.

14Ring Networks -

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

Page 15: 1Ring Networks - Ring Networks  All rights reserved. No part of this publication and file may be reproduced, stored in a retrieval system, or transmitted.

15Ring Networks -

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.

Token-Access Control

Page 16: 1Ring Networks - Ring Networks  All rights reserved. No part of this publication and file may be reproduced, stored in a retrieval system, or transmitted.

16Ring Networks -

Token Monitor Functions

Token Monitor: One of the active stations in the ring to monitor the tokenToken lostCirculating busy token (frame)

Page 17: 1Ring Networks - Ring Networks  All rights reserved. No part of this publication and file may be reproduced, stored in a retrieval system, or transmitted.

17Ring Networks -

Token LostCause: Interference or noiseDetection: 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

Token Monitor Functions

Page 18: 1Ring Networks - Ring Networks  All rights reserved. No part of this publication and file may be reproduced, stored in a retrieval system, or transmitted.

18Ring Networks -

Circulating busy tokenCause: Transmitting station failsDetection: 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

Token Monitor Functions

Page 19: 1Ring Networks - Ring Networks  All rights reserved. No part of this publication and file may be reproduced, stored in a retrieval system, or transmitted.

19Ring Networks -

Token Monitor Functions

Multiple tokensCause: NoiseDetection: 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.

Page 20: 1Ring Networks - Ring Networks  All rights reserved. No part of this publication and file may be reproduced, stored in a retrieval system, or transmitted.

20Ring Networks -

Minimum Bit LengthIf 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)

Token Monitor Functions

Page 21: 1Ring Networks - Ring Networks  All rights reserved. No part of this publication and file may be reproduced, stored in a retrieval system, or transmitted.

21Ring Networks -

IEEE 802.5 Token Ring Network

Frame FormatToken FormatToken Ring Priority Operation

Token Ring Priority Scheme

Priority Scheme Examples

Page 22: 1Ring Networks - Ring Networks  All rights reserved. No part of this publication and file may be reproduced, stored in a retrieval system, or transmitted.

22Ring Networks -

IEEE 802.5 Frame Format/Token Format

ACSD FC DA SA 資料 FCS ED FS

SFS EFSFCS Coverage

SFS = Start of Frame Sequence INFO = Information (0 or more octets)

SD = Starting Delimiter (1 octet) FCS = Frame Check Sequence (4 octets)

AC = Access Control (1 octet) EFS = End of Frame Sequence

FC = Frame Control (1 octet) ED = Ending Delimiter (1 octet)

DA = Destination Address (2 or 6 octets) FS = Frame Status (1 octet)

SA = Source Address (2 or 6 octets)

J = Non-data-J

K = Non-data-K

I = Intermediate frame bit

E = Error-detected bit

Page 23: 1Ring Networks - Ring Networks  All rights reserved. No part of this publication and file may be reproduced, stored in a retrieval system, or transmitted.

23Ring Networks -

IEEE 802.5 Frame Format/Token Format

ED

FF ZZZZZZ JK0JK000

SD FC

ACrr ACrr

FS

FF = Format bitsZZZZZZ = Control bits

JK1JK1 I E PPP T M RRR

AC

PPP = Priority bitsT = Token bitM = Monitor bitRRR = Reservation bits

A = Address-recognized bits

C = Frame-copied bits

r = Reserved bits

SD AC ED

8 8 8 位元

JK0JK000

JK1JK1 I E PPP T M RRR

Token

Page 24: 1Ring Networks - Ring Networks  All rights reserved. No part of this publication and file may be reproduced, stored in a retrieval system, or transmitted.

24Ring Networks -

MAC Frame Control Field

位 元位 元 說 明 說 明

Priority(PPP) 訊標優先權Token(T) 0: 訊標, 1: 訊框Monitor(M) 監督位元,用來避免發生永久存在

網路上之資 料訊框或高優先權訊標

Reservation(RRR) 預約優先權

Frame Type(FF) 辨識 MAC frame 或 LLC frame

Intermediate Frame(I) 0: 此訊框為唯一訊框或最後一筆訊框

1: 還有其他訊框跟隨在後Error Detected(E) 由任何發現訊框錯誤的工作站設定

Address Recognized(A) 由目的地工作站設定,表示工作站仍在網路上Frame Copied(C) 由目的地工作站設定,表示訊框已接收

Priority(PPP) 訊標優先權Token(T) 0: 訊標, 1: 訊框Monitor(M) 監督位元,用來避免發生永久存在

網路上之資 料訊框或高優先權訊標

Reservation(RRR) 預約優先權

Frame Type(FF) 辨識 MAC frame 或 LLC frame

Intermediate Frame(I) 0: 此訊框為唯一訊框或最後一筆訊框

1: 還有其他訊框跟隨在後Error Detected(E) 由任何發現訊框錯誤的工作站設定

Address Recognized(A) 由目的地工作站設定,表示工作站仍在網路上Frame Copied(C) 由目的地工作站設定,表示訊框已接收

擷取控制

訊 框 控 制訊 框 控 制

結 束 區 隔結 束 區 隔

訊 框 狀 況訊 框 狀 況

Page 25: 1Ring Networks - Ring Networks  All rights reserved. No part of this publication and file may be reproduced, stored in a retrieval system, or transmitted.

25Ring Networks -

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.

Page 26: 1Ring Networks - Ring Networks  All rights reserved. No part of this publication and file may be reproduced, stored in a retrieval system, or transmitted.

26Ring Networks -

(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.

Token Ring Priority Scheme Operation

Page 27: 1Ring Networks - Ring Networks  All rights reserved. No part of this publication and file may be reproduced, stored in a retrieval system, or transmitted.

27Ring Networks -

Token Ring Priority Scheme Operation

A

D

B

C A

D

B

C

(a) (b)

Reservation for Higher PrioritytokenLow Priority

Token

Page 28: 1Ring Networks - Ring Networks  All rights reserved. No part of this publication and file may be reproduced, stored in a retrieval system, or transmitted.

28Ring Networks -

Token Ring Priority Scheme Operation

A

D

B

C A

D

B

C

(c) (d)

High PriorityToken

Page 29: 1Ring Networks - Ring Networks  All rights reserved. No part of this publication and file may be reproduced, stored in a retrieval system, or transmitted.

29Ring Networks -

Token Ring Priority Scheme Operation

A

D

B

C A

D

B

C

(e) (f)

HIgh PriorityToken

Page 30: 1Ring Networks - Ring Networks  All rights reserved. No part of this publication and file may be reproduced, stored in a retrieval system, or transmitted.

30Ring Networks -

Token Ring Priority Scheme Operation

A

D

B

C A

D

B

C

(h)(g)

Low PriorityToken

Page 31: 1Ring Networks - Ring Networks  All rights reserved. No part of this publication and file may be reproduced, stored in a retrieval system, or transmitted.

31Ring Networks -

Token Ring Priority Scheme

Pm : Priority of message to be transmitted by station

Pr: Received priorityRr: Received reservationR: Transmitted reservationSr: Stack to store the old priority lev

el

Page 32: 1Ring Networks - Ring Networks  All rights reserved. No part of this publication and file may be reproduced, stored in a retrieval system, or transmitted.

32Ring Networks -

Sx: Stack to store the new priority level

Token Ring Priority Scheme

R P Rr Pr

Sx 堆疊 Sr 堆疊A

Token or Frame Token or Frame

Pm

Page 33: 1Ring Networks - Ring Networks  All rights reserved. No part of this publication and file may be reproduced, stored in a retrieval system, or transmitted.

33Ring Networks -

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 lower-priority reservation.

Page 34: 1Ring Networks - Ring Networks  All rights reserved. No part of this publication and file may be reproduced, stored in a retrieval system, or transmitted.

34Ring Networks -

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.

Token Ring Priority Scheme

Page 35: 1Ring Networks - Ring Networks  All rights reserved. No part of this publication and file may be reproduced, stored in a retrieval system, or transmitted.

35Ring Networks -

Token Ring Priority Scheme -- Issue Token and Alter Token

P <- PrP <- Max(Rr,Pm) R <- 0

P <- Max(Rr,Pm)

Sx <- PSr <- Pr

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

Sx <- PPoP Sx

Rr <= Pr &Pm <= Pr

Rr > Pr &Sx = Pr

(Rr > Pr) or (Pm > Pr) & Sx < Pr

傳送訊框

傳送訊標

POP Sx

R <- 0P <- Rr

Sx <- PR <- RrP <- Sr

POP Sr

Rr > Sr Rr <= Sr

Pr = Sx

聆聽狀態

傳送訊標

Issue Token Flow Chart Alter Token Flow Chart

Page 36: 1Ring Networks - Ring Networks  All rights reserved. No part of this publication and file may be reproduced, stored in a retrieval system, or transmitted.

36Ring Networks -

Token Ring Priority Scheme -- Ready to Transmit

POP Sx

R <- 0P <- Rr

Sx <- PR <- RrP <- Sr

POP Sr

Rr > Sr Rr <= Sr

Pm < PrPr = Sx

欲傳送具優先權 Pm 之訊框

傳 送 訊 標

Pm >= Pr

傳 送 訊 框 R <- Pm

Rr < Pm < Pr

訊標到達

R <- Pm

Rr < Pm

轉 送 訊 框

訊框到達

Page 37: 1Ring Networks - Ring Networks  All rights reserved. No part of this publication and file may be reproduced, stored in a retrieval system, or transmitted.

37Ring Networks -

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.

Page 38: 1Ring Networks - Ring Networks  All rights reserved. No part of this publication and file may be reproduced, stored in a retrieval system, or transmitted.

38Ring Networks -

(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.

Token Ring Priority Scheme Example

Page 39: 1Ring Networks - Ring Networks  All rights reserved. No part of this publication and file may be reproduced, stored in a retrieval system, or transmitted.

39Ring Networks -

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

Page 40: 1Ring Networks - Ring Networks  All rights reserved. No part of this publication and file may be reproduced, stored in a retrieval system, or transmitted.

40Ring Networks -

(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).

Token Ring Priority Scheme Example

Page 41: 1Ring Networks - Ring Networks  All rights reserved. No part of this publication and file may be reproduced, stored in a retrieval system, or transmitted.

41Ring Networks -

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.

Page 42: 1Ring Networks - Ring Networks  All rights reserved. No part of this publication and file may be reproduced, stored in a retrieval system, or transmitted.

42Ring Networks -

(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.

Token Ring Priority Scheme Example

Page 43: 1Ring Networks - Ring Networks  All rights reserved. No part of this publication and file may be reproduced, stored in a retrieval system, or transmitted.

43Ring Networks -

Token Ring Priority Scheme Example

A

B

D

C

5 4

6 4

5

6

0 41 2

4

A

B

D

C

0 6 5 6

5 6

5

5 6

Sx = 6Sr = 4 1 2

34

5 4 3

(a) (b)

Page 44: 1Ring Networks - Ring Networks  All rights reserved. No part of this publication and file may be reproduced, stored in a retrieval system, or transmitted.

44Ring Networks -

Token Ring Priority Scheme Example

A

B

D

C

0 7

Sx = 6Sr = 4

5 7

Sx = 7Sr = 6

0 7 5 7

5

1

2 3

4

A

B

D

C

5

Sx = 6Sr = 4

5 6 5 6

7 6

7

1 2

3

(c) (d)

Page 45: 1Ring Networks - Ring Networks  All rights reserved. No part of this publication and file may be reproduced, stored in a retrieval system, or transmitted.

45Ring Networks -

Token Ring Priority Scheme Example

A

B

D

C

Sx = 6Sr = 4

5

5 7 5 7

5 7 5 6

1 2

34

A

B

D

C

Sx = 6 -> 5Sr = 4

0 5

5 6

0 5

1

2 3

(e) (f)