/
CSE 461 University of Washington CSE 461 University of Washington

CSE 461 University of Washington - PowerPoint Presentation

interviewpsych
interviewpsych . @interviewpsych
Follow
342 views
Uploaded On 2020-08-05

CSE 461 University of Washington - PPT Presentation

1 Topic How do nodes share a single link Who sends when eg in WiFI Explore with a simple model Assume noone is in charge this is a distributed system CSE 461 University of Washington ID: 798755

university 461 washington cse 461 university cse washington send csma access nodes terminals multiple maca frame rts exposed hidden

Share:

Link:

Embed:

Download Presentation from below link

Download The PPT/PDF document "CSE 461 University of Washington" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Slide1

CSE 461 University of Washington

1

Topic

How do nodes share a single link? Who sends when, e.g., in WiFI?Explore with a simple modelAssume no-one is in charge; this is a distributed system

Slide2

CSE 461 University of Washington

2

Topic (2)

We will explore random multiple access control (MAC) protocolsThis is the basis for classic EthernetRemember: data traffic is bursty

Zzzz..

Busy!

Ho hum

Slide3

CSE 461 University of Washington

3

ALOHA Network

Seminal computer network connecting the Hawaiian islands in the late 1960sWhen should nodes send?A new protocol was devised by Norm Abramson …

Hawaii

Slide4

CSE 461 University of Washington

4

ALOHA Protocol

Simple idea:Node just sends when it has traffic. If there was a collision (no ACK received) then wait a random time and resendThat’s it!

Slide5

CSE 461 University of Washington

5

ALOHA Protocol (2)

Some frames will be lost, but many may get through…Good idea?

Slide6

CSE 461 University of Washington

6

ALOHA Protocol (3)

Simple, decentralized protocol that works well under low load!Not efficient under high loadAnalysis shows at most 18% efficiencyImprovement: divide time into slots and efficiency goes up to 36%We’ll look at other improvements

Slide7

CSE 461 University of Washington

7

Classic Ethernet

ALOHA inspired Bob Metcalfe to invent Ethernet for LANs in 1973Nodes share 10 Mbps coaxial cableHugely popular in 1980s, 1990s

: © 2009 IEEE

Slide8

CSE 461 University of Washington

8

CSMA (Carrier Sense Multiple Access)

Improve ALOHA by listening for activity before we send (Doh!)Can do easily with wires, not wirelessSo does this eliminate collisions?Why or why not?

Slide9

CSE 461 University of Washington

9

CSMA (2)

Still possible to listen and hear nothing when another node is sending because of delay

Slide10

CSE 461 University of Washington

10

CSMA (3)

CSMA is a good defense against collisions only when BD is small

X

Slide11

CSE 461 University of Washington

11

CSMA/CD (with Collision Detection)

Can reduce the cost of collisions by detecting them and aborting (Jam) the rest of the frame timeAgain, we can do this with wires

X

X

X

X

X

X

X

X

Jam!

Jam!

Slide12

CSE 461 University of Washington

12

CSMA/CD Complications

Want everyone who collides to know that it happenedTime window in which a node may hear of a collision is 2D seconds

X

Slide13

CSE 461 University of Washington

13

CSMA/CD Complications (2)

Impose a minimum frame size that lasts for 2D secondsSo node can’t finish before collisionEthernet minimum frame is 64 bytes

X

Slide14

CSE 461 University of Washington

14

CSMA “Persistence”

What should a node do if another node is sending? Idea:

Wait until it is done,

and send

What now?

Slide15

CSE 461 University of Washington

15

CSMA “Persistence” (2)

Problem is that multiple waiting nodes will queue up then collideMore load, more of a problem

Now!

Now!

Uh oh

Slide16

CSE 461 University of Washington

16

CSMA “Persistence” (3)

Intuition for a better solutionIf there are N queued senders, we want each to send next with probability 1/N

Send p=½

Whew

Send p=½

Slide17

CSE 461 University of Washington

17

Binary Exponential Backoff (BEB)

Cleverly estimates the probability1st collision, wait 0 or 1 frame times2nd collision, wait from 0 to 3 times3rd collision, wait from 0 to 7 times …BEB doubles interval for each successive collision

Quickly gets large enough to workVery efficient in practice

Slide18

Classic Ethernet, or IEEE 802.3

Most popular LAN of the 1980s, 1990s

10 Mbps over shared coaxial cable, with baseband signalsMultiple access with “1-persistent CSMA/CD with BEB”

CSE 461 University of Washington18

Slide19

CSE 461 University of Washington

19

Modern Ethernet

Based on switches, not multiple access, but still called EthernetWe’ll get to it in a later segment

Switch

Twisted pair

Switch ports

Slide20

CSE 461 University of Washington

20

Topic

How do wireless nodes share a single link? (Yes, this is WiFi!)Build on our simple, wired model

Send?

Send?

Slide21

CSE 461 University of Washington

21

Wireless Complications

Wireless is more complicated than the wired case (Surprise!)Nodes may have different areas of coverage – doesn’t fit Carrier Sense »Nodes can’t hear while sending – can’t Collision Detect

»

≠ CSMA/CD

Slide22

CSE 461 University of Washington

22

Different Coverage Areas

Wireless signal is broadcast and received nearby, where there is sufficient SNR

Slide23

Hidden Terminals

Nodes A and C are hidden terminals

when sending to BCan’t hear each other (to coordinate) yet collide at B

We want to avoid the inefficiency of collisionsCSE 461 University of Washington23

