CSCI-1680 Wireless

  • View

  • Download

Embed Size (px)


CSCI-1680 Wireless. Rodrigo Fonseca. Based partly on lecture notes by Scott Shenker and John Jannotti. Administrivia. Last assignment out on Thursday Changed to IP over DNS More fun  Virtual Interfaces, Raw IP, some DNS details Can actually be useful in “emergencies” - PowerPoint PPT Presentation

Text of CSCI-1680 Wireless

CSCI-1680 :: Computer Networks


Based partly on lecture notes by Scott Shenker and John JannottiRodrigo FonsecaAdministriviaLast assignment out on ThursdayChanged to IP over DNSMore fun Virtual Interfaces, Raw IP, some DNS detailsCan actually be useful in emergenciesSlight change in scheduleToday: wirelessThursday: misc network programmingNext week: security, wrap-upWirelessToday: wireless networking truly ubiquitous802.11, 3G, (4G), WiMAX, Bluetooth, RFID, Sensor networks, Internet of ThingsSome new computers have no wired networking4B cellphone subscribers vs. 1B computersWhats behind the scenes?Wireless is differentSignals sent by the sender dont always reach the receiver intactVaries with space: attenuation, multipathVaries with time: conditions change, interference, mobilityDistributed: sender doesnt know what happens at receiverWireless medium is inherently sharedNo easy way out with switchesImplicationsDifferent mechanisms neededPhysical layerDifferent knobs: antennas, transmission power, encodingsLink LayerDistributed medium access protocolsTopology awarenessNetwork, Transport LayersRouting, forwardingMost advances do not abstract away the physical and link layersPhysical LayerSpecifies physical mediumEthernet: Category 5 cable, 8 wires, twisted pair, R45 jackWiFi wireless: 2.4GHzSpecifies the signal100BASE-TX: NRZI + MLT-3 encoding802.11b: binary and quadrature phase shift keying (BPSK/QPSK)Specifies the bits100BASE-TX: 4B5B encoding802.11b @ 1-2Mbps: Barker code (1bit -> 11chips)

What can happen to signals?AttenuationSignal power attenuates by ~r2 factor for omni-directional antennas in free-spaceExponent depends on type and placement of antennas< 2 for directional antennas> 2 if antennas are close to the ground

InterferenceExternal sourcesE.g., 2.4GHz unlicensed ISM band802.11802.15.4 (ZigBee), 802.15.1 (Bluetooth)2.4GHz phonesMicrowave ovensInternal sourcesNodes in the same network/protocol can (and do) interfereMultipathSelf-interference (destructive)Multipath

Picture from Cisco, Inc.May cause attenuation, destructive interferenceSignal (+ Interference) to Noise RatioRemember Shannon?Shannon-HartleyC = 2B log2(M) bits/sec (1)But noise ruins your partyC = B log2(1 + S/N) bits/sec (2)(1) (2) => M 1 + S/NNoise limits your ability to distinguish levelsFor a fixed modulation, increases Bit Error Rate (BER)Could make signal strongerUses more energyIncreases interference to other nodesC CapacityB maximum frequency of signalM number of discrete levels per symbolWireless Modulation/EncodingMore complex than wiredModulation, Encoding, FrequencyFrequency: number of symbols per secondModulation: number of chips per symbolE.g., different phase, frequency, amplitudeEncoding: number of chips per bit (to counter errors)Example802.11b, 1Msps: 11Mcps, DBPSK, Barker Code1 chip per symbol, 11 chips/bit802.11b, 2Msps: 11Mcps, DQPSK, Barker Code2 chips per symbol, 11 chips/bitLink LayerMedium Access ControlShould give 100% if one userShould be efficient and fair if more usersEthernet uses CSMA/CDCan we use CD here?No! Collision happens at the receiverProtocols try to avoid collision in the first placeHidden TerminalsA can hear B and CB and C cant hear each otherThey both interfere at AB is a hidden terminal to C, and vice-versaCarrier sense at sender is uselessACBExposed TerminalsA transmits to BC hears the transmission, backs off, even though D would hear CC is an exposed terminal to As transmissionWhy is it still useful for C to do CS?ACBDKey pointsNo global view of collisionDifferent receivers hear different sendersDifferent senders reach different receiversCollisions happen at the receiverGoals of a MAC protocolDetect if receiver can hear senderTell senders who might interfere with receiver to shut upSimple MAC: CSMA/CAMaintain a waiting counter cFor each time channel is free, c--Transmit when c = 0When a collision is inferred, retransmit with exponential backoffUse lack of ACK from receiver to infer collisionCollisions are expensive: only full packet transmissionsHow would we get ACKs if we didnt do carrier sense?RTS/CTSIdea: transmitter can check availability of channel at receiverBefore every transmissionSender sends an RTS (Request-to-Send)Contains length of data (in time units)Receiver sends a CTS (Clear-to-Send)Sender sends dataReceiver sends ACK after transmissionIf you dont hear a CTS, assume collisionIf you hear a CTS for someone else, shut upRTS/CTSACBRTSRTS/CTSACBCTSRTS/CTSACBDataBenefits of RTS/CTSSolves hidden terminal problemDoes it?Control frames can still collideE.g., can cause CTS to be lostIn practice: reduces hidden terminal problem on data packetsDrawbacks of RTS/CTSOverhead is too large for small packets3 packets per packet: RTS/CTS/Data (4-22% for 802.11b)RTS still goes through CSMA: can be lostCTS loss causes lengthy retries33% of IP packets are TCP ACKsIn practice, WiFi doesnt use RTS/CTSOther MAC StrategiesTime Division Multiplexing (TDMA)Central controller allocates a time slot for each senderMay be inefficient when not everyone sendingFrequency DivisionMultiplexing two networks on same spaceNodes with two radios (think graph coloring)Different frequency for upload and downloadISM Band ChannelsNetwork LayerWhat about the network topology?Almost everything you use is single hop!802.11 in infrastructure modeBluetoothCellular networksWiMax (Some 4G networks)Why?Really hard to make multihop wireless efficientWiFi Distribution System802.11 typically works in infrastructure modeAccess points fixed nodes on wired networkDistribution system connects ApsTypically connect to the same Ethernet, use learning bridge to route to nodes MAC addressesAssociationNode negotiates with AP to get accessSecurity negotiated as well (WEP, WPA, etc)Passive or activeWireless Multi-Hop NetworksSome networks are multihop, though!Ad-hoc networks for emergency areasVehicular NetworksSensor NetworksE.g., infrastructure monitoringMultihop networking to share Internet accessE.g. MerakiMany ChallengesRoutingLink estimationMultihop throughput dropoff

