wireless networks - princeton university computer science · wireless networks reading: secon ......

35
Wireless Networks Reading: Sec5on 2.8 COS 461: Computer Networks Spring 2011 Mike Freedman hEp://www.cs.princeton.edu/courses/archive/spring11/cos461/ 1

Upload: phamdiep

Post on 24-Apr-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

WirelessNetworksReading:Sec5on2.8

COS461:ComputerNetworksSpring2011

MikeFreedmanhEp://www.cs.princeton.edu/courses/archive/spring11/cos461/

1

WidespreadDeployment

•  Worldwidecellularsubscribers–  1993:34million–  2005:morethan2billion

–  2009:morethan4billion

>landlinesubscribers

•  Wirelesslocalareanetworks–  Wirelessadaptersbuiltinto

mostlaptops,andevenPDAs

–  Morethan220,000knownWiFiloca5onsin134countries

–  Probablymany,manymore(e.g.,homenetworks,corporatenetworks,…)

2

WirelessLinksandWirelessNetworks

3

WirelessLinks:HighBitErrorRate

•  Decreasingsignalstrength– Dispersesasittravelsgreaterdistance– AEenuatesasitpassesthroughmaEer

4

WirelessLinks:HighBitErrorRate

•  Interferencefromothersources– Radiosourcesinsamefrequencyband

– E.g.,2.4GHzwirelessphoneinterfereswith802.11bwirelessLAN

– Electromagne5cnoise(e.g.,microwaveoven)

5

WirelessLinks:HighBitErrorRate

•  Mul5‐pathpropaga5on– Electromagne5cwavesreflectoffobjects

– Takingmanypathsofdifferentlengths– Causingblurringofsignalatthereceiver

6

receiver transmitter

DealingWithBitErrors

•  Wirelessvs.wiredlinks– Wired:mostlossisduetoconges5on– Wireless:higher,5me‐varyingbit‐errorrate

•  Dealingwithhighbit‐errorrates–  Sendercouldincreasetransmissionpower

•  Requiresmoreenergy(badforbaEery‐poweredhosts)•  Createsmoreinterferencewithothersenders

–  Strongererrordetec5onandrecovery•  Morepowerfulerrordetec5on/correc5oncodes

•  Link‐layerretransmissionofcorruptedframes

7

WirelessLinks:BroadcastLimita5ons

•  Wiredbroadcastlinks– E.g.,Ethernetbridging,inwiredLANs– Allnodesreceivetransmissionsfromallothernodes

•  Wirelessbroadcast:hiddenterminalproblem

8

A B

C • AandBheareachother• BandCheareachother• But,AandCdonot

So,AandCareunawareoftheirinterferenceatB

WirelessLinks:BroadcastLimita5ons

•  Wiredbroadcastlinks– E.g.,Ethernetbridging,inwiredLANs– Allnodesreceivetransmissionsfromallothernodes

•  Wirelessbroadcast:fadingoverdistance

9

A B C

A’s signal strength

space

C’s signal strength

• AandBheareachother• BandCheareachother• But,AandCdonot

So,AandCareunawareoftheirinterferenceatB

ExampleWirelessLinkTechnologies

•  Datanetworks–  802.15.1(Bluetooth):2.1Mbps–10m–  802.11b(WiFi):5‐11Mbps–100m–  802.11aandg(WiFi):54Mbps–100m–  802.11n(WiFi):200Mbps–100m

–  802.16(WiMax):70Mbps–10km

•  Cellularnetworks,outdoors–  2G:56Kbps–  3G:384Kbps–  3Genhanced:4Mbps

10

WirelessNetwork:WirelessLink11

network infrastructure

Wireless link

•  Typically used to connect mobile(s) to base station

•  Also used as backbone link •  Multiple access protocol

coordinates link access

WirelessNetwork:WirelessHosts12

network infrastructure

Wireless host

•  Laptop, PDA, IP phone •  Run applications

•  May be stationary (non-mobile) or mobile

WirelessNetwork:BaseSta5on13

network infrastructure

Base station

•  Typically connected to wired network

•  Relay responsible for sending packets between wired network and wireless host(s) in its “area”

