34
1 Shared Access Networks: Token ring , Wireless Sections 2.7 & 2.8

1 Shared Access Networks: Token ring, Wireless Sections 2.7 2.8

Embed Size (px)

DESCRIPTION

3 Token Ring: Topology and Components Relay –Single Relay –Multistation Access Units Host From Previous MSAU To Next MSAU Host Relay From Previous Host To Next Host Relay open >>>> host active Host Relay From Previous Host To Next Host Relay closed-host>>> bypassed

Citation preview

Page 1: 1 Shared Access Networks: Token ring, Wireless Sections 2.7  2.8

1

Shared Access Networks: Token ring , Wireless

Sections 2.7 & 2.8

Page 2: 1 Shared Access Networks: Token ring, Wireless Sections 2.7  2.8

2

Token Rings: Overview

• Examples– 16Mbps IEEE 802.5 (based on earlier 4Mbps IBM

ring)– 100Mbps Fiber Distributed Data Interface (FDDI)

Page 3: 1 Shared Access Networks: Token ring, Wireless Sections 2.7  2.8

3

Token Ring: Topology and Components

• Relay– Single Relay– Multistation Access Units

Host

Host

Host

Hos

t

From Previous MSAU

To Next MSAU

Host

Relay

From Previous

Host

To Next Host

Relay open >>>> host active

Host

Relay

From Previous

Host

To Next Host

Relay closed-host>>> bypassed

Page 4: 1 Shared Access Networks: Token ring, Wireless Sections 2.7  2.8

4

Token Ring Media Access Control

• Frames flow in one direction– a node receives frames from upstream neighbor and

forwards them to downstream neighbor– ring is viewed as a single shared medium

• A distributed algorithm controls when each node is allowed to transmit– all nodes see all frames– special bit pattern (token) rotates around ring– When a node with a frame to transmit sees the token

• takes token off ring• inserts its frame into ring

Page 5: 1 Shared Access Networks: Token ring, Wireless Sections 2.7  2.8

5

Token Ring MAC (cont)

• Each node along the way forwards frame

• Destination node saves a copy and forwards frame onto next node

• When frame makes its way back, sender strips its frame off ring & reinserts token

• Nodes are serviced in round-robin (assuming all have frames with same priority)

Page 6: 1 Shared Access Networks: Token ring, Wireless Sections 2.7  2.8

6

Token Ring MAC: Priority Support

• Token contains 3-bit priority field

• Every frame is assigned a priority by its sender– frame header contains 3-bit priority and 3-bit

reservation fields

• Device can only seize token if its frame’s priority >= token’s priority

• Priority of token changes over time due to the use of the reservation bits in frame header

Page 7: 1 Shared Access Networks: Token ring, Wireless Sections 2.7  2.8

7

Token Ring MAC Priority Support:Station X wants to send a priority n frame

• X sees a data frame going past by and the reservation bits have not already been set to a value higher than n– X sets the reservation bits of the data frame to n– X records the priority of this frame PT (= current

priority of token, which is now held by sending node)

• Station currently holding the token elevate tokens priority to n when the station releases the token

Page 8: 1 Shared Access Networks: Token ring, Wireless Sections 2.7  2.8

8

Station X wants to send a priority n frame (cont.)

• Station X seizes the token & transmits its frame (with priority n)

• Station X lowers token priority to the old value, PT, when it releases the token

Page 9: 1 Shared Access Networks: Token ring, Wireless Sections 2.7  2.8

9

Token Release• Immediate release

– Used in FDDI– Token follows frame immediately

• Delayed release– Used in IEEE 802.5– Token sent after frame returns to sender

Page 10: 1 Shared Access Networks: Token ring, Wireless Sections 2.7  2.8

10

Token Release

Delayed Release

Early Release

Page 11: 1 Shared Access Networks: Token ring, Wireless Sections 2.7  2.8

11

Token Ring 802.5 Frame Format

• Start delimiter• Access control : Includes frame priority & reservation

priority bits (pp.127, 128)• Frame control : a demux key that identifies the

higher-layer protocol.• Addresses: 48 bits interpreted in exactly the same

way as on an Ethernet• 32-bit CRC• Frame status byte: includes the A bit (set when

receiver sees the frame) and C bit (set when receiver copy the frame). A & C bits used for reliable delivery (p.128)

Body ChecksumSrcaddr

Variable48Destaddr

48 32Enddelimiter

8Framestatus

8Framecontrol

8Accesscontrol

8Startdelimiter

8

Page 12: 1 Shared Access Networks: Token ring, Wireless Sections 2.7  2.8

12

802.5 Reliable Delivery of Frames: Use of the A and C bits• Sender sets A & C to 0• When the receiver sees the frame, it sets the A bit• When receiver copies the frame into its adaptor it

sets the C bit• If the sending station sees the frame come back

with the A bit still 0, it knows that the intended recipient is not functioning or absent

• If the A bit is set but not the C bit, this implies that for some reason (e.g., lack of buffer space) the destination could not accept the frame.