The Routing ProblemFind a route from S to DTopology can be very dynamicRoutingRouting in ad-hoc networks has had a lot of researchGeneral problem: any-to-any routingSimplified versions: any-to-one (base station), one-to-any (dissemination)DV too brittle: inconsistencies can cause loopsDSDVDestination Sequenced Distance Vector DSDVCharles Perkins (1994)Avoid loops by using sequence numbersEach destination increments own sequence numberOnly use EVEN numbersA node selects a new parent ifNewer sequence number orSame sequence number and better routeIf disconnected, a node increments destination sequence number to next ODD number!No loops (only transient loops)Slow: on some changes, need to wait for rootMany OthersDSR, AODV: on-demandGeographic routing: use nodes physical location and do greedy routingVirtual coordinates: derive coordinates from topology, use greedy routingTree-based routing with on-demand shortcutsRouting Metrics How to choose between routes?Hopcount is a poor metric!Paths with few hops may use long, marginal linksMust find a balanceAll links do local retransmissionsIdea: use expected transmissions over a link as its cost!ETX = 1/(PRR) (Packet Reception Rate)Variation: ETT, takes data rate into accountMultihop ThroughputOnly every third node can transmit!Assuming a node can talk to its immediate neighbors(1) Nodes cant send and receive at the same time(2) Third hop transmission prevents second hop from receiving(3) Worse if you are doing link-local ACKsIn TCP, problem is worse as data and ACK packets contend for the channel!Not to mention multiple crossing flows!Draw on the board34Sometimes you cant (or shouldnt) hide that you are on wireless!Three examples of relaxing the layering abstractionExamples of Breaking AbstractionsTCP over wirelessPacket losses have a strong impact on TCP performanceSnoop TCP: hide retransmissions from TCP end-pointsDistinguish congestion from wireless losses

4B Link EstimatorUses information from Physical, Routing, and Forwarding layers to help estimate link qualityStanfords Full Duplex WirelessStatus quo: nodes cant transmit and receive at the same timeWhy? TX energy much stronger than RX energyKey insight:

With other tricks, 92% of optimal bandwidth

SummaryWireless presents many challengesAcross all layersEncoding/Modulation (were doing pretty well here)Distributed multiple access problemMultihopMost current protocols sufficient, given over provisioning (good enough syndrome)Other challengesSmooth handoff between technologies (3G, Wifi, 4G)Low-cost, long range wireless for developing regionsEnergy usage

Next TimeNetwork programmingGoing beyond sockets: a few network programming frameworksSome techniques for high performance serversVirtual Interfaces (tun/tap)

2.4GHz Band

The routing problem




Find end-to-end path (route) from S to D- Each router must find an adequate next hop

Topology may be very dynamic in ad hoc networks

Link Estimation (4B)

S Ddf


ETX = (df x dr)-1

Measuring df and dr with infrequent beacons can be highly inaccurate. Lines show percentile errors.





1.5 2 2.5 3








Average Tree Depth (hops)


mpare B


Ack Bit: Uni

dir. Est.

Ack Bit

: Unid

ir. Est.




re B


4BCTP + white bit

CTP + unidirCTP T2

MultiHopLQICost = Depth


Directly measuring ETX with the data path reduces path costs by 45%.

This requires a routing protocol can adapt to such rapid edge cost changes.