1.38k likes | 1.43k Views
Wireless Internet: Protocols and Performance. Carey Williamson iCORE Professor Department of Computer Science University of Calgary. Tutorial Outline. 1. Introduction/Motivation (10 min) 2. Networking Terminology (10 min) 3. IEEE 802.11b WLANs (30 min) 4. TCP (20 min) 5. HTTP (15 min)
E N D
Wireless Internet:Protocols and Performance Carey Williamson iCORE Professor Department of Computer Science University of Calgary Wireless 2003 Tutorial
Tutorial Outline • 1. Introduction/Motivation (10 min) • 2. Networking Terminology (10 min) • 3. IEEE 802.11b WLANs (30 min) • 4. TCP (20 min) • 5. HTTP (15 min) • 6. Wireless TCP Performance: Part 1 (15 min) • 7. Wireless TCP Performance: Part 2 (15 min) • 8. Wireless Web Performance (30 min) • 9. Summary, Questions, Discussion (10 min) ---- Coffee Break Here ---- (10:30-10:45am) Wireless 2003 Tutorial
1. Wireless Internet:Introduction Wireless 2003 Tutorial
What Is Wireless Networking? • The use of infra-red (IR) or radio frequency (RF) signals to share information and resources between devices • A hot computer industry buzzword: • Lots of advertising by companies and media • Wireless Broadband, 3G wireless, 4G, WAP, iMode, Bluetooth, WiFi • Mobile Internet, Pervasive Computing, Nomadic Computing, M-commerce • Ubiquitous; Global; Revolutionary Wireless 2003 Tutorial
IEEE 802.11 Fast (11b) High Power Long range Single-purpose Ethernet replacement Easily Available Apple Airport, iBook, G4 Cisco Aironet 350 Bluetooth Slow Low Power Short range Flexible Cable replacement “Vapourware” (?) Two Popular 2.4 GHz Standards: Wireless 2003 Tutorial
IEEE 802.11 Organization Tree: Wireless 2003 Tutorial
Pros and Cons of 802.11: • Pro: • High bandwidth (up to 11 Mbps) • Two modes of operation: infrastructure vs. ad hoc • Con: • Incompatibility between old and new cards • Signal blocked by reinforced concrete or tinted glass • High channel BER can degrade performance (lots!) • No standard for hand-off between base stations • Some channel numbers overlap spectrum • High power consumption in laptops Wireless 2003 Tutorial
Bluetooth • Think USB, not Ethernet • Cable replacement technology • Created by Ericsson • PAN - Personal Area Network • 1-2 Mbps connections • 1600 hops per second FHSS • Includes synchronous, asynchronous, voice connections • Piconet routing • Small, low-power, short-range, cheap, versatile radios • Used as Internet connection, phone, or headset • Master/slave configuration and scheduling Wireless 2003 Tutorial
Security • Wireless sniffers, “war driving” • IEEE 802.11: • ESSID – Extended Services Set ID • WEP – Wired Equivalent Privacy (useless) • NAT - Network Address Translation (firewall) • Bluetooth Security • FHSS, with rapid hop sequence • Short range • Encrypted transmissions (optional) Wireless 2003 Tutorial
Guerrilla.net • An underground alternative to the wired Internet • A grassroots movement established in 1996 • 802.11 Wireless LAN cards • Roof mounted antennae • Free software (FreeBSD) • Multi-hop routing, Internet connectivity • About $500 per node (and dropping) • Other networks popping up in SF, Seattle, London Wireless 2003 Tutorial
Future of Wireless • Higher data rates • Better security • Wider selection of products • Lower prices • Zero configuration networking • More end-user focus • Better software • Less visible • More popular Wireless 2003 Tutorial
2. Background:Networking Terminology Wireless 2003 Tutorial
Wireless Internet Technologies • Mobile devices (e.g., notebooks, laptops, PDAs, cell phones, wearable computers) • Wireless network access • Bluetooth (1 Mbps, up to 3 meters) • IEEE 802.11b (11 Mbps, up to 100 meters) • IEEE 802.11a (55 Mbps, up to 20 meters) • Operating modes: • Infrastructure mode (access point) • Ad hoc mode • Wireless Web, WiFi “hot spots” Wireless 2003 Tutorial
Application: supporting network applications and end-user services FTP, SMTP, HTTP, DNS, NTP Transport: end to end data transfer TCP, UDP Network: routing of datagrams from source to destination IPv4, IPv6, BGP, RIP, routing protocols Data Link: hop by hop frames, channel access, flow/error control PPP, Ethernet, IEEE 802.11b Physical: raw transmission of bits Application Transport Network Data Link Physical Internet Protocol Stack 001101011... Wireless 2003 Tutorial
Application: e.g., Hyper-Text Transfer Protocol (HTTP) Transport: Transmission Control Protocol (TCP) User Datagram Protocol (UDP) Network: Internet Protocol (IP, IPv4, IPv6) Data Link: e.g., IEEE 802.3 Ethernet, IEEE 802.11b Physical: Device specific, network specific Application Transport Network Data Link Physical Internet Protocol Stack 001101011... Wireless 2003 Tutorial
Multi-Hop Wireless Ad Hoc Networks • Routing protocols used to improve wireless connections • Infrastructure-free, dynamic • True Peer-to-Peer routing • Fault tolerant • Examples: AODV, DSDV, TORA, DSR, ... Wireless 2003 Tutorial
Example: • Multi-hop “ad hoc” networking Kelly Carey Wireless 2003 Tutorial
3. IEEE 802.11bWireless LANs Wireless 2003 Tutorial
The Basics • In several respects, the IEEE 802.11b wireless LAN (WLAN) standard is similar to that for IEEE 802.3 (Ethernet) LANs • Similarities: • LAN; limited geographic coverage; multiple stations; shared transmission medium; CSMA-based Medium Access Control protocol; 48-bit MAC addresses; comparable data rates (11 Mbps vs 10 Mbps) Wireless 2003 Tutorial
The Basics (Cont’d) • But there are also distinct differences: • wireless (air interface) versus wired (coax) • wireless propagation environment (multipath) • higher error rate due to interference, etc. • successful frames are ACKed by receiver • mobile stations; “hidden node” problem; potential asymmetries • CSMA/CA versus CSMA/CD • multiple data transmission rates (1, 2, 5.5, 11) Wireless 2003 Tutorial
Some Features • Infrastructure mode vs “ad hoc” mode • Access Point (AP) sends “beacon frames” • Mobiles choose AP based on signal strength • Multiple channel access protocols supported • CSMA/CA (DCF); PCF; RTS/CTS • MAC-layer can provide error control, retransmission, rate adaptation, etc. • Direct Sequence Spread Spectrum (DSSS) • signal spread across 14 22-MHz channels Wireless 2003 Tutorial
Where Does Wireless RF Live?ISM Band: Industrial, Scientific, Medical 902-928 MHz 2400-2483.5 MHz 5725-5850 MHz Old Wireless 802.11a 802.11/802.11b Bluetooth Cordless Phones Home RF Baby Monitors Microwave Ovens Wireless 2003 Tutorial
Application Telnet, FTP, Email, Web, etc. Presentation Session TCP, UDP Transport IP, ICMP, IPX Network Logical Link Control - 802.2 (Interface to the upper layer protocols) Data Link MAC Wireless lives at Layers 1 & 2 only! 802.3, 802.5, 802.11 Physical Layer Convergence Protocol Physical LAN: 10BaseT, 10Base2, 10BaseFL WLAN: FHSS, DSSS, IR Where does 802.11 live in the OSI? Wireless 2003 Tutorial
Wireless Cells Access Point coverage area is called a “Cell” Access Point Channel 6 ESSID: NAI Range per Access Point is 100m • In Canada/US, there are eleven 802.11 channels • Only channels 1, 6 and 11 are non-overlapping • Each Access Point coverage area is called a “Cell” • Computers can roam between cells 11 Mbps bandwidth “shared” by all devices in the Cell! Wireless 2003 Tutorial
Wireless Cells 1 1 6 11 11 1 Computers can roam between cells Wireless 2003 Tutorial
CSMA-CA + Acknowledgement Carrier Sense Multiple Access with Collision Avoidance How CSMA-CA works: • Device wanting to transmit senses the medium (Air) • If medium is busy - defers • If medium is free for certain period (DIFS) - transmits frame Latency can increase if “air” is very busy! Device has hard time finding “open air” to send frame! • DIFS - Distributed Inter-Frame Space (approx 128 µs) Wireless 2003 Tutorial
CSMA-CA + Acknowledgement Carrier Sense Multiple Access with Collision Avoidance others source destination “Air” is free for DIFS time period DIFS data send frame All other devices must defer while “air” is busy NAV: defer access SIFS Receive ACK back that frame was received intact! ack • Every frame is ack’ed - except broadcast and multicast! • SIFS - Short Inter-Frame Space (approx 28 µs) Wireless 2003 Tutorial
MAC-Layer Retransmission • If no ACK received “right away”, then the sender retransmits the frame again at the MAC layer • indicates frame (or ACK) was lost/corrupted • very short timeout (e.g., 1 msec) • exponential backoff (doubling) if repeated loss • Typically recovers before TCP would notice • Max retransmission limit (e.g., 8) • May do MAC-layer rate adaptation or frame fragmentation if channel error rate is high Wireless 2003 Tutorial
Other MAC Protocols Supported • Point Coordination Function (PCF) • AP polls stations in turn to see if frames to send • useful for real-time traffic • Request-To-Send/Clear-To-Send (RTS/CTS) • reservation-based approach (ask permission) • useful for very large frames • useful for solving the “hidden node” problem • request asks for clearance (permission) to send • request also indicates time required for transmit Wireless 2003 Tutorial
Frame Formats • Two frame formats available: • long preamble • short preamble • Configuration option for NIC and AP • Variable-size frames (max 2312 data bytes) • 16-bit Cyclic Redundancy Code (CRC) for error checking of frames Wireless 2003 Tutorial
Transmitted at 1 Mbps Signal Speed 1,2,5.5,11 Mbps Length of Payload 16 bit Start Frame Delimiter 16 bit CRC Service (unused) Payload 0-2312 bytes 128 bit Preamble (Long) Transmitted at X Mbps Long Preamble Long Preamble = 144 bits • Interoperable with older 802.11 devices • Entire Preamble and 48 bit PLCP Header sent at 1 Mbps Wireless 2003 Tutorial
Transmitted at 1 Mbps Transmitted at X Mbps Short Preamble Short Preamble = 72 bits • Preamble transmitted at 1 Mbps • PLCP Header transmitted at 2 Mbps • more efficient than long preamble Transmitted at 2 Mbps Signal Speed 1,2,5.5,11 Mbps Length of Payload 16 bit Start Frame Delimiter 16 bit CRC Service (unused) Payload 0-2312 bytes 56 bit Preamble Wireless 2003 Tutorial
Even More Features • Power Management • mobile nodes can “sleep” to save power • AP will buffer frames until client requests them • AP can use virtual bitmap field in beacons to indicate which stations have data waiting • Security • Wired Equivalent Privacy (WEP) • not secure at all! Wireless 2003 Tutorial
Summary • IEEE 802.11b (WiFi) is a wireless LAN technology that is rapidly growing in popularity • Convenient, inexpensive, easy to use • Growing number of “hot spots” everywhere • airports, hotels, bookstores, Starbucks, etc • Estimates: 70% of WLANs are insecure! Wireless 2003 Tutorial
4. TCP 101:Transmission Control Protocol Wireless 2003 Tutorial
Tutorial: TCP 101 • The Transmission Control Protocol (TCP) is the protocol that sends your data reliably • Used for email, Web, ftp, telnet, p2p,… • Makes sure that data is received correctly: right data, right order, exactly once • Detects and recovers from any problems that occur at the IP network layer • Mechanisms for reliable data transfer: sequence numbers, acknowledgements, timers, retransmissions, flow control... Wireless 2003 Tutorial
SYN SYN/ACK ACK GET URL FIN FIN/ACK ACK TCP 101 (Cont’d) • TCP is a connection-oriented protocol YOUR DATA HERE Web Client Web Server Wireless 2003 Tutorial
ACK TCP 101 (Cont’d) • TCP slow-start and congestion avoidance Wireless 2003 Tutorial
ACK TCP 101 (Cont’d) • TCP slow-start and congestion avoidance Wireless 2003 Tutorial
ACK TCP 101 (Cont’d) • TCP slow-start and congestion avoidance Wireless 2003 Tutorial
TCP 101 (Cont’d) • This (exponential growth) “slow start” process continues until either: • packet loss: after a brief recovery phase, you enter a (linear growth) “congestion avoidance” phase based on slow-start threshold found • limit reached: slow-start threshold, or maximum advertised receive window size • all done: terminate connection and go home Wireless 2003 Tutorial
Tutorial: TCP 201 • There is a beautiful way to plot and visualize the dynamics of TCP behaviour • Called a “TCP Sequence Number Plot” • Plot packet events (data and acks) as points in 2-D space, with time on the horizontal axis, and sequence number on the vertical axis • Example: Consider a 14-packet transfer Wireless 2003 Tutorial
+ Key: X Data Packet + Ack Packet X + X + X + X + X SeqNum + X + X X + + X + X + X + X + X + X Time Wireless 2003 Tutorial
So What? • What can it tell you? • Everything!!! Wireless 2003 Tutorial
+ Key: X Data Packet + Ack Packet X + X + X + X + X SeqNum + X + X X + + X + X + X + X + X + X Time RTT Wireless 2003 Tutorial
+ Key: X Data Packet + Ack Packet X + X + X + X + X SeqNum + X + X X + + X + X + X TCP Seg. Size + X + X + X Time Wireless 2003 Tutorial
+ Key: X Data Packet + Ack Packet X + X + X + X + X SeqNum + X + X X + + X + X + X + X + X + X Time TCP Connection Duration Wireless 2003 Tutorial
+ Key: X Data Packet + Ack Packet X + X + X + X + X SeqNum + X + X X + Num Bytes Sent + X + X + X + X + X + X Time Wireless 2003 Tutorial
+ Key: X Data Packet + Ack Packet X + X + X + X + X SeqNum + X + X Bytes Avg Throughput (Bytes/Sec) X + + X + X + X + X + X + X Sec Time Wireless 2003 Tutorial
+ Key: X Data Packet + Ack Packet X + X + X + X + X Access Network Bandwidth (Bytes/Sec) SeqNum + X + X X + + X + X + X + X + X + X Time Wireless 2003 Tutorial