Comp 349-001/449-001, LT 412 Overview We will focus primarily, though far from exclusively, on "wi-fi" wireless; that is, IEEE 802.11 (a/b/g). The name "wi-fi" is actually a trademark of an interoperability-certification group. Nobody really knows what the "fi" in "wi-fi" is for. Other wireless: cordless phones, cell phones, bluetooth, wimax (802.16), satellite Bluetooth was named after a tenth-century king, Harald Bluetooth, King of Denmark and Norway. Bluetooth is an anglicized version of Harald Blaatand,[29] who was known for his unification of previously warring tribes from Denmark (including now Swedish Scania, where the Bluetooth technology was invented), and Norway. Bluetooth likewise was intended to unify different technologies, such as personal computers and mobile phones [wikipedia] Note that Bluetooth is partly intended to eliminate annoying cables, and partly intended to overcome the rather more mundane problem of a plethora of different cable connectors. Electrons are like dogs, always ready to do what you ask. Photons are more like cats, at least outside of optical fiber (maybe there too) =============== All this is much more complex than an Ethernet. Issues: 1. Peculiarities of radio transmission generally 2. Interference between different senders: even if we introduce spectrum licensing, this is a problem Wi-fi spectrum is NOT licensed Spread-spectrum modulation 3. Reliability For ethernet, a crc-32 checksum suffices. But for wireless, often we want a stronger, error-CORRECTING code. This takes more bits. 4. Collisions How does this compare with Ethernet? 5. Hidden-Node Problem: A----B----C A and C might not detect one another, and yet their signals might collide at B: Not all collisions can be detected! 6. Exposed-Node Problem: A----B----C----D If B sends to A and C to D, then B and C might collide and yet NOT have this be a problem! Not all detected collisions are bad! 7. Drivers Ethernet drivers read and write. Wireless: read, write packets, CONNECT, SCAN, ??? 8. Linux and wireless cards: why the problems? No driver support (Broadcom is a particular offender) How do you enable the radio? Awkward command-line multistep interfaces (we will use that later!) 9. Motion How are handoffs handled, as you move from area to area? cellular wi-fi 10. Security, versus a wired LAN putting this in the LAN layer complicates the drivers issue 11. Authentication, or making sure users are validated traditionally considered a non-problem in wired networks, though this isn't always the case. Advantages: deniability! Though there's a rumor some court has disallowed the n00b defense. Security may have been weak to allow for export. 12. Connecting to open access points is a significant risk to *you*. If your machine connects to such an AP by default, you are vulnerable to standard man-in-the-middle exploits, DNS exploits, routing exploits. Many machines connect by default to ANY available network, though there's no further risk unless you USE that network. Apple macbook vulnerability: *driver* exploit was possible that did not even require the macbook to connect. 13. Unauthorized access points If not secure, may allow outsiders "insider" access. Unauthorized ethernet is simply a complete non-problem. 14. Standard attacks 802.11 had Wired Equivalent Privacy (WEP) security built in. 2001: UCBerkeley paper describing weakness. AirCrack was shortly thereafter. 15. Wireless network management & intrusion detection 16. What the heck IS "connecting", anyway? ================ I'm still working on a project, but one possibility is to work on or with a simulator for wireless traffic. ========================================================================== ========================================================================== Beginning: overview of wi-fi (802.11b/g): 2.4 GHz std year freq Mbit/sec dist(m) 802.11 1997 2.4 1-2 20 802.11a 1999 5 23-54 35 802.11b 1999 2.4 4.3-11 35+ 802.11g 2003 2.4 19-54 35+ 802.11n 2008 2.4,5 74-248 70 Most of us use b/g. I don't know where 11a is. 11n is the replacement. 11b: uses DSSS (Direct Sequence Spread Spectrum) encoding. 11g: uses OFDM (Orthogonal Freq Division Multiplexing). OFDM: use several closely spaced (but noninterfering) frequencies We use all frequencies in parallel. Each bit of data (or each symbol's worth of bits) is sent on one frequency. 2.4GHz ISM (Industrial, Scientific, Medical) band Free unlicensed use provided radiated power is low enough. Used for: bluetooth, cordless phones, baby monitors, microwaves. Oops. wavelength: 12.5 cm (5 inches) 1/4 wavelength: 1.25" Actual band: 2.400-2.4835, for 11 channels 13 channels in europe, 14 in Japan Wi-Fi signal uses FIVE channels. So in the US only 1,6,11 don't overlap. Width of ISM band: 83.5 MHz Channel Freq,MHz 1 2412 2 2417 3 2422 4 2427 5 2432 6 2437 7 2442 8 2447 Mexico: channels 1-8 are reserved for indoor-use only 9 2452 11 2462 end of US channels 12 2467 Europe & Japan & China, but not US 13 2472 Europe & Japan & China, but not US 14 2484 Japan only Alas, the frequency range of a single wi-fi transmitter is ~22 MHz. Need 5 channel spacing, optimal, or 4-channel spacing, acceptable. 4-channel spacing is typically better for the slightly narrower bandwidth of 802.11g (versus 11b). Channel patterns: 1,6,11 (US) 1,5,9,13 (where 13 channels are available) Actual rule: beyond +- 11MHz from central frequency, signal strength must be down by at least 30dB (1000x) Weirdness can occur if you have your transmitter right next to your laptop. ============================================================ Two modes: "infrastructure" and "ad hoc". In the former, you connect to a base station ("access point"). This is the simplest. In the latter, you connect to another laptop. Full potential of ad hoc MESH networking is not achieved at the present time. That would be to route packets through the mesh until they reach arbitrarily distant nodes. Current ad hoc networks just support direct connections. Note that two base stations can NOT talk to one another! APs b'cast their "SSID" (Service Set IDentifier) regularly, unless disabled. Interval ~ 100ms. These b'casts are called "beacons". If several APs have the same SSID, one generally picks the one with the best signal strength. ============================================================ Comparison of wi-fi to Aloha and Ethernet collisions Wireless nodes CANNOT do Collision Detection! wi-fi uses Carrier Sense Multiple Access / Collison Avoidance, and explicit packet acknowledgement. Why not collision detect? * This was an issue even with Ethernet. Total length = 2500 m backbone cable, but no segment more than 500 m, to avoid attenuation high enough that the arriving signal would be undetectable in the presence of the transmitted signal. Even so, arriving signal may be 1000x (30dB) weaker. * With radio, it's just not possible: the outbound signal is WAY too intense not to overwhelm the receiver. * Also, there's the hidden-node problem: just because you don't detect a collision doesn't mean one didn't occur. Apple LocalTalk used no-collision-detect (CSMA/CA) strategy, for cost reasons. At that time, Ethernet was still expensive, and people tended not to think of networks as affordable for the home or small office. [!] CSMA/CA: sense medium if no collisions, wait random time if medium is still free, transmit receiver sends ACK upon successful receipt of packet if sender does not receive ACK, fall back on Ethernet-style backoff Not done week 1: 1-persistent: ethernet p-persistent: wait for line to be idle transmit with probability p wait 1 SLOT with probability 1-p nonpersistent: if idle, transmit if busy, choose a random wait time T, wait T units, and repeat. Do *not* monitor the line continuously. A SLOT is the time needed to transmit and detect a collision. If collisions cannot be detected, it can be a somewhat arbitrary time unit intended to support synchronization. RTS/CTS extension: for packets **above a certain size**, the sender sends an RTS (Request To Send) packet. If everyone else gets it, they refrain from sending. Receiver responds with CTS (Clear To Send) packet. Packets with size under the threshold are sent directly. By default the threshold is large (infinity?); that is, RTS/CTS is disabled. Receiver *does* send ACK packets. Note that these are at the 802.11x layer, entirely different from TCP ACK packets. A collision is assumed if the ACK isn't received, and the sender goes into its backoff-retransmit mode. Hidden-node problem: solved; we now detect real collisions. ACK alone is enough. Exposed-node problem: still there =========================================================================== First look at cantennas