<<

Wired Communication

 Pros  Very reliable  For , medium HAS TO PROVIDE a Bit Error Rate (BER) of 10 -12 (one error every one trillion bits!)  Insulated wires; wires placed underground and in walls EE 122:  Error Correction Techniques  Very high transfer rates Ion Stoica (and Brighten Godfrey)  Up to 100-Gbit/s or more  Long distance TAs: Lucian Popa, David Zats and Ganesh Ananthanarayanan  Up to 40km (~25 miles) in 10-Gbit/s Ethernet (cutting edge) http://inst.eecs.berkeley.edu/~ee122/  Cons (Materials with thanks to Vern Paxson, Jennifer Rexford,  Expensive to set up infrastructure and colleagues at UC Berkeley)  Infrastructure is fixed once set up 2  No mobility

Wireless Communication Goals for Today’s Lecture  Pros  Allows mobility  Characteristics of Wireless Media  Much cheaper and easier to deploy, change, and  802.11 Architecture and Media Access Control upgrade! Protocol  Cons  Collision Detection vs. Collision Avoidance  Exposed (unshielded) medium  Hidden Terminal and Exposed Terminal Problem  Susceptible to physical phenomena (interference)  Request To Send (RTS) / Clear To Send(CTS)  Variable BER -- Error correction may not suffice in all cases mechanism  Slower data rates for wider distances  Multihop Wireless Networks  OSI layered stack designed for wired medium  Sensor Networks  Difficult to “hide” underlying behavior  TCP over Multihop Networks  Security: anyone in range hears transmission  3 Wireless Security 4

Wireless Communication Wireless Link Characteristics Standards (Alphabet Soup) (Figure Courtesy of Kurose and Ross) Ethernet

 Cellular  2G: GSM (Global System for Mobile communication), CDMA (Code division multiple access )  3G: CDMA2000  IEEE 802.11  A: 5.0Ghz band, 54Mbps ( 25 Mbps operating rate )  B: 2.4Ghz band, 11Mbps ( 4.5 Mbps operating rate )  G: 2.4Ghz, 54Mbps ( 19 Mbps operating rate )  Other versions to come.  IEEE 802.15 – lower power wireless  802.15.1: 2.4Ghz, 2.1 Mbps (Bluetooth)  802.15.4: 2.4Ghz, 250 Kbps (Sensor Networks) 5 6

1 Other Wireless Link Characteristics Path Loss

 Path loss  Signal attenuation as a function of distance  Signal power attenuates by about ~r 2 factor for  Signal-to-noise ratio (SNR—Signal Power/Noise Power) omni-directional antennas in free space decreases, make signal unrecoverable  Where r is the distance between the sender and the  Multipath Propagation receiver  Signal reflects off surfaces, effectively causing self-  The exponent in the factor is different depending on interference placement of antennas  Interference from other sources  Less than 2 for directional antennas  Internal Interference  Faster Attenuation  Hosts within range of each other collide with one another’s  Exponent greater than 2 when antennas are placed on the ground transmission (remember Aloha)  Signal bounces off the ground and reduces the power of the signal  External Interference  Microwave is turned on and blocks your signal 7 8

Multipath Effects A Wireless Link? (courtesy of Gilman Tolle and Jonathan Hui, ArchRock) Ceiling

S R Floor

 Signals bounce off surface and interfere with one another  What signals are out of phase?  Orthogonal signals cancel each other and nothing is received!

9

A Wireless Link! The Amoeboed “cell” (courtesy of Gilman Tolle and Jonathan Hui, ArchRock) (courtesy of David Culler, UCB)

Signal

Noise

Distance

12

2 Wireless Bit Errors 802.11 Architecture

 The lower the SNR (Signal/Noise) the higher the Bit Error Rate (BER)  How can we deal with this? 802.11 frames exchanges  Make the signal stronger  Why is this not always a good idea? 802.3 (Ethernet) frames exchanged  Increased signal strength requires more power  Increases the interference range of the sender, so you  Designed for limited interfere with more nodes around you geographical area  AP’s (Access Points) are set to specific channel and broadcast  Error Correction schemes can correct some messages with SSID and MAC Address periodically problems  Hosts scan all the channels to discover the AP’s  Host associates with AP (actively or passively) 13 14