• Thus, the frame is retransmitted later if A or C is still 0

Page 13: 1 Shared Access Networks: Token ring, Wireless Sections 2.7  2.8

13

Token Ring Maintenance : 802.5 Monitor

• A monitor is elected using defined procedures when the ring is connected or on failure of current monitor (p. 129)

Functions of the Monitor 1. Inserts a new token

– when initializing ring (no token exists at t= 0)– bit error corrupts token pattern– node holding token crashes– monitor watches passing token and sets a timer

(=NumStations x Token Holding Time, THT + Ring Latency);• timer expires, monitor creates a replacement token

Page 14: 1 Shared Access Networks: Token ring, Wireless Sections 2.7  2.8

14

Token Ring Maintenance (cont.)Functions of the Monitor

2. Drains corrupted (CRC errors or invalid formats) & orphaned frames (“parent” died)

Page 15: 1 Shared Access Networks: Token ring, Wireless Sections 2.7  2.8

15

Fiber Distributed Data Interface, FDDI: Physical Properties

• At most 500 stations (compared with 250 stations for 802.5 Token Ring)

• Maximum 2 km between pair of stations• Network limited to total of 200 km of fiber• Dual ring ;hence the total cable connecting all

stations is limited to 100 km• Used 4B/5B encoding• Standard defined for different media, including

– fiber, coax and twisted pair (total distance varies)

Control8 8 8 24

CRCStart offrame

End offrame

Destaddr Body

4848Srcaddr Status

32Frame (NOT access) Control

Page 16: 1 Shared Access Networks: Token ring, Wireless Sections 2.7  2.8

16

FDDI

• Dual ring configuration– Self-healing

• Normal flow in green direction• Can detect and recover from one failure

Page 17: 1 Shared Access Networks: Token ring, Wireless Sections 2.7  2.8

17

Timed Token Algorithm (FDDI)

• Token Holding Time (THT)– upper limit on how long a station can hold the token

• 10 ms default value in 802.5– Each station is responsible for ensuring that the

transmission time for its packet will not exceed THT• Token Rotation Time (TRT)

– how long it takes the token to traverse the ring– TRT <= ActiveNodes x THT + RingLatency

•ActiveNodes: no. of nodes with data to transmit•RingLatency: token circulation time when no one

has data to transmit • Target Token Rotation Time (TTRT)

– agreed-upon upper bound on TRT

Page 18: 1 Shared Access Networks: Token ring, Wireless Sections 2.7  2.8

18

Algorithm (FDDI, cont I) • Each node measures TRT between successive

tokens– if measured-TRT > TTRT: token is late so don’t send– if measured-TRT < TTRT: token is early so OK to hold

token for {TTRT – (measured-TRT)} (i.e. transmit for this duration)

Page 19: 1 Shared Access Networks: Token ring, Wireless Sections 2.7  2.8

19

Algorithm (FDDI, cont II) • Two classes of traffic

– A node can always send synchronous data when receiving a token

• synchronous traffic (delay sensitive) : e.g. voice or video– A node can send asynchronous data only if token is

early• asynchronous traffic: file transfer (application interested in

throughput rather than delay)

• Total synchronous data sent during one token rotation is bounded by TTRT

Page 20: 1 Shared Access Networks: Token ring, Wireless Sections 2.7  2.8

20

Algorithm (cont)

• Worse case: a single rotation of token to take as long as 2xTTRT– nodes with asynchronous traffic first use up one TTRT– then the nodes with synchronous data consume another TTRT

worth of time• it is possible for the measured TRT at any given node to be as

much as 2 x TTRT.

• Not possible to have back-to-back rotations that take 2 x TTRT– if synchronous traffic has already consumed one TTRT (in the first

rotation)• then nodes with asynchronous traffic will not send any data

(token late) in the second rotation • only synchronous traffic possible in the second rotation

Page 21: 1 Shared Access Networks: Token ring, Wireless Sections 2.7  2.8

21

FDDI Token Maintenance

Goal: Ensure a valid token is always in circulation

• All nodes monitor the ring to be sure that token has not been lost – should periodically see valid transmission

(frame or token)• Maximum time gap between

transmissions= ring latency + transmission time of max

frame < = 2.5ms (on a maximally sized ring)

Page 22: 1 Shared Access Networks: Token ring, Wireless Sections 2.7  2.8

22

FDDI Token Maintenance (cont. I)

set timer at 2.5ms• valid transmission received >>> reset timer to

2.5 ms

• timer fires >>> send claim frame containing the node’s bid for the TTRT:

token rotation time that the node needs so that the applications running on the node can meet their timing constraints

Page 23: 1 Shared Access Networks: Token ring, Wireless Sections 2.7  2.8

23

FDDI Maintenance (cont II)

Generating a token (when lost) & agreeing on TTRT

• A node can send a claim frame whenever it suspects a failure or when it first joins the network.

– claim frame includes the node’s TTRT bid

