wireless networks - princeton university computer science · – wireless hosts are associated with...

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: others

Post on 01-Jan-2021

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Wireless Networks - Princeton University Computer Science · – Wireless hosts are associated with a base staon – Tradional services provided by the connected network – E.g.,

WirelessNetworksReading:Sec5on2.8

COS461:ComputerNetworksSpring2011

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

1

Page 2: Wireless Networks - Princeton University Computer Science · – Wireless hosts are associated with a base staon – Tradional services provided by the connected network – E.g.,

WidespreadDeployment

•  Worldwidecellularsubscribers–  1993:34million–  2005:morethan2billion

–  2009:morethan4billion

>landlinesubscribers

•  Wirelesslocalareanetworks–  Wirelessadaptersbuiltinto

mostlaptops,andevenPDAs

–  Morethan220,000knownWiFiloca5onsin134countries

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

2

Page 3: Wireless Networks - Princeton University Computer Science · – Wireless hosts are associated with a base staon – Tradional services provided by the connected network – E.g.,

WirelessLinksandWirelessNetworks

3

Page 4: Wireless Networks - Princeton University Computer Science · – Wireless hosts are associated with a base staon – Tradional services provided by the connected network – E.g.,

WirelessLinks:HighBitErrorRate

•  Decreasingsignalstrength– Dispersesasittravelsgreaterdistance– AEenuatesasitpassesthroughmaEer

4

Page 5: Wireless Networks - Princeton University Computer Science · – Wireless hosts are associated with a base staon – Tradional services provided by the connected network – E.g.,

WirelessLinks:HighBitErrorRate

•  Interferencefromothersources– Radiosourcesinsamefrequencyband

– E.g.,2.4GHzwirelessphoneinterfereswith802.11bwirelessLAN

– Electromagne5cnoise(e.g.,microwaveoven)

5

Page 6: Wireless Networks - Princeton University Computer Science · – Wireless hosts are associated with a base staon – Tradional services provided by the connected network – E.g.,

WirelessLinks:HighBitErrorRate

•  Mul5‐pathpropaga5on– Electromagne5cwavesreflectoffobjects

– Takingmanypathsofdifferentlengths– Causingblurringofsignalatthereceiver

6

receiver transmitter

Page 7: Wireless Networks - Princeton University Computer Science · – Wireless hosts are associated with a base staon – Tradional services provided by the connected network – E.g.,

DealingWithBitErrors

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

•  Dealingwithhighbit‐errorrates–  Sendercouldincreasetransmissionpower

•  Requiresmoreenergy(badforbaEery‐poweredhosts)•  Createsmoreinterferencewithothersenders

–  Strongererrordetec5onandrecovery•  Morepowerfulerrordetec5on/correc5oncodes

•  Link‐layerretransmissionofcorruptedframes

7

Page 8: Wireless Networks - Princeton University Computer Science · – Wireless hosts are associated with a base staon – Tradional services provided by the connected network – E.g.,

WirelessLinks:BroadcastLimita5ons

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

•  Wirelessbroadcast:hiddenterminalproblem

8

A B

C • AandBheareachother• BandCheareachother• But,AandCdonot

So,AandCareunawareoftheirinterferenceatB

Page 9: Wireless Networks - Princeton University Computer Science · – Wireless hosts are associated with a base staon – Tradional services provided by the connected network – E.g.,

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

Page 10: Wireless Networks - Princeton University Computer Science · – Wireless hosts are associated with a base staon – Tradional services provided by the connected network – E.g.,

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

Page 11: Wireless Networks - Princeton University Computer Science · – Wireless hosts are associated with a base staon – Tradional services provided by the connected network – E.g.,

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

Page 12: Wireless Networks - Princeton University Computer Science · – Wireless hosts are associated with a base staon – Tradional services provided by the connected network – E.g.,

WirelessNetwork:WirelessHosts12

network infrastructure

Wireless host

•  Laptop, PDA, IP phone •  Run applications

•  May be stationary (non-mobile) or mobile

Page 13: Wireless Networks - Princeton University Computer Science · – Wireless hosts are associated with a base staon – Tradional services provided by the connected network – E.g.,

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

Page 14: Wireless Networks - Princeton University Computer Science · – Wireless hosts are associated with a base staon – Tradional services provided by the connected network – E.g.,

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

Page 15: Wireless Networks - Princeton University Computer Science · – Wireless hosts are associated with a base staon – Tradional services provided by the connected network – E.g.,

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

Page 16: Wireless Networks - Princeton University Computer Science · – Wireless hosts are associated with a base staon – Tradional services provided by the connected network – E.g.,

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

Page 17: Wireless Networks - Princeton University Computer Science · – Wireless hosts are associated with a base staon – Tradional services provided by the connected network – E.g.,

Infrastructurevs.AdHoc

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

•  Adhocnetworks– Wirelesshostshavenoinfrastructuretoconnectto– Hoststhemselvesmustprovidenetworkservices

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

17

Page 18: Wireless Networks - Princeton University Computer Science · – Wireless hosts are associated with a base staon – Tradional services provided by the connected network – E.g.,

Bluetooth:802.15.1“personal‐area‐networks”

18

Page 19: Wireless Networks - Princeton University Computer Science · – Wireless hosts are associated with a base staon – Tradional services provided by the connected network – E.g.,

Bluetoothpiconets

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

– Howtopreventinterference?

19

Page 20: Wireless Networks - Princeton University Computer Science · – Wireless hosts are associated with a base staon – Tradional services provided by the connected network – E.g.,

