840 likes | 991 Views
Wireless Networking: Physical and Link Layer. Prasun Dewan. Department of Computer Science University of North Carolina dewan@unc.edu. Wired Can have point to point connection Not a scarce medium Reliable Communicating devices plentiful power. Wireless Broadcast medium (within range)
E N D
Wireless Networking: Physical and Link Layer Prasun Dewan Department of Computer Science University of North Carolina dewan@unc.edu
Wired Can have point to point connection Not a scarce medium Reliable Communicating devices plentiful power Wireless Broadcast medium (within range) Scarce medium Unreliable Communicating devices have scarce power Wired vs. Wireless
Wireless Personal Area Networking Replaces cables between devices Short range (< 10 m) Low cost Isochronous Cordless telephony/headsets Peer to peer (ad hoc) One device in multiple networks Wireless LAN Replaces Wired LANS LAN-sized distance Higher cost acceptable No flow guarantees Device to (wired) router backbone to device Bluetooth vs IEEE 802.11b
Bluetooth Issues Wireless Personal Area Networking Replaces cables between devices Short range (< 10 m) Low cost Isochronous Cordless telephony/headsets Peer to peer (ad hoc) Absolute location irrelevant One device in multiple networks Wireless Broadcast medium (within range) Scarce medium Unreliable Communicating devices have scarce power Bluetooth Goals
Piconet (from paper) • Master connected to <= 7 slaves
Topologies (from paper) Contention • Multiplexing
The Multiplexing Problem frequency A wireless channel (how to divide resource among multiple recipients?) time Analogy: a highway shared by many users from Zhang@UT ‘02
Frequency-Division Multiplexing frequency user 1 user 2 user 3 user 4 guard-band time Analogy: a highway has multiple lanes from Zhang@UT ‘02
Time-Division Multiplexing frequency user 1 user 2 user 3 user 4 user 1 user 2 guard-band time Requirement: precise time coordination from Zhang@UT ‘02
Frequency-Time-Division frequency time-slot (usually of the same size) time Analogy: a highway has many cars from Zhang@UT ‘02
BlueTooth Choice • Frequency-time division (frequency hopping) for reducing inter-piconet interference • Static division difficult in dynamic environment. • Assume probability of contention is low • Issues • How to agree on frequency hopping pattern? • What to do when there is contention?
Frequency Hopping (from paper) • Use a well defined hopping pattern sequence for each piconet.
Hop Selection (from paper) • Each Piconet has a master. • Master identity chooses sequence • Clock chooses index (phase) in sequence. • Offset established at connection time
Connection Establishment • Cellular systems • Common control channel • Need something for ad hoc systems • Must conserve power • Wake up sequence • 32 unique hops • Spans 64Mhz of the 80 Mhz spectrum • Pseudo random and unique per device • Phase selected by clock • Clock schedules wake up event every 10 ms • Listens to next frequency for 10 ms and sleeps again • More the sleep time • Less power consumption • Slower response time to paging unit (master)
Frequency time uncertainty • Uncertainty when paged unit will wake up and at what frequency • Burden on paging unit rather than paged unit • to keep idle energy consumption low • Paging unit knows identity of paged unit and hence wake-up sequence • Repeatedly polls for device
Polling for Device (from paper) • Polls every 1.25 ms • Each poll two messages sent and possibly received • Consecutive polls use different frequencies • In 10ms (sleep period) 16 frequencies visited (half sequence) • After sleeping period over, tries other 16 frequencies • One frequency in common because device clock progresses • Maximum delay – twice (thrice?) sleeping period
Max Wakeup Time • Slave wakes up for 10ms • In this 10 ms 16 frequencies tried • F(i), .. F(i+15) • Not one of the scan frequencies • Device sleeps for 10ms • the pager transmits on F(i-15), … F(i) • Can take 30ms if it wakes up to F(i)
Frequency time uncertainty • Devices may establish connections repeatedly • Use information about device clock from last connection • Possible drift may have occurred • Clock estimate: k’ • Hop frequency: f(k’) • In 10 ms sends data at: • f(k’-8), f(k’-7), f(k’-6), …, f(k’), f(k’+1), …, f(k’+8) • Assuming accuracy within 250 ppm • Clock estimate k’ useful 5hrs after last connection
Finding device id • Send inquiry message to all devices within range • Get back address and clock • 32-hop inquiry sequence • For return a random backoff algorithm used
Media Access • To Coordinate Competing Requests (for the same resource) • MAC from Wired Medium Unsuitable • Special Features of Wireless Medium • Hidden Terminals, exposed Terminals, Near/Far Terminals • Example: Carrier Sense Multiple Access with Collision Detection (CSMA/CD) • send as soon as the medium is free, listen into the medium if a collision occurs
The Hidden Terminal Problem A B C • A sends to B, C cannot receive A • C wants to send to B • If use CSMA/CD: • C senses a “free” medium, thus C sends to A • Collision at B, but A cannot detect the collision • Therefore, A is “hidden” for C from Zhang@UT ‘02
The Exposed Terminal Problem A B C D • B sends to A, C wants to send to D • If use CSMA/CD • C senses an “in-use” medium, thus C waits • But A is outside the radio range of C, therefore waiting is not necessary • Therefore, C is “exposed” to B from Zhang@UT ‘02
The Near and Far Terminal Problem A C B • A and B send to C • Friis Law (power decay proportional to distance square) • B drowns out A’s signal (at the physical layer), so C cannot receive A
Addressing Contention • Time division multiplexing to prevent intra-piconet interference
Time Division Multiplexing • Alternating master and slave slots • Master slot says which slave goes next • Master polls slaves for slave-initiated communication
Addressing Contention • Time division multiplexing to prevent intra-piconet interference • Inter-piconet contention? • ack packet at link layer • also accounts for errors
Radio Propagation detection of signal; communication impossible communication The Friis free space propagation model: Pr 1/d2 transmitter d (receiving power is inverse proportional to the distance square) receiver becomes an interference source, background noise from Zhang@UT’02
But We Are Not Living in Vacuum Additional Influences to Signal Propagation: Reflection (on large obstacles) Scattering (on small obstacles) Diffraction (at edges) from Zhang@UT’02
Multi-Path Propagation Signal can take many different paths between transmitter and receiver due to reflection, scattering, and diffraction. signal at receiver signal at sender The physical layer is very complicated. from Zhang@UT’02
Ack/Nacks • Between receiving and transmission time (200 micro sec) • Must determine if previous or new packet should be sent • Determine if received message should be acked/nacked • Determines size of received packet
Multiple packet sizes • Can send messages with odd number of slots • Because receiving occurs on an odd slot • Max packet size – 5 slots
Packet Structure • Access code identifies master (a la network id) • Address identifies slave (max of 7 slaves) • ARQN (Automatic Repeat Request) • HEC (Header Error Check Code) Type • ID only packet (signalling) • NULL (Link info) • POLL packet • Clock synchronization • Synchronous and Asynchronous packets
Guaranteeing Flows • Cordless telephony/headsets have real-time constraints. • Reserve slots for synchronous traffic
Power Management • Idle • Before connection established • Scans for 10 ms every 1.28 to 3.84s • Duty cycle = 1% • Park • Piconet established • Lower duty cycle • Keep resynchronizing clocks periodically • SNIFF • Wake up every N master-to-slave slots • Connected • Transmit when useful data • Absence of response implies NACK • Can send NULL packet for link info • If access code does not match go back to sleeping • Periodic clock synchronization packets
Security Shorter range helps For each set of devices that must work together • User must generate a secret key • By entering pin at each device • Authentication carried out at connection stage • Must ensure that result of authentication not stored • Result depends on a random number • Encryption carried out for each message • Should prevent replay of messages • Random number generated at start of connection • Random number and slot used to influence content of message
Authentication Devices authenticate each other • Claimant sends 48 bit address to verifier • Verifier sends 128 bit random number as challenge • Claimant sends to verifier 32 bit SRES (Secure Hash Function) based on • Address • Random number • Secret key • Verifier computes its own SRES and compares • Claimant also generates 96 bit cipher offset used for encryption of messages
Wireless Personal Area Networking Replaces cables between devices Short range (< 10 m) Low cost Isochronous Cordless telephony/headsets Peer to peer (ad hoc) One device in multiple networks Wireless LAN Replaces Wired LANS LAN-sized distance Higher cost acceptable No flow guarantees Device to (wired) router backbone to device Bluetooth vs IEEE 802.11b
Infrastructure Mode (from paper) Wired Access Point Wireless User Station
802.11 Architecture Distribution System (DS) AP AP Basic Service Set (BSS) Basic Service Set (BSS) station Ethernet addr Extended Service Set (ESS) From Zhang@02
Ad Hoc Mode (from paper) Wired User Station Wireless User Station
Issues • High bandwidth • 10MB • Contention • Roaming • Synchronous (time-bound traffic) • Power Management • Security
High Bandwidth • Like Bluetooth uses 2.4GHz ISM band • Original 802.11 used frequency hopping and created 75 1-Mhz sub channels • Max speed 2 Mbps • 802.11b divides band into 14 22-Mhz channels statically assigned to access points • 3 of 14 are not overlapping • Adjacent access points use non overlapping frequencies • 5.5 Mbps and 11 Mbps • Direct Sequence Signalling
Data Rate Specification (from paper) Dynamic rate shifting • Data rates adjusted automatically • Done in physical layer