1 / 138

Wireless Internet:

Mobile Internet, Pervasive Computing, Nomadic Computing, M-commerce ... An underground alternative to the wired Internet. A grassroots movement established in ...

Renfred
Télécharger la présentation

Wireless Internet:

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


    Slide 1:Wireless Internet: Protocols and Performance

    Carey Williamson iCORE Professor Department of Computer Science University of Calgary

    Slide 2: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)

    Slide 3:1. Wireless Internet: Introduction

    Slide 4: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 Think, Bill, Think Think, Bill, Think

    Slide 5:Two Popular 2.4 GHz Standards:

    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 (?) Take a closer look at 802.11, and the technology underlying it. 802.11 = 10baseT replacement Bluetooth = USB replacement Talk about Bluetooth later in lecture.Take a closer look at 802.11, and the technology underlying it. 802.11 = 10baseT replacement Bluetooth = USB replacement Talk about Bluetooth later in lecture.

    Slide 6:IEEE 802.11 Organization Tree:

    OFDM = Orthogonal Frequency Division Multiplexing MAC = Medium Access ControlOFDM = Orthogonal Frequency Division Multiplexing MAC = Medium Access Control

    Slide 7: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 Older devices DHSS, new devices DSSS. Old DSSS limited to 2 Mbit/s The high power consumption severely limits battery life. For this reason, few 802.11 cards are available for handheld devices. Different base stations incompatible. Peer-to-peer and Client-Gateway connections only no Multi-Hop Older devices DHSS, new devices DSSS. Old DSSS limited to 2 Mbit/s The high power consumption severely limits battery life. For this reason, few 802.11 cards are available for handheld devices. Different base stations incompatible. Peer-to-peer and Client-Gateway connections only no Multi-Hop

    Slide 8: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 Three-in-one-phone: When at home, use home gateway, when on road use cell tower, act as walkie-talkie when near enough. Internet connection: When at home, use home gateway. When on road use cell phone. When in office, use office gateway. Ultimate Headset: Computer, cell phone, telephone gateway, CD player, Discman, etc. Three-in-one-phone: When at home, use home gateway, when on road use cell tower, act as walkie-talkie when near enough. Internet connection: When at home, use home gateway. When on road use cell phone. When in office, use office gateway. Ultimate Headset: Computer, cell phone, telephone gateway, CD player, Discman, etc.

    Slide 9: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) The ESSID is needed to connect to a given 802.11 network. Connections can also be restricted by MAC address, although this is less reliable. Some vendors offer higher levels of encryption. Other vendors do not even implement WEP level security. Resurrecting Duckling imprinting, resurrecting, sleep-deprivation attacks. Bluetooth devices switch frequencies 1600 times every second. They also limit their output power to a minimum, making eavesdropping very difficuly.The ESSID is needed to connect to a given 802.11 network. Connections can also be restricted by MAC address, although this is less reliable. Some vendors offer higher levels of encryption. Other vendors do not even implement WEP level security. Resurrecting Duckling imprinting, resurrecting, sleep-deprivation attacks. Bluetooth devices switch frequencies 1600 times every second. They also limit their output power to a minimum, making eavesdropping very difficuly.

    Slide 10: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 From Consume.net: Fed up with being held to ransom in the local loop, phased by fees to ISP's, concious of community? OK so lets build a fresh network, one that is local, global, fast, expanding, public and user-constructed. Co-operating ISPs offer high speed internet. Legal issues covered by agreement. Lobbying the FCC for spectrum allocation for non-profit telcos. Dubbed Free-network movement similar to free software, Napster, internet itself. Price is 1/3 what it would have been a couple years ago. Pulling antennae from Apple computers Catching on: SFLan, San Fransisco Consume.net, London Seattle Wireless, Seattle Problems: Scalability, abuse, tragedy-of-the-commons, no quality-of-service guarantee (same complaints made about TCP/IP)From Consume.net: Fed up with being held to ransom in the local loop, phased by fees to ISP's, concious of community? OK so lets build a fresh network, one that is local, global, fast, expanding, public and user-constructed. Co-operating ISPs offer high speed internet. Legal issues covered by agreement. Lobbying the FCC for spectrum allocation for non-profit telcos. Dubbed Free-network movement similar to free software, Napster, internet itself. Price is 1/3 what it would have been a couple years ago. Pulling antennae from Apple computers Catching on: SFLan, San Fransisco Consume.net, London Seattle Wireless, Seattle Problems: Scalability, abuse, tragedy-of-the-commons, no quality-of-service guarantee (same complaints made about TCP/IP)

    Slide 11: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 Simulators with signal fade, movement models with groups. High levels of encryption, faster hopping / longer chipping keys More computer vendors will ship w/ 802.11 cards or Bluetooth (IBM, Compaq). Apple likely to lead the push for Bluetooth (after USB, Firewire, 802.11 success). Currently: buy network card, configure network, add clients Tomorrow: built-in card, plug and play configuration, clients perform resource discovery Grandma-level wireless Software: Better drivers, better media streaming, better routing - Maxwell Dworkin building in Harvard.Simulators with signal fade, movement models with groups. High levels of encryption, faster hopping / longer chipping keys More computer vendors will ship w/ 802.11 cards or Bluetooth (IBM, Compaq). Apple likely to lead the push for Bluetooth (after USB, Firewire, 802.11 success). Currently: buy network card, configure network, add clients Tomorrow: built-in card, plug and play configuration, clients perform resource discovery Grandma-level wireless Software: Better drivers, better media streaming, better routing - Maxwell Dworkin building in Harvard.

    Slide 12:2. Background: Networking Terminology

    Slide 13: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

    Slide 14:Internet Protocol Stack

    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 001101011...

    Slide 15:Internet Protocol Stack

    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 001101011...

    Slide 16: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, ... Users allowed free movement Peers do not have a central database, gateways act as peers Transparently re-route packets if destination not found Easier installation of new computers More overhead route discovery, updates Requires intelligent protocols Must accommodate lossy connections, handoffs, restricted bandwidth, interference, disconnectionsUsers allowed free movement Peers do not have a central database, gateways act as peers Transparently re-route packets if destination not found Easier installation of new computers More overhead route discovery, updates Requires intelligent protocols Must accommodate lossy connections, handoffs, restricted bandwidth, interference, disconnections

    Slide 17:Example:

    Multi-hop ad hoc networking Carey Kelly

    Slide 18:3. IEEE 802.11b Wireless LANs

    Slide 19: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)

    Slide 20:The Basics (Contd)

    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)

    Slide 21: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

    Slide 22:Where Does Wireless RF Live? ISM Band: Industrial, Scientific, Medical

    902-928 MHz 2400-2483.5 MHz 5725-5850 MHz 802.11/802.11b 802.11a Bluetooth Cordless Phones Home RF Baby Monitors Microwave Ovens Old Wireless

    Where does 802.11 live in the OSI? Wireless Cells 11 Mbps bandwidth shared by all devices in the Cell! Wireless Cells Computers can roam between cells CSMA-CA + Acknowledgement Carrier Sense Multiple Access with Collision Avoidance Device wanting to transmit senses the medium (Air) If medium is busy - defers If medium is free for certain period (DIFS) - transmits frame How CSMA-CA works: 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) CSMA-CA + Acknowledgement Carrier Sense Multiple Access with Collision Avoidance SIFS - Short Inter-Frame Space (approx 28 s) Every frame is acked - except broadcast and multicast! Air is free for DIFS time period Receive ACK back that frame was received intact! send frame source destination others DIFS SIFS All other devices must defer while air is busy data ack NAV: defer access

    Slide 28: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

    Slide 29: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

    Slide 30: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

    Long Preamble Long Preamble = 144 bits Interoperable with older 802.11 devices Entire Preamble and 48 bit PLCP Header sent at 1 Mbps Short Preamble Short Preamble = 72 bits Preamble transmitted at 1 Mbps PLCP Header transmitted at 2 Mbps more efficient than long preamble 56 bit Preamble Payload 0-2312 bytes 16 bit Start Frame Delimiter Signal Speed 1,2,5.5,11 Mbps Service (unused) Length of Payload 16 bit CRC Transmitted at 2 Mbps

    Slide 33: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!

    Slide 34: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!

    Slide 35:4. TCP 101: Transmission Control Protocol

    Slide 36: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...

    Slide 37:TCP 101 (Contd)

    TCP is a connection-oriented protocol YOUR DATA HERE Web Client Web Server

    Slide 38:TCP 101 (Contd)

    TCP slow-start and congestion avoidance

    Slide 39:TCP 101 (Contd)

    TCP slow-start and congestion avoidance

    Slide 40:TCP 101 (Contd)

    TCP slow-start and congestion avoidance

    Slide 41:TCP 101 (Contd)

    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

    Slide 42: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

    Time SeqNum X + Key: X Data Packet + Ack Packet X X X X X X X X X X X X X + + + + + + + + + + + + +

    Slide 44:So What?

    What can it tell you? Everything!!!

    Time SeqNum X + Key: X Data Packet + Ack Packet X X X X X X X X X X X X X + + + + + + + + + + + + + RTT Time SeqNum X + Key: X Data Packet + Ack Packet X X X X X X X X X X X X X + + + + + + + + + + + + + TCP Seg. Size Time SeqNum X + Key: X Data Packet + Ack Packet X X X X X X X X X X X X X + + + + + + + + + + + + + TCP Connection Duration Time SeqNum X + Key: X Data Packet + Ack Packet X X X X X X X X X X X X X + + + + + + + + + + + + + Num Bytes Sent Time SeqNum X + Key: X Data Packet + Ack Packet X X X X X X X X X X X X X + + + + + + + + + + + + + Avg Throughput (Bytes/Sec) Bytes Sec Time SeqNum X + Key: X Data Packet + Ack Packet X X X X X X X X X X X X X + + + + + + + + + + + + + Access Network Bandwidth (Bytes/Sec) Time SeqNum X + Key: X Data Packet + Ack Packet X X X X X X X X X X X X X + + + + + + + + + + + + + Senders Flow Control Window Size Time SeqNum X + Key: X Data Packet + Ack Packet X X X X X X X X X X X X X + + + + + + + + + + + + + TCP Slow Start Time SeqNum X + Key: X Data Packet + Ack Packet X X X X X X X X X X X X X + + + + + + + Delayed ACK Time SeqNum X + Key: X Data Packet + Ack Packet X X X X X X X X X X X + + + + + + + + + + + Packet Loss Duplicate ACK Time SeqNum X + Key: X Data Packet + Ack Packet X X X X X X X X X X X + + + + + + + + + + X + Retransmit Cumulative ACK + Time SeqNum X + Key: X Data Packet + Ack Packet X X X X X X X X X X X + + + + + + + + + + X + RTO +

    Slide 57:TCP 201 (Contd)

    What happens when a packet loss occurs? Quiz Time... Consider a 14-packet Web document For simplicity, consider only a single packet loss

    Time SeqNum X + Key: X Data Packet + Ack Packet X X X X X X X X X X X X X + + + + + + + + + + + + + Time SeqNum X + Key: X Data Packet + Ack Packet X X X X X X X X X X X X + + + + + + + + + + + + ? Time SeqNum X + Key: X Data Packet + Ack Packet X X X X X X X X X X X X + + + + + + + + + + + + Time SeqNum X + Key: X Data Packet + Ack Packet X X X X X X X X X X X X X + + + + + + + + + + + + + Time SeqNum X + Key: X Data Packet + Ack Packet X X X X X X X X X X X X + + + + + + + + + + + ? Time SeqNum X + Key: X Data Packet + Ack Packet X X X X X X X X X X X X X + + + + + + + + + + + + + Time SeqNum X + Key: X Data Packet + Ack Packet X X X X X X X X X X X X X + + + + + + + + + + + + + Time SeqNum X + Key: X Data Packet + Ack Packet X X X X X X X X X X X X + + + + + + + + + ? Time SeqNum X + Key: X Data Packet + Ack Packet X X X X X X X X X X X X + + + + + + + + + + + + X + Time SeqNum X + Key: X Data Packet + Ack Packet X X X X X X X X X X X X X + + + + + + + + + + + + + Time SeqNum X + Key: X Data Packet + Ack Packet X + ? Time SeqNum X + Key: X Data Packet + Ack Packet X X X + + + X + X +

    Slide 70:TCP 201 (Contd)

    Main observation: Not all packet losses are created equal Losses early in the transfer have a huge adverse impact on the transfer latency Losses near the end of the transfer always cost at least a retransmit timeout Losses in the middle may or may not hurt, depending on congestion window size at the time of the loss

    Slide 71:Congratulations!

    You are now a TCP expert!

    Slide 72:5. HTTP: HyperText Transfer Protocol

    Slide 73:Introduction to HTTP

    HTTP: HyperText Transfer Protocol Communication protocol between clients and servers Application layer protocol for WWW Client/Server model: Client: browser that requests, receives, displays object Server: receives requests and responds to them Protocol consists of various operations Few for HTTP 1.0 (RFC 1945, 1996) Many more in HTTP 1.1 (RFC 2616, 1999) Laptop w/ Netscape Server w/ Apache Desktop w/ Explorer http request http request http response http response

    Slide 74:Request Generation

    User clicks on something Uniform Resource Locator (URL): http://www.cnn.com http://www.cpsc.ucalgary.ca https://www.paymybills.com ftp://ftp.kernel.org Different URL schemes map to different services Hostname is converted from a name to a 32-bit IP address (DNS lookup, if needed) Connection is established to server (TCP)

    Slide 75:What Happens Next?

    Client downloads HTML document Sometimes called container page Typically in text format (ASCII) Contains instructions for rendering (e.g., background color, frames) Links to other pages Many have embedded objects: Images: GIF, JPG (logos, banner ads) Usually automatically retrieved I.e., without user involvement can control sometimes (e.g. browser options, junkbusters) <html> <head> <meta name=Author content=Erich Nahum> <title> Linux Web Server Performance </title> </head> <body text=#00000> <img width=31 height=11 src=ibmlogo.gif> <img src=images/new.gif> <h1>Hi There!</h1> Heres lots of cool linux stuff! <a href=more.html> Click here</a> for more! </body> </html> sample html file

    Slide 76:Web Server Role

    Respond to client requests, typically a browser Can be a proxy, which aggregates client requests (e.g., AOL) Could be search engine spider or robot (e.g., Keynote) May have work to do on clients behalf: Is the clients cached copy still good? Is client authorized to get this document? Hundreds or thousands of simultaneous clients Hard to predict how many will show up on some day (e.g., flash crowds, diurnal cycle, global presence) Many requests are in progress concurrently

    Slide 77:HTTP Request Format

    GET /images/penguin.gif HTTP/1.0 User-Agent: Mozilla/0.9.4 (Linux 2.2.19) Host: www.kernel.org Accept: text/html, image/gif, image/jpeg Accept-Encoding: gzip Accept-Language: en Accept-Charset: iso-8859-1,*,utf-8 Cookie: B=xh203jfsf; Y=3sdkfjej <cr><lf> Messages are in ASCII (human-readable) Carriage-return and line-feed indicate end of headers Headers may communicate private information (browser, OS, cookie information, etc.)

    Slide 78:Request Types

    Called Methods: GET: retrieve a file (95% of requests) HEAD: just get meta-data (e.g., mod time) POST: submitting a form to a server PUT: store enclosed document as URI DELETE: removed named resource LINK/UNLINK: in 1.0, gone in 1.1 TRACE: http echo for debugging (added in 1.1) CONNECT: used by proxies for tunneling (1.1) OPTIONS: request for server/proxy options (1.1)

    Slide 79:Response Format

    HTTP/1.0 200 OK Server: Tux 2.0 Content-Type: image/gif Content-Length: 43 Last-Modified: Fri, 15 Apr 1994 02:36:21 GMT Expires: Wed, 20 Feb 2002 18:54:46 GMT Date: Mon, 12 Nov 2001 14:29:48 GMT Cache-Control: no-cache Pragma: no-cache Connection: close Set-Cookie: PA=wefj2we0-jfjf <cr><lf> <data follows> Similar format to requests (i.e., ASCII)

    Slide 80:Response Types

    1XX: Informational (defd in 1.0, used in 1.1) 100 Continue, 101 Switching Protocols 2XX: Success 200 OK, 206 Partial Content 3XX: Redirection 301 Moved Permanently, 304 Not Modified 4XX: Client error 400 Bad Request, 403 Forbidden, 404 Not Found 5XX: Server error 500 Internal Server Error, 503 Service Unavailable, 505 HTTP Version Not Supported

    Slide 81:Outline of an HTTP Transaction

    This section describes the basics of servicing an HTTP GET request from user space Assume a single process running in user space, similar to Apache 1.3 Well mention relevant socket operations along the way initialize; forever do { get request; process; send response; log request; } server in a nutshell

    Slide 82:Readying a Server

    First thing a server does is notify the OS it is interested in WWW server requests; these are typically on TCP port 80. Other services use different ports (e.g., SSL is on 443) Allocate a socket and bind()'s it to the address (port 80) Server calls listen() on the socket to indicate willingness to receive requests Calls accept() to wait for a request to come in (and blocks) When the accept() returns, we have a new socket which represents a new connection to a client s = socket(); /* allocate listen socket */ bind(s, 80); /* bind to TCP port 80 */ listen(s); /* indicate willingness to accept */ while (1) { newconn = accept(s); /* accept new connection */b

    Slide 83:Processing a Request

    getsockname() called to get the remote host name for logging purposes (optional, but done by most) gethostbyname() called to get name of other end again for logging purposes gettimeofday() is called to get time of request both for Date header and for logging read() is called on new socket to retrieve request request is determined by parsing the data GET /images/jul4/flag.gif remoteIP = getsockname(newconn); remoteHost = gethostbyname(remoteIP); gettimeofday(currentTime); read(newconn, reqBuffer, sizeof(reqBuffer)); reqInfo = serverParse(reqBuffer);

    Slide 84:Processing a Request (cont)

    stat() called to test file path to see if file exists/is accessible may not be there, may only be available to certain people "/microsoft/top-secret/plans-for-world-domination.html" stat() also used for file meta-data e.g., size of file, last modified time "Has file changed since last time I checked? might have to stat() multiple files and directories assuming all is OK, open() called to open the file fileName = parseOutFileName(requestBuffer); fileAttr = stat(fileName); serverCheckFileStuff(fileName, fileAttr); open(fileName);

    Slide 85:Responding to a Request

    read() called to read the file into user space write() is called to send HTTP headers on socket (early servers called write() for each header!) write() is called to write the file on the socket close() is called to close the socket close() is called to close the open file descriptor write() is called on the log file read(fileName, fileBuffer); headerBuffer = serverFigureHeaders(fileName, reqInfo); write(newSock, headerBuffer); write(newSock, fileBuffer); close(newSock); close(fileName); write(logFile, requestInfo);

    Slide 86:Network View: HTTP and TCP

    TCP is a connection-oriented protocol YOUR DATA HERE Web Client Web Server

    Slide 87:Example Web Page

    Harry Potter Movies As you all know, the new HP book will be out in June and then there will be a new movie shortly after that Harry Potter and the Bathtub Ring page.html hpface.jpg castle.gif

    Client Server The classic approach in HTTP/1.0 is to use one HTTP request per TCP connection, serially. Client Server Concurrent (parallel) TCP connections can be used to make things faster. C S C S Client Server The persistent HTTP approach can re-use the same TCP connection for Multiple HTTP transfers, one after another, serially. Amortizes TCP overhead, but maintains TCP state longer at server. Client Server The pipelining feature in HTTP/1.1 allows requests to be issued asynchronously on a persistent connection. Requests must be processed in proper order. Can do clever packaging. GG

    Slide 92:Summary of Web and HTTP

    The major application on the Internet Majority of traffic is HTTP (or HTTP-related) Client/server model: Clients make requests, servers respond to them Done mostly in ASCII text (helps debugging!) Various headers and commands Too many to go into detail here Many web books/tutorials exist (e.g., Krishnamurthy & Rexford 2001)

    Slide 93:6. Wireless TCP: Performance Issues (Part 1)

    Slide 94:Example #1

    Wireless TCP Performance Problems Wired Internet Wireless Access High capacity, low error rate Low capacity, high error rate

    Slide 95:Example #1 (Contd)

    Solution: wireless-aware TCP (I-TCP, ProxyTCP, Snoop-TCP, split connections...)

    Slide 96:Example #2

    Wireless TCP Fairness Problems Wired Internet Wireless Bottleneck D U AP

    Slide 97:Example #3

    Multi-hop ad hoc networking Carey Kelly

    Slide 98:Example #3 (Contd)

    Multi-hop ad hoc networking Carey Kelly

    Slide 99:Example #3 (Contd)

    Multi-hop ad hoc networking Carey Kelly

    Slide 100:Example #3 (Contd)

    Multi-hop ad hoc networking Carey Kelly

    Slide 101:Example #3 (Contd)

    Multi-hop ad hoc networking Carey Kelly

    Slide 102:Example #3 (Contd)

    Multi-hop ad hoc networking Carey Kelly

    Slide 103:Example #3 (Contd)

    Multi-hop ad hoc networking Carey Kelly

    Slide 104:Example #3 (Contd)

    Multi-hop ad hoc networking Carey Kelly

    Slide 105:Example #3 (Contd)

    Multi-hop ad hoc networking Carey Kelly

    Slide 106:Example #3 (Contd)

    Multi-hop ad hoc networking Carey Kelly

    Slide 107:Example #3 (Contd)

    Two interesting subproblems: Dynamic ad hoc routing: node movement can disrupt the IP routing path at any time, disrupting TCP connection; yet another way to lose packets!!!; possible solution: Explicit Loss Notification (ELN)? Handoff? Route prediction? TCP flow control: the bursty nature of TCP packet transmissions can create contention for the shared wireless channel among forwarding nodes; collisions between DATA and ACKs possible solution: rate-based flow control? Burst mode? Spatial reuse of channels?

    Slide 108:Summary of Wireless TCP

    TCP is the four wheel drive of TPs Wireless is a newly emerging technology with rapidly growing deployment popularity TCP and Wireless dont fit together all that well Making TCP smarter about wireless helps!

    Slide 109:7. Wireless TCP: Performance Issues (Part 2)

    Slide 110:Motivation

    TCP performance often degrades over wireless networks; reasons well-known Solutions to improve TCP performance over wireless links exist, but how well do they work in a real wireless LAN environment? How do link-layer mechanisms interact with TCP and affect the overall performance? Where is the bottleneck in the network protocol processing path, and why?

    Slide 111:Background - TCP

    Widely used on the Internet (e.g. Web) Connection-oriented, reliable byte stream Window-based flow control Slow start and congestion avoidance Fast retransmission, fast recovery Other extensions, including TCP SACK Many different versions in use

    Slide 112:Background IEEE 802.11b

    An Ethernet-like LAN standard (11 Mbps) Infrastructure mode and ad hoc mode Carrier-sense multiple access with collision avoidance (CSMA/CA) to reduce collisions MAC-layer: positive acknowledgment and retransmissions (to recover from channel errors) Dynamic rate adaptation: can choose data transmission rate of 1, 2, 5.5, or 11 Mbps

    Slide 113:Background USB

    Widely used industry standard for connecting a computer to its peripherals (bus topology) Lots of USB-based (wireless) network cards Data transfers managed by Host Controller (HC) Synchronous bus: 1 msec slots for transfers Transfer requests are handled using vertical and horizontal linked-list data structures Two processing modes for HC: Breadth-First or Depth-First High Speed Bandwidth Reclamation (HSBR)

    Slide 114:Background USB (contd)

    Queued mode (keep HC busy) Transfer size: 64 1023 bytes each

    Slide 115:Background USB (contd)

    Queued mode (keep HC busy) Transfer size: 64 1023 bytes each

    Slide 116:Experimental Methodology

    Experimental Setup (HW/SW) Laptop Compaq Evo 719c with multiport USB wireless card (Linux 2.4) Access point Lucent RG-1000 Stationary host on Ethernet LAN SunOS 5.8 Run netperf on laptop and netserver on wired host SnifferPro 4.6 wireless sniffer and tcpdump Experimental Factors USB mode, driver settings Wireless channel (distance) between laptop and AP netserver Ethernet AP netperf Sniffer data acks laptops tcpdump

    Slide 117:Initial Result

    Windows 2000 implementation of TCP is more than 3 times faster than Linux TCP! Reason: Linux driver bug (2 Mbps vs 11 Mbps) OS Linux Windows 2000 1.52 Mbps 5.11 Mbps Throughput

    Slide 118:Results USB Experiments

    Slide 119:Results USB Experiments

    With FSBR disabled, USB is the bottleneck With FSBR enabled (the default in Linux), the wireless network is the bottleneck Queued mode makes no difference with FSBR on, but helps when FSBR is turned off Queued mode (even with FSBR turned on) may be very important when higher speed wireless link is used (e.g. IEEE 802.11a)

    Slide 120:Results Wireless Problems

    We observed unusually high collision rates on the wireless channel for TCP transfers, which we call the TCP data/ACK collision problem Scenario: laptop and AP are 1 m apart For TCP, MAC-layer retransmit rate: 4.58-4.73% For UDP, MAC-layer retransmit rate: 0.47-0.98% In general, a retransmission rate of 1.75%-7.2% has been seen for other vendor HW/SW (N = 1) For TCP, disabling MAC-layer retransmission degrades throughput by 23%

    Slide 121:Results Wireless Problems

    The MAC-layer rate adaptation problem Scenario: laptop and AP are 100 m apart Lousy TCP throughput, lots of retransmits Reason: the multiplicative increase and multiplicative decrease (MIMD) bandwidth probing mechanism causes network thrashing and wastes battery power The small congestion window causes temporary deadlock if the TCP receiver uses delayed Ack

    Slide 122:Results Wireless Problems (MAC-layer rate adaptation)

    Slide 123:Summary of Observations

    TCP performance on WLAN can be wacky! (at least for Compaq Multiport 802.11b USB wireless card under Linux 2.4) Several factors can affect overall performance Poorly configured USB bus could be the bottleneck Linux TCP implementation bug makes TCP unable to recognize the first spurious timeout Poor MAC-layer rate adaptation algorithm can cause a network thrashing problem TCPs data/ACK structure may induce excessive collisions at the MAC layer on wireless LANs

    Slide 124:7. Wireless Web: Performance Issues

    Introduction and Motivation Observation: the same wireless technology that allows a Web client to be mobile also allows Web servers to be mobile Idea: portable, short-lived, ad hoc networks Possible applications: classroom area networks, seminars press conferences, media events sporting events, gaming, exhibitions conferences and trade shows disaster recovery sites, field work, etc. Objectives to assess feasibility of portable networks to benchmark the performance capabilities and limitations of an Apache Web server in a wireless ad hoc network to identify the performance bottlenecks to understand impacts of different factors number of clients Web object size persistent connections transmit power (energy consumption) wireless channel conditions Experimental Setup Compaq Notebooks (1.2GHz Pentium III, 128MB RAM, 512 KB L2 cache, Cisco Aironet 350 network cards) RedHat Linux 7.3, httperf, Apache 1.3.23, SnifferPro 4.6 Network: 11 Mbps IEEE 802.11b wireless LAN, ad hoc mode Experimental Setup (Contd) IEEE 802.11b: a standard for wireless LANs Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA), up to 11 Mbps data rate at physical layer ad hoc mode frames are addressed directly from sender to receiver httperf Web benchmarking software tool developed at HP Labs Web server: Apache (version 1.3.23) Process-based, flexible, powerful, HTTP/1.1-compliant SnifferPro 4.6 real-time capture, recording all wireless channel activity, enabling protocol analysis at MAC, IP, TCP and HTTP layers Experimental Design Impacts of different factors on wireless Web server performance (one-factor-at-a-time) Experimental Factors and Levels Performance metrics HTTP transaction rate, throughput, response time, error rate at Application Layer, TCP connection duration at Network Layer Transmit queue behaviour at Link Layer, Experiment 1: Request Rate Purpose: to determine the range of feasible and sustainable loads for the wireless Web server Design: Number of Clients: 1 HTTP transaction rate: 10, 20, , 160 req/sec HTTP transfer size: 1 KB (fixed) Persistent connections: no Transmit power: 100 mW Client-server distance: 1 meter (on same desk) Wireless Web Performance at Application Layer Main observation: As the offered load increases: linear increase ? instability ? lower plateau Peak throughput < 1 Mbps for 1 KB transfers Experiment 2: Transfer Size Purpose: to study impact of HTTP response size Design: Number of Clients: 1 HTTP transaction rate: 10 req/sec (fixed) HTTP transfer size (KB): 1, 2, 4, 8, Persistent connections: no Transmit power: 100 mW Client-server distance: 1 meter (on same desk) Measurement at Network Layer Experiment 3: Persistent Connections Persistent Connections: Multiple HTTP transactions can be sent on the same TCP connection. amortize overhead of TCP connection processing reduce memory consumption for TCP state Purpose of this experiment: to study impact of persistent connection on wireless Web performance Design: Number of Clients: 1 and 2 HTTP transaction rate: 10 req/sec (fixed) HTTP transfer size: 1 KB (fixed) Persistent connections: yes Transmit power: 100 mW Client-server distance: 1 meter (on same desk) Achieved Throughput for Experiment with Persistent Connections Main observation: Peak throughput: 3.22 Mbps, 3.5x improvement over non-persistent connections (0.9 Mbps), two clients share the server and network resources equally Summary and Conclusions What we did: wireless Web server, portable nw Application-layer measurements (httperf) Network-layer measurements (Wireless Sniffer) Our results show: Server capability: 100 conn/sec for non-persistent HTTP with throughputs up to 4 Mbps (adequate?) Bottleneck: at wireless network interface Some network thrashing for large HTTP transfers when the network utilization is high (aborts, resets) Effect of wireless channel on performance at TCP and HTTP-level (MAC-layer retransmits) Power consumption issue for mobile client and server

    Slide 137:8. Summary, Questions, and Discussion

    Slide 138:Credits

    Thanks to the following people for the use of their slides and/or knowledge: David Schwab, U of Saskatchewan Erich Nahum, IBM Sniffer Technologies Network Associates IEEE Guangwei Bai and Tianbo Kuang,U of C

More Related