Ethernet vs 802.11

 Wireless MAC design  Why not just use Ethernet algorithms? 5 Minute Break  Ethernet: one shared “collision” domain  It’s technically difficult to detect collisions  Collisions are at receiver, not sender  … even if we could, it wouldn’t work Questions Before We Proceed?  Different transmitters have different coverage areas  In addition, wireless links are much more prone to loss than wired links  Carrier Sense (CSMA) is OK; detection (CD) is not

15 16

Hidden Terminals Exposed Terminals

ABC D A B C

transmit range  Exposed : 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)!  A and C can both send to B but can’t hear each other  A is a hidden terminal for C and vice versa  CSMA/ CD will be ineffective – need to sense at receiver

17 18

3 CSMA/CA: CSMA w/ Collision Multiple Access with Collision Avoidance Avoidance (MACA) other node in sender receiver sender’s range RTS  Since we can’t detect collisions, we try to avoid CTS them data  When medium busy, choose random interval ACK (contention window )  Wait for that many idle timeslots to pass before  Before every data transmission sending  Sender sends a Request to Send (RTS) frame containing the length of the transmission  When a collision is inferred, retransmit with binary  Receiver respond with a Clear to Send (CTS) frame exponential backoff (like Ethernet)  Sender sends data  Receiver sends an ACK; now another sender can send data  Use ACK from receiver to infer “no collision”  When sender doesn’t get a CTS back, it assumes collision  Use exponential backoff to adapt contention window 19 20

MACA, con’t MACA, con’t

other node in other node in receiver sender receiver sender sender’s range sender’s range RTS RTS

CTS CTS data data data

ACK

 If other nodes hear RTS, but not CTS: send  If other nodes hear RTS, but not CTS: send  Presumably, destination for first sender is out of  Presumably, destination for first sender is out of node’s range … 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) 21 22

RTS / CTS Protocols (MACA) 802.11 Stack View

RTS A B C D CTS

MACA = Multiple Access with Collision Avoidance Overcome exposed/hidden terminal problems with contention-free protocol  CSMA/CA runs over the 802.11 physical layer 1. B stimulates C with Request To Send (RTS) 2. A hears RTS and defers (to allow C to answer)  Link-level acknowledgements for every frame 3. C replies to B with Clear To Send (CTS) sent 4. D hears CTS and defers to allow the data 5. B sends to C 23 24

4 Link-Layer Acknowledgements Channelization of spectrum Kurose and Ross  Typically, available frequency spectrum is split into multiple channels  Receiver acks every  Some channels may overlap data packet 3 channels 8 channels 4 channels

26 MHz 100 MHz 200 MHz 150 MHz

 If ACK is lost, source 915 MHz2.45 GHz 5.25 GHz 5.8 GHz tries again until a maximum 250 MHz 500 MHz 1000 MHz retransmission number is reached 24.125 GHz 61.25 GHz 122.5 GHz 25 26

Preventing Collisions Altogether Using Multiple Channels

 802.11: AP’s on different channels  Frequency Spectrum partitioned into several  Usually manually configured by administrator channels  Automatic Configuration may cause problems  Nodes within interference range can use separate channels  Most cards have only 1 transceiver  B Not Full Duplex: Cannot send and receive at the A C same time D  Multichannel MAC Protocols  Automatically have nodes negotiate channels  Channel coordination amongst nodes is necessary  Now A can send B while C sends to D without any  Introduces negotiation and channel-switching latency that interference! reduce throughput  Aggregate Network throughput doubles 27 28

Wireless Multihop Networks Large Multihop Network (courtesy of Sanjit Biswas, MIT)

 Vehicular Networks  Delay Tolerant (batch) sending over several hops carry data to a base station  Common in Sensor Network for periodically transmitting data  Infrastructure Monitoring  E.g., structural health monitoring of the Golden Gate Bridge  Multihop networking for connection sharing  Routing traffic over several hops to base station connected to Internet

 E.g., Meraki Networks 1 kilometer 29