Slide24

Exposed Terminals

B and C are exposed terminals

when sending to A and DCan hear each other yet don’t collide at receivers A and D

We want to send concurrently to increase performanceCSE 461 University of Washington24

Slide25

CSE 461 University of Washington

25

Nodes Can’t Hear While Sending

With wires, detecting collisions (and aborting) lowers their costMore wasted time with wireless

Time

XXXXXXXXX

XXXXXXXXX

Wireless

Collision

Resend

X

X

Wired

Collision

Resend

Slide26

Possible Solution: MACA

MACA uses a short handshake instead of CSMA (Karn

, 1990)802.11 uses a refinement of MACA (later)

Protocol rules:A sender node transmits a RTS (Request-To-Send, with frame length)The receiver replies with a CTS (Clear-To-Send, with frame length)Sender transmits the frame while nodes hearing the CTS stay silentCollisions on the RTS/CTS are still possible, but less likely

CSE 461 University of Washington

26

Slide27

CSE 461 University of Washington

27

MACA – Hidden Terminals

AB with hidden terminal CA sends RTS, to B

D

C

B

A

Slide28

CSE 461 University of Washington

28

MACA – Hidden Terminals (2)

AB with hidden terminal CB sends CTS, to A, and C too

D

C

B

A

RTS

Slide29

CSE 461 University of Washington

29

MACA – Hidden Terminals (3)

AB with hidden terminal CB sends CTS, to A, and C too

D

C

B

A

RTS

C

TS

C

TS

Alert!

Slide30

CSE 461 University of Washington

30

MACA – Hidden Terminals (4)

AB with hidden terminal CA sends frame while C defers

Frame

Quiet...

Slide31

CSE 461 University of Washington

31

MACA – Exposed Terminals

BA, CD as exposed terminalsB and C send RTS to A and D

D

C

B

A

Slide32

CSE 461 University of Washington

32

MACA – Exposed Terminals (2)

BA, CD as exposed terminalsA and D send CTS to B and C

D

C

B

A

RTS

RTS

Slide33

CSE 461 University of Washington

33

MACA – Exposed Terminals (3)

BA, CD as exposed terminalsA and D send CTS to B and C

D

C

B

A

RTS

RTS

C

TS

C

TS

All OK

All OK

Slide34

CSE 461 University of Washington

34

MACA – Exposed Terminals (4)

BA, CD as exposed terminalsA and D send CTS to B and C

D

C

B

A

Frame

Frame

Slide35

CSE 461 University of Washington

35

802.11, or WiFi

Very popular wireless LAN started in the 1990sClients get connectivity from a (wired) AP (Access Point)It’s a multi-access problem  Various flavors have been developed over time

Faster, more features

Access

PointClient

To Network

Slide36

CSE 461 University of Washington

36

802.11 Physical Layer

Uses 20/40 MHz channels on ISM bands802.11b/g/n on 2.4 GHz802.11 a/n on 5 GHzOFDM modulation (except legacy 802.11b)Different amplitudes/phases for varying SNRs

Rates from 6 to 54 Mbps plus error correction802.11n uses multiple antennas; see “802.11 with Multiple Antennas for Dummies”

Slide37

802.11 Link Layer

Multiple access uses CSMA/CA (next); RTS/CTS optional

Frames are

ACKed and retransmitted with ARQFunky addressing (three addresses!) due to APErrors are detected with a 32-bit CRCMany, many features (e.g., encryption, power save)

CSE 461 University of Washington

37

Packet from Network layer (IP)

Slide38

802.11 CSMA/CA for Multiple Access

Sender avoids collisions by inserting small random gapsE.g., when both B and C send, C picks a smaller gap, goes first

CSE 461 University of Washington

38

Time

Send?

Send?

Slide39

The Future of 802.11 (Guess)

Likely ubiquitous for Internet connectivityGreater diversity, from low- to high-end devices

Innovation in physical layer drives speedAnd power-efficient operation too

More seamless integration of connectivityToo manual now, and limited (e.g., device-to-device)CSE 461 University of Washington

39

Slide40

CSE 461 University of Washington

40

Topic

A new approach to multiple accessBased on turns, not randomization

1

3

2

4

Slide41

CSE 461 University of Washington

41

Issues with Random Multiple Access

CSMA is good under low load:Grants immediate accessLittle overhead (few collisions)But not so good under high load:High overhead (expect collisions)Access time varies (lucky/unlucky)

We want to do better under load!

Slide42

CSE 461 University of Washington

42

Turn-Taking Multiple Access Protocols

They define an order in which nodes get a chance to sendOr pass, if no traffic at presentWe just need some ordering …E.g., Token Ring

»E.g., node addresses

Slide43

Token Ring

Arrange nodes in a ring; token rotates “permission to send” to each node in turn

CSE 461 University of Washington

43

Node

Direction of

transmissionToken

Slide44

CSE 461 University of Washington

44

Turn-Taking Advantages

Fixed overhead with no collisionsMore efficient under loadRegular chance to send with no unlucky nodesPredictable service, easily extended to guaranteed quality of service

Slide45

CSE 461 University of Washington

45

Turn-Taking Disadvantages

ComplexityMore things that can go wrong than random access protocols!E.g., what if the token is lost?Higher overhead at low load

Slide46

CSE 461 University of Washington

46

Turn-Taking in Practice

Regularly tried as an improvement offering better serviceE.g., qualities of serviceBut random multiple access is hard to beatSimple, and usually good enough

Scales from few to many nodes