spanning tree and wireless
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 PresentationTRANSCRIPT
![Page 1: Spanning Tree and Wireless](https://reader036.vdocuments.us/reader036/viewer/2022062323/56816640550346895dd9ae44/html5/thumbnails/1.jpg)
Spanning Tree and Wireless
EE122 Discussion10/28/2011
![Page 2: Spanning Tree and Wireless](https://reader036.vdocuments.us/reader036/viewer/2022062323/56816640550346895dd9ae44/html5/thumbnails/2.jpg)
Switched Networks
• Completely avoids collisions
• Self-learning switches can lead to flooding loops
• Enter Spanning Tree
![Page 3: Spanning Tree and Wireless](https://reader036.vdocuments.us/reader036/viewer/2022062323/56816640550346895dd9ae44/html5/thumbnails/3.jpg)
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](https://reader036.vdocuments.us/reader036/viewer/2022062323/56816640550346895dd9ae44/html5/thumbnails/4.jpg)
Question 1
5
2
431
![Page 5: Spanning Tree and Wireless](https://reader036.vdocuments.us/reader036/viewer/2022062323/56816640550346895dd9ae44/html5/thumbnails/5.jpg)
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](https://reader036.vdocuments.us/reader036/viewer/2022062323/56816640550346895dd9ae44/html5/thumbnails/6.jpg)
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](https://reader036.vdocuments.us/reader036/viewer/2022062323/56816640550346895dd9ae44/html5/thumbnails/7.jpg)
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](https://reader036.vdocuments.us/reader036/viewer/2022062323/56816640550346895dd9ae44/html5/thumbnails/8.jpg)
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](https://reader036.vdocuments.us/reader036/viewer/2022062323/56816640550346895dd9ae44/html5/thumbnails/9.jpg)
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](https://reader036.vdocuments.us/reader036/viewer/2022062323/56816640550346895dd9ae44/html5/thumbnails/10.jpg)
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](https://reader036.vdocuments.us/reader036/viewer/2022062323/56816640550346895dd9ae44/html5/thumbnails/11.jpg)
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](https://reader036.vdocuments.us/reader036/viewer/2022062323/56816640550346895dd9ae44/html5/thumbnails/12.jpg)
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](https://reader036.vdocuments.us/reader036/viewer/2022062323/56816640550346895dd9ae44/html5/thumbnails/13.jpg)
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](https://reader036.vdocuments.us/reader036/viewer/2022062323/56816640550346895dd9ae44/html5/thumbnails/14.jpg)
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](https://reader036.vdocuments.us/reader036/viewer/2022062323/56816640550346895dd9ae44/html5/thumbnails/15.jpg)
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](https://reader036.vdocuments.us/reader036/viewer/2022062323/56816640550346895dd9ae44/html5/thumbnails/16.jpg)
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."