5 Multi-Hop Wireless Ad Hoc Networks Multi-Hop Wireless Ad Hoc (Courtesy of Tianbo Kuang and Carey Williamson University of Calgary) Networks

S S

A C A C B B D D

R R

32

Multi-Hop Wireless Ad Hoc Multi-Hop Wireless Ad Hoc

Networks (Assume ideal world…) Networks

1 2 2 3 3 4 4 5 5 6 S 6 S 1 7 7 8 8 9 9 10 10 11 11 12 12 A C A C B B D D

R R

33 34

Multi-Hop Wireless Ad Hoc Multi-Hop Wireless Ad Hoc Networks Networks

3 4 4 5 5 6 S 2 6 S 3 7 7 8 8 9 9 10 10 1 11 11 12 1 12 2 A C A C B B D D

R R

35 36

6 Multi-Hop Wireless Ad Hoc Multi-Hop Wireless Ad Hoc Networks Networks

5 6 S 4 6 S 7 7 5 8 8 9 9 10 10 11 2 11 3 12 3 1 12 4 2 A C A C B B 1 D D

R R

37 38

Multi-Hop Wireless Ad Hoc Multi-Hop Wireless Ad Hoc Networks Networks

S 6 S 7 7 8 8 9 9 10 10 11 4 3 11 5 12 5 12 6 4 A C A C B B 2 D D 3 1 1 2

R R

39 40

Multi-Hop Wireless Ad Hoc Multi-Hop Wireless Ad Hoc Networks Networks

S 8 S 9

9 10 10 11 6 11 7 12 7 5 12 8 6 A C A C B B D 4 D 5 1 1 2 2 3 3 4 R R

41 42

7 Multi-Hop Wireless Ad Hoc Multi-Hop Wireless Ad Hoc Networks Networks

S S 10 11

11 8 8 12 9 7 12 9 A C A 10 C B B D 6 D 7 1 1 2 2 3 3 4 4 5 5 R R 6

43 44

Multi-Hop Wireless Ad Hoc Multi-Hop Wireless Ad Hoc Networks Networks

S 12 S

10 11 10 11 9 12 A C A C B B D 8 D 9 1 1 2 2 3 3 4 4 5 5 R 6 R 6 7 7 8

45 46

Multi-Hop Wireless Ad Hoc Multi-Hop Wireless Ad Hoc Networks Networks

S S

12 11 12 A C A C B B D 10 D 11 1 1 2 2 3 3 4 4 5 5 R 6 R 6 7 7 8 8 9 9 10

47 48

8 Multi-Hop Wireless Ad Hoc Multi-Hop Wireless Ad Hoc Networks Networks

S S

A C A C B B D 12 D 1 1 2 2 3 3 4 4 5 5 R 6 R 6 7 7 8 8 9 9 10 10 11 11 12 49 50

Multi-Hop Wireless Ad Hoc Multi-Hop Wireless Ad Hoc Networks Networks (Reality check…) Problem 2: can’t use both 1 1 of these links at same time 2 Problem 1: node A can’t use both 2 3 3 - range overlap at A 4 of these links at the same time 4 5 5 - “hidden node” problem 6 S - shared wireless channel 6 S 7 7 - “exposed node” problem 8 - transmit or receive, but not both 8 9 9 10 10 11 11 12 12 A C A C B B D D

R R

51 52

Multi-Hop Wireless Ad Hoc Multi-Hop Wireless Ad Hoc Networks Networks

1 Problem 3: LOTS of 1 2 2 RTS 3 contention for the channel 3 CTS 4 4 5 - in steady state, all want to send 5 6 S 6 S 7 - need RTS/CTS to resolve contention 7 8 8 9 9 10 10 11 11 12 12 A C A C B B D D

RTS: Request-To-Send R R CTS: Clear-To-Send

53 54

9 Multi-Hop Wireless Ad Hoc Multi-Hop Wireless Ad Hoc Networks Networks

2 2 3 3 RTS CTS 4 4 5 5 6 S 1 6 S 7 7 8 8 9 9 10 10 11 11 12 12 A C A 1 C B B D D