PHY:SpreadSpectrum–FrequencyHopping

•  Nodesrapidlyjumpbetweenfrequencies

•  Senderandreceivercoordinatedinjumps–  Howcoordinate?Pseudorandomnumbergenerator,withsharedinputknowntosender/receiver

•  IfrandomlycollidewithothertransmiEed,onlyforshortperiodbeforejumpagain

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

–  Onlymastercanstartinoddslot,slaveonlyinresponse

20

Page 21: Wireless Networks - Princeton University Computer Science · – Wireless hosts are associated with a base staon – Tradional services provided by the connected network – E.g.,

WiFi:802.11WirelessLANs

21

Page 22: Wireless Networks - Princeton University Computer Science · – Wireless hosts are associated with a base staon – Tradional services provided by the connected network – E.g.,

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

Page 23: Wireless Networks - Princeton University Computer Science · – Wireless hosts are associated with a base staon – Tradional services provided by the connected network – E.g.,

ChannelsandAssocia5on

•  Mul5plechannelsatdifferentfrequencies–  NetworkadministratorchoosesfrequencyforAP–  InterferenceifchannelissameasneighboringAP

23

• BeaconframesfromAPs• Associaterequestfromhost• Associa5onresponsefromAP

Page 24: Wireless Networks - Princeton University Computer Science · – Wireless hosts are associated with a base staon – Tradional services provided by the connected network – E.g.,

ChannelsandAssocia5on

•  Mul5plechannelsatdifferentfrequencies–  NetworkadministratorchoosesfrequencyforAP–  InterferenceifchannelissameasneighboringAP

•  Accesspointssendperiodicbeaconframes–  ContainingAP’sname(SSID)andMACaddress

–  Hostscanschannels,listeningforbeaconframes–  Hostselectsanaccesspointtoassociatewith

24

• BeaconframesfromAPs• Associaterequestfromhost• Associa5onresponsefromAP

Page 25: Wireless Networks - Princeton University Computer Science · – Wireless hosts are associated with a base staon – Tradional services provided by the connected network – E.g.,

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

Page 26: Wireless Networks - Princeton University Computer Science · – Wireless hosts are associated with a base staon – Tradional services provided by the connected network – E.g.,

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

Page 27: Wireless Networks - Princeton University Computer Science · – Wireless hosts are associated with a base staon – Tradional services provided by the connected network – E.g.,

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

Page 28: Wireless Networks - Princeton University Computer Science · – Wireless hosts are associated with a base staon – Tradional services provided by the connected network – E.g.,

CA:CollisionAvoidance,NotDetec5on

•  Collisiondetec5oninwiredEthernet–  Sta5onlistenswhiletransmiong– Detectscollisionwithothertransmission– Abortstransmissionandtriessendingagain

•  Problem#1:cannotdetectallcollisions– Hiddenterminalproblem–  Fading

28

Page 29: Wireless Networks - Princeton University Computer Science · – Wireless hosts are associated with a base staon – Tradional services provided by the connected network – E.g.,

CA:CollisionAvoidance,NotDetec5on

•  Collisiondetec5oninwiredEthernet–  Sta5onlistenswhiletransmiong– Detectscollisionwithothertransmission– Abortstransmissionandtriessendingagain

•  Problem#1:cannotdetectallcollisions– Hiddenterminalproblem–  Fading

•  Problem#2:listeningwhilesending–  Strengthofreceivedsignalismuchsmaller–  Expensivetobuildhardwarethatdetectscollisions

•  So,802.11doescollisionavoidance,notdetec5on

29

Page 30: Wireless Networks - Princeton University Computer Science · – Wireless hosts are associated with a base staon – Tradional services provided by the connected network – E.g.,

HiddenTerminalProblem

•  AandCcan’tseeeachother,bothsendtoB

•  Occursb/c802.11reliesonphysicalcarriersensing,whichissuscep5bletohiddenterminalproblem

30

CBA

Page 31: Wireless Networks - Princeton University Computer Science · – Wireless hosts are associated with a base staon – Tradional services provided by the connected network – E.g.,

Virtualcarriersensing

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

•  IfsenderseesCTS,transmitsdata(ofspecifiedlength)

•  IfothernodeseesCTS,willidleforspecifiedperiod

•  IfothernodeseesRTSbutnotCTS,freetosend

31

Page 32: Wireless Networks - Princeton University Computer Science · – Wireless hosts are associated with a base staon – Tradional services provided by the connected network – E.g.,

HiddenTerminalProblem

•  AandCcan’tseeeachother,bothsendtoB

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

32

CBA

Page 33: Wireless Networks - Princeton University Computer Science · – Wireless hosts are associated with a base staon – Tradional services provided by the connected network – E.g.,

ExposedTerminalProblem

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

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

–  CissafetotransmittoD

33

CBA D

Page 34: Wireless Networks - Princeton University Computer Science · – Wireless hosts are associated with a base staon – Tradional services provided by the connected network – E.g.,

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

Page 35: Wireless Networks - Princeton University Computer Science · – Wireless hosts are associated with a base staon – Tradional services provided by the connected network – E.g.,

Conclusions

•  Wireless– AlreadyamajorwaypeopleconnecttotheInternet– Graduallybecomingmorethanjustanaccessnetwork

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

•  Challengesthedesignofnetworkprotocols– Wirelessbreakstheabstrac5onofalink,andtheassump5onthatpacketlossimpliesconges5on

– Mobilitybreaksassocia5onofaddressandloca5on– Higher‐layerprotocolsdon’tperformaswell

35