•  E.g., cell towers, 802.11 access points

WirelessNetwork:Infrastructure14

network infrastructure

Network infrastructure

•  Larger network with which a wireless host wants to communicate

•  Typically a wired network

•  Provides traditional network services

•  May not always exist

Scenario#1:InfrastructureMode15

network infrastructure

Infrastructure mode

•  Base station connects mobiles into wired network

•  Network provides services (addressing, routing, DNS)

•  Handoff: mobile changes base station providing connection to wired network

16

Ad hoc mode

•  No base stations •  Nodes can only transmit to other

nodes within link coverage •  Nodes self-organize and route

among themselves

Scenario#2:Ad‐HocNetworks

Infrastructurevs.AdHoc

•  Infrastructuremode– Wirelesshostsareassociatedwithabasesta5on–  Tradi5onalservicesprovidedbytheconnectednetwork–  E.g.,addressassignment,rou5ng,andDNSresolu5on

•  Adhocnetworks– Wirelesshostshavenoinfrastructuretoconnectto– Hoststhemselvesmustprovidenetworkservices

•  Similarinspirittothedifferencebetween–  Client‐servercommunica5on–  Peer‐to‐peercommunica5on

17

Bluetooth:802.15.1“personal‐area‐networks”

18

Bluetoothpiconets

•  Upto7“slave”devicesand225“parked”devices•  Operatesonunlicensedwirelessspectrum

– Howtopreventinterference?

19

PHY:SpreadSpectrum–FrequencyHopping

•  Nodesrapidlyjumpbetweenfrequencies

•  Senderandreceivercoordinatedinjumps–  Howcoordinate?Pseudorandomnumbergenerator,withsharedinputknowntosender/receiver

•  IfrandomlycollidewithothertransmiEed,onlyforshortperiodbeforejumpagain

•  Bluetooth–  79frequencies,oneachfrequencyforjust625us–  EachchannelalsousesTDMA,witheachframetaking1/3/5consecu5veslots.

–  Onlymastercanstartinoddslot,slaveonlyinresponse

20

WiFi:802.11WirelessLANs

21

802.11LANArchitecture22

•  Access Point (AP) – Base station that

communicates with the wireless hosts

•  Basic Service Set (BSS) – Coverage of one AP – AP acts as the master –  Identified by an “network

name” known as an SSID BSS 1

BSS 2

Internet

hub, switch or router AP

AP

SSID: Service Set Identifier

ChannelsandAssocia5on

•  Mul5plechannelsatdifferentfrequencies–  NetworkadministratorchoosesfrequencyforAP–  InterferenceifchannelissameasneighboringAP

23

• BeaconframesfromAPs• Associaterequestfromhost• Associa5onresponsefromAP

ChannelsandAssocia5on

•  Mul5plechannelsatdifferentfrequencies–  NetworkadministratorchoosesfrequencyforAP–  InterferenceifchannelissameasneighboringAP

•  Accesspointssendperiodicbeaconframes–  ContainingAP’sname(SSID)andMACaddress

–  Hostscanschannels,listeningforbeaconframes–  Hostselectsanaccesspointtoassociatewith

24

• BeaconframesfromAPs• Associaterequestfromhost• Associa5onresponsefromAP

MobilityWithintheSameSubnet•  H1remainsinsameIPsubnet

–  IPaddressofthehostcanremainsame–  Ongoingdatatransferscancon5nueuninterrupted

•  H1recognizestheneedtochange–  H1detectsaweakeningsignal–  Startsscanningforstrongerone

•  ChangesAPswithsameSSID–  H1disassociatesfromone

–  Andassociateswithother

•  Switchlearnsnewloca5on–  Self‐learningmechanism

25

hub or switch

AP 2

AP 1

H1 BBS 2

BBS 1

router

WirelessLANaddressingandbridging26

Func5on Addr1(Receiver)

Addr2(Transmi?er)

Addr3 Addr4

Intra‐BSS Dest Source

ToAP BSSID Source Dest

FromAP Dest BSSID Source

BridgedAPs Reciever TransmiEer Dest Source