R R

55 56

Multi-Hop Wireless Ad Hoc Multi-Hop Wireless Ad Hoc Networks Networks

2 2 3 3 4 4 5 5 6 S 6 S 7 7 8 8 9 9 10 10 11 11 12 1 12 1 A C A C B B D D

R R

57 58

Multi-Hop Wireless Ad Hoc Multi-Hop Wireless Ad Hoc Networks Networks

3 3 4 4 5 5 6 S 2 6 S 7 7 8 8 9 9 10 10 11 11 12 1 12 2 A C A C B B D D 1

R R

59 60

10 Multi-Hop Wireless Ad Hoc Multi-Hop Wireless Ad Hoc Networks Networks

3 4 4 5 5 6 S 6 S 3 7 7 8 8 9 9 10 10 11 11 12 2 12 2 A C A C B B D D 1 1

R R

61 62

Multi-Hop Wireless Ad Hoc Multi-Hop Wireless Ad Hoc Networks Networks

4 4 5 5 6 S 6 S 7 7 8 8 9 9 10 10 11 11 3 12 3 12 A C A C B B D 2 D 1 1 2

R R

63 64

Multi-Hop Wireless Ad Hoc Multi-Hop Wireless Ad Hoc Networks Networks

5 5 6 S 4 6 S 7 7 8 8 9 9 10 10 11 11 12 3 12 4 A C A C B B D D 3 1 1 2 2

R R

65 66

11 Multi-Hop Wireless Ad Hoc Multi-Hop Wireless Ad Hoc Networks Networks

1 Problem 4: TCP uses ACKS to 2 3 indicate reliable data delivery 4 5 5 - bidirectional traffic (DATA, ACKS) 6 S 6 S 7 7 - even more contention !!! 8 8 9 9 10 10 11 11 12 4 12 A C A C B B D D 1 2 3 R R

67 68

Multi-Hop Wireless Ad Hoc Multi-Hop Wireless Ad Hoc Networks Networks

2 2 3 3 4 4 5 5 6 S 1 6 S 7 7 8 8 9 9 10 10 11 11 12 12 1 A C A C B B D D

R R

69 70

Multi-Hop Wireless Ad Hoc Multi-Hop Wireless Ad Hoc Networks Networks

2 3 3 4 4 5 5 6 S 6 S 2 7 7 8 8 9 9 10 10 11 11 12 1 12 1 A C A C B B D D

R R

71 72

12 Multi-Hop Wireless Ad Hoc Multi-Hop Wireless Ad Hoc Networks Networks

3 3 4 4 5 5 6 S 6 S 7 7 8 8 2 9 9 10 10 11 11 2 1 12 2 12 TCP A A C C ACK B B 2 1 D 1 D 1 1

R R

73 74

Multi-Hop Wireless Ad Hoc Multi-Hop Wireless Ad Hoc Networks Networks

4 4 5 5 6 S 3 6 S 7 7 8 8 9 9 10 10 11 11 12 2 1 12 1 A C A 3 C B B D D 2 1 1

R R

75 76

Multi-Hop Wireless Ad Hoc Multi-Hop Wireless Ad Hoc Networks Networks

4 4 5 5 6 S 6 S 7 7 8 8 1 9 9 10 10 11 11 12 1 12 A 3 C A 3 C B B D 2 D 2 1 1

R R

77 78

13 Multi-Hop Wireless Ad Hoc Multi-Hop Wireless Ad Hoc Networks Networks

4 4 5 5 6 S 6 S 7 7 8 1 8 1 9 9 10 10 11 11 12 3 12 A C A C B B 3 D 2 D 2 1 1 2

R R

79 80

Summary

 Wireless connectivity provides a very different set of tradeoffs from wired  Much greater ease of deployment  Mobility  But: unprotected physical signaling  Complications due to interference , attenuated range  Leading to much more frequent loss  Hidden terminal and Exposed terminal problems motivate need for a different style of Media Access Control: CSMA/CA  Multihop provides applications to sensornets, citynets  But additional complications of routing, contention  Wireless devices bring new security risks  Next lecture: Quality of Service

14