Page 24: 1 Shared Access Networks: Token ring, Wireless Sections 2.7  2.8

24

FDDI Maintenance (cont III)

• When a node receives “claim frame”, it updates the bid and forward– “update the bid” means changing the value of the

proposed TTRT in the claim frame if it is larger than this node’s bid for TTRT

• If a node’s claim frame makes it all the way around the ring:– Node’s bid was the lowest– Everyone knows the TTRT– Node inserts new token

Page 25: 1 Shared Access Networks: Token ring, Wireless Sections 2.7  2.8

25

Differences : 802.5 and FDDI

Token Ring• Shielded twisted pair• 4, 16 Mbps• No reliability specified• Differential Manchester• Priority and Reservation

bits

FDDI• Optical Fiber• 100 Mbps• Reliability specified (dual ring)• 4B/5B encoding• Timed Token Rotation Time

Page 26: 1 Shared Access Networks: Token ring, Wireless Sections 2.7  2.8

26

Wireless LANs: Wi-Fi• IEEE 802.11 (Wi-Fi)

• Bandwidth: up to 54 Mbps (802.11a; 802.11g)

• 802.11 Physical layer protocol– Spread spectrum radio

• run in the 2.4-GHz frequency band of the electromagnetic spectrum

Page 27: 1 Shared Access Networks: Token ring, Wireless Sections 2.7  2.8

27

Spread Spectrum

Idea• spread signal over wider frequency band than

required– minimize the impact of interference from other

devices

• originally designed for military use– “other devices” were attempting to jam the signal

Page 28: 1 Shared Access Networks: Token ring, Wireless Sections 2.7  2.8

28

a) Spread Spectrum via Frequency Hopping

• Frequency Hopping: – Transmit over random sequence of frequencies– Sender and receiver share…

• pseudorandom number generator• Seed

– Signal look like noise to a receiver that does not know pseudorandom sequence

• 802.11 uses 79 1MHz-wide frequency bands

Page 29: 1 Shared Access Networks: Token ring, Wireless Sections 2.7  2.8

29

b) Direct Sequence• Each bit in the frame is represented by multiple bits in the

transmitted signal • For each bit, send XOR of that bit and n random bits

(generated by pseudorandom number generator known to both sender the receiver)

• Transmitted values, called n-bit chipping code, spread signal across a frequency band n times wider than frame would have required

• 802.11 defines an 11-bit chipping code

Random sequence: 0100101101011001

Data stream: 1010

XOR of the two: 1011101110101001

0

0

0

1

1

1a 4-bit chipping sequence

4-bit chipping code

Page 30: 1 Shared Access Networks: Token ring, Wireless Sections 2.7  2.8

30

Collisions “Avoidance”:Hidden nodes problem

A B C D

A & C are hidden with respect to each other:A and C want to communicate with B and so they each send it a frame•A and C are unaware of each other since their signals do not carry that far•two frames collide with each other at B•neither A nor C is aware of this collision

Page 31: 1 Shared Access Networks: Token ring, Wireless Sections 2.7  2.8

31

Collisions “Avoidance”:Exposed nodes problem

A B C D

C is exposed to BB is sending to AC is aware of this communicationa mistake for C to conclude that it cannot transmit to D because it can hear B’s transmissionC transmitting to D will not interfere with A’s ability to receive from B

Page 32: 1 Shared Access Networks: Token ring, Wireless Sections 2.7  2.8

32

Multiple Access with Collision Avoidance(MACA)

• Sender transmits RequestToSend (RTS) “control” frame• Receiver replies with ClearToSend (CTS) “control” frame• Neighbors…

– see CTS: keep quiet ( hence Avoid Collision)– see RTS but not CTS: ok to transmit

• Receiver sends ACK after successfully receiving a frame – neighbors silent until see ACK

• silent from CTS until ACK• Collisions

– collisions detection not supported• two or more nodes detect an idle link, try to transmit an RTS frame at the

same time >> RTS frames will collide – collision is known when senders don’t receive CTS– senders wait random times before trying again– wait time of a node defined by exponential backoff

Page 33: 1 Shared Access Networks: Token ring, Wireless Sections 2.7  2.8

33

Supporting Mobility• ad hoc network

– set of directly reachable nodes may change over time• 802.11 defines additional structure on a set of nodes • access points (AP): connected by a “distribution

system”– each mobile node associates with an AP

BH

AF

G

D

AP-2AP-3AP-1

C E

Distribution system

Page 34: 1 Shared Access Networks: Token ring, Wireless Sections 2.7  2.8

34

Mobility (cont)• Scanning (selecting an AP)

– node sends Probe frame– all AP’s w/in reach reply with ProbeResponse frame– node selects one AP; sends it AssociateRequest

frame– AP replies with AssociationResponse frame– new AP informs old AP via the distribution system

• When ?– Active scanning performed by mobile node when

• joining the network• moving in the network

• becomes unhappy with its current AP– Passive scanning: AP periodically sends Beacon

frame• Advertises capabilities of AP (including supported

transmission rates)