CSMA:CarrierSense,Mul5pleAccess

•  Mul5pleaccess:channelissharedmedium–  Sta5on:wirelesshostoraccesspoint– Mul5plesta5onsmaywanttotransmitatsame5me

•  Carriersense:sensechannelbeforesending–  Sta5ondoesn’tsendwhenchannelisbusy–  Topreventcollisionswithongoingtransfers–  But,detec5ngongoingtransfersisn’talwayspossible

27

A B

C A B C

A’s signal strength

space

C’s signal strength

CA:CollisionAvoidance,NotDetec5on

•  Collisiondetec5oninwiredEthernet–  Sta5onlistenswhiletransmiong– Detectscollisionwithothertransmission– Abortstransmissionandtriessendingagain

•  Problem#1:cannotdetectallcollisions– Hiddenterminalproblem–  Fading

28

CA:CollisionAvoidance,NotDetec5on

•  Collisiondetec5oninwiredEthernet–  Sta5onlistenswhiletransmiong– Detectscollisionwithothertransmission– Abortstransmissionandtriessendingagain

•  Problem#1:cannotdetectallcollisions– Hiddenterminalproblem–  Fading

•  Problem#2:listeningwhilesending–  Strengthofreceivedsignalismuchsmaller–  Expensivetobuildhardwarethatdetectscollisions

•  So,802.11doescollisionavoidance,notdetec5on

29

HiddenTerminalProblem

•  AandCcan’tseeeachother,bothsendtoB

•  Occursb/c802.11reliesonphysicalcarriersensing,whichissuscep5bletohiddenterminalproblem

30

CBA

Virtualcarriersensing

•  Firstexchangecontrolframesbeforetransmiongdata–  Senderissues“RequesttoSend”(RTS),incl.lengthofdata–  Receiverrespondswith“CleartoSend”(CTS)

•  IfsenderseesCTS,transmitsdata(ofspecifiedlength)

•  IfothernodeseesCTS,willidleforspecifiedperiod

•  IfothernodeseesRTSbutnotCTS,freetosend

31

HiddenTerminalProblem

•  AandCcan’tseeeachother,bothsendtoB

•  RTS/CTScanhelp–  BothAandCwouldsendRTSthatBwouldseefirst–  BonlyrespondswithoneCTS(say,echo’ingA’sRTS)–  CdetectsthatCTSdoesn’tmatchandwon’tsend

32

CBA

ExposedTerminalProblem

•  BsendingtoA,CwantstosendtoD•  AsCreceivesB’spackets,carriersensewouldpreventitfromsendingtoD,eventhoughwouldn’tinterfere

•  RTS/CTScanhelp–  ChearsRTSfromB,butnotCTSfromA–  Cknowsit’stransmissionwillnotinterferewithA

–  CissafetotransmittoD

33

CBA D

ImpactonHigher‐LayerProtocols

•  Wirelessandmobilitychangepathproper5es– Wireless:higherpacketloss,notfromconges5on– Mobility:transientdisrup5ons,andchangesinRTT

•  Logically,impactshouldbeminimal…–  Best‐effortservicemodelremainsunchanged–  TCPandUDPcan(anddo)runoverwireless,mobile

•  But,performancedefinitelyisaffected–  TCPtreatspacketlossasasignofconges5on–  TCPtriestoes5matetheRTTtodriveretransmissions–  TCPdoesnotperformwellunderout‐of‐orderpackets

•  Internetnotdesignedwiththeseissuesinmind

34

Conclusions

•  Wireless– AlreadyamajorwaypeopleconnecttotheInternet– Graduallybecomingmorethanjustanaccessnetwork

•  Mobility(notdiscussed)–  Today’suserstoleratedisrup5onsastheymove– …andapplica5onstrytohidetheeffects–  Tomorrow’susersexpectseamlessmobility

•  Challengesthedesignofnetworkprotocols– Wirelessbreakstheabstrac5onofalink,andtheassump5onthatpacketlossimpliesconges5on

– Mobilitybreaksassocia5onofaddressandloca5on– Higher‐layerprotocolsdon’tperformaswell

35