spanning tree and wireless

16
Spanning Tree and Wireless EE122 Discussion 10/28/2011

Upload: admon

Post on 24-Feb-2016

82 views

Category:

Documents


0 download

DESCRIPTION

Spanning Tree and Wireless. EE122 Discussion 10/28/2011. Switched Networks. Completely avoids collisions Self-learning switches can lead to flooding loops Enter Spanning Tree. Spanning Tree Protocol. Goal: Elect a root node (lowest MAC address) - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Spanning Tree and Wireless

Spanning Tree and Wireless

EE122 Discussion10/28/2011

Page 2: Spanning Tree and Wireless

Switched Networks

• Completely avoids collisions

• Self-learning switches can lead to flooding loops

• Enter Spanning Tree

Page 3: Spanning Tree and Wireless

Spanning Tree Protocol

• Goal: Elect a root node (lowest MAC address)• Invariant: Only use interface on shortest path to

the root node (disable all others)• Update rule: Flood new root, distance whenever

either changes• Message: (Y, d, X)

– Y: proposed root– d: distance between Y and X– X: message sender

Page 4: Spanning Tree and Wireless

Question 1

5

2

431

Page 5: Spanning Tree and Wireless

Only there’s no cat…

Albert Einstein, when asked to describe radio, replied:"You see, wire telegraph is a kind of a very, very long cat. You pull his

tail in New York and his head is meowing in Los Angeles. And radio operates exactly the same way…The only difference is that there is no cat."

Page 6: Spanning Tree and Wireless

Free Space Loss

d = distanceλ = wave lengthf = frequencyc = speed of light

• How does increase in frequency affect free space loss?

• Why don’t we use lower frequencies for everything?

6

Page 7: Spanning Tree and Wireless

8

• A and C can both send to B but can’t hear each other– A is a hidden terminal for C and vice versa

• Carrier Sense will be ineffective – need to sense at receiver

Hidden Terminals

A B C

transmit range

Page 8: Spanning Tree and Wireless

9

Exposed Terminals

• Exposed node: B sends a packet to A; C hears this and decides not to send a packet to D (despite the fact that this will not cause interference)!

• Carrier sense would prevent a successful transmission– But we do carrier sense anway (why?)

A B C D

Page 9: Spanning Tree and Wireless

Key Points• No concept of a global collision

– Different receivers hear different signals– Different senders reach different receivers

• Collisions are at receiver, not sender– Only care if receiver can hear the sender clearly– It does not matter if sender can hear someone else– As long as that signal does not interfere with receiver

• Goal of protocol:– Detect if receiver can hear sender– Tell senders who might interfere with receiver to shut up

10

Page 10: Spanning Tree and Wireless

Basic Collision Avoidance

• Since can’t detect collisions, we try to avoid them• Carrier sense:

– When medium busy, choose random interval– Wait that many idle timeslots to pass before sending

• When a collision is inferred, retransmit with binary exponential backoff (like Ethernet) – Use ACK from receiver to infer “no collision”– Use exponential backoff to adapt contention window

11

Page 11: Spanning Tree and Wireless

12

MA with Collision Avoidance (MACA)

• Before every data transmission – Sender sends a Request to Send (RTS) frame containing the length of the

transmission– Receiver responds with a Clear to Send (CTS) frame– Sender sends data– Receiver sends an ACK; now another sender can send data

• When sender doesn’t get a CTS back, it assumes collision

sender receiver other node in sender’s range

RTS

ACK

dataCTS

Page 12: Spanning Tree and Wireless

13

MACA, con’t

• If other nodes hear RTS, but not CTS: send–Presumably, destination for first sender is out of

node’s range …

senderreceiver other node in

sender’s rangeRTS

dataCTS

data

Page 13: Spanning Tree and Wireless

14

MACA, con’t

• If other nodes hear RTS, but not CTS: send–Presumably, destination for first sender is out of

node’s range …–… Can cause problems when a CTS is lost

senderreceiver other node in

sender’s rangeRTS

dataCTS

data

Page 14: Spanning Tree and Wireless

15

MACA, con’t

• If other nodes hear RTS, but not CTS: send–Presumably, destination for first sender is out of

node’s range …–… Can cause problems when a CTS is lost

• When you hear a CTS, you keep quiet until scheduled transmission is over (hear ACK)

senderreceiver other node in

sender’s rangeRTS

dataCTS

data

Page 15: Spanning Tree and Wireless

16

Overcome hidden terminal problems with contention-free protocol1. B sends to C Request To Send (RTS)2. A hears RTS and defers (to allow C to answer)3. C replies to B with Clear To Send (CTS)4. D hears CTS and defers to allow the data5. B sends to C

RTS / CTS Protocols (MACA)

B C DRTS

CTSA

B sends to C

Page 16: Spanning Tree and Wireless

We’re doing fine without the cat!

Albert Einstein, when asked to describe radio, replied:"You see, wire telegraph is a kind of a very, very long cat. You pull his

tail in New York and his head is meowing in Los Angeles. And radio operates exactly the same way…The only difference is that there is no cat."