940 likes | 1.13k Views
INFO 331 Computer Networking Technology II. Chapter 6 Wireless Networking Glenn Booker. Wireless & Mobile Networks. The number of mobile devices has grown immensely in the last few years 34 million cell phones worldwide as of 1993 2 billion [ ITU ] as of 2005, many Internet-aware
E N D
INFO 331Computer Networking Technology II Chapter 6 Wireless Networking Glenn Booker INFO 331 chapter 6
Wireless & Mobile Networks • The number of mobile devices has grown immensely in the last few years • 34 million cell phones worldwide as of 1993 • 2 billion [ITU] as of 2005, many Internet-aware • 4 billion by the end of 2008 • Distinguish between wireless connectivity and the mobility that affords • Some wireless devices are stationary INFO 331 chapter 6
Wireless & Mobile Networks • Challenges for this context include • Establishing and maintaining a wireless connection • Handing off a wireless client from one part of the network to another • Some terminology • Wireless host is the end user’s device connected to the network • Wireless links are analogous to the wired variety INFO 331 chapter 6
Terminology • A base station communicates with the wireless hosts; e.g. cell towers for cell phones, and access points for wireless computers • Base stations connect to the rest of the network, either through wired or other wireless links • Infrastructure versus ad hoc mode • When a wireless host connects in infrastructure mode, it relies on the network for address resolution, routing, etc. • In ad hoc mode, the host performs those functions INFO 331 chapter 6
Terminology • When a host changes from one base station to another, the change of attachment is a handoff • Can categorize wireless networks by the number of wireless hops (one or more), and whether it uses infrastructure (e.g. a base station) • Single hop, with infrastructure – is typical of a local wireless connection to a wired network INFO 331 chapter 6
Terminology • Single hop, no infrastructure – like Bluetooth or ad hoc 802.11 networks • Multi-hop, with infrastructure – needs a wireless relay to get to the wired world, like a wireless mesh network • Multi-hop, no infrastructure – typically has mobile nodes as well as hosts; MANETs (mobile ad hoc networks) and vehicle versions, VANETs are in this category INFO 331 chapter 6
Wireless Links • If a simple wired Ethernet link is replaced by a wireless connection • The hub or switch would be replaced by an access point • The host needs a wireless network card • The Ethernet cable goes in the closet • So how does this affect service? INFO 331 chapter 6
Wireless Links Problems • Key impacts of changing to wireless are • Decreasing signal strength with distance from the access point • Interference from other sources in the same frequency range • Multipath propagation – signals can bounce around, giving echoes (like talking at edge of Grand Canyon) • This results in much higher, and more variable, bit error rates (BER) INFO 331 chapter 6
Wireless Links Problems Images from Kurose’s slides INFO 331 chapter 6
CDMA • Last term we covered three approaches to sharing links (multiple access) • Channel partitioning (TDM and FDM) • Random access protocols (ALOHA & CSMA) • Taking turns protocols (polling or token ring) • Here we need another type of multiple access protocol – Code Division Multiple Access (CDMA) INFO 331 chapter 6
CDMA • In CDMA, the original data stream is multiplied by a code which changes much faster than the data, the chipping rate • In the following example, for every bit of incoming data, the code has eight values (11101000) • The data*code product is sent over the link • The receiver undoes the code, and recovers the original signal INFO 331 chapter 6
CDMA Example INFO 331 chapter 6
CDMA • So how does this help?? • Interfering signals add onto the signal you want to receive • If the code is chosen properly, the desired signal can be picked out of the sum of your signal plus garbage • It’s kind of like being able to follow one conversation in a crowded room INFO 331 chapter 6
802.11 LAN Protocols • The WiFi or 802.11 protocols are used for local wireless networks • 802.11a and 802.11g are most common • Both provide service at up to 54 Mbps • 802.11a operates at 5.8 GHz • 802.11g operates at 2.4 GHz • All use CSMA/CA as medium access protocol, have the same frame structure INFO 331 chapter 6
802.11 LAN Protocols INFO 331 chapter 6
802.11 LAN Protocols • All 802.11 protocols can slow themselves down for longer distances, or to deal with interference • All can use infrastructure or ad hoc mode • They differ at the physical layer INFO 331 chapter 6
802.11 LAN Protocols • Both 2.4 (for .11b and g) and 5.8 GHz (.11a) frequency ranges have disadvantages • 2.4 GHz has more interference from cell phones and microwave ovens • 5.8 GHz needs more power for a given distance, and suffers more from multipath propagation INFO 331 chapter 6
802.11 LAN Protocols • Notice each band is a range of frequencies (technically 2.4 – 2.485 and 5.1 – 5.8 GHz); typically have 11 channels in that range INFO 331 chapter 6
802.11 LAN Protocols • 802.11n is being standardized • Uses two or more antennae to send and receive, and should be over 200 Mbps • What wavelength are the 802.11 bands? • ln = c = 3E10 cm/s • l = c/n • For 2.4 GHz, l = 3E10 cm/s / 2.4E9 s-1 = 12.5 cm • For 5.8 GHz, l = 3E10 cm/s / 5.8E9 s-1 = 5.2 cm INFO 331 chapter 6
802.11 Architecture • A basic service set (BSS) is an access point (base station) and one or more wireless hosts • The access points for various BSSs are connected to each other via hubs, switches, or routers • Every wireless adapter has a 6 byte MAC address, and the access point has a MAC address • Again, MAC addresses are managed by IEEE INFO 331 chapter 6
802.11 LAN Architecture INFO 331 chapter 6
802.11 Architecture • In infrastructure mode, the access points are essential elements • In ad hoc mode, there are no access points, and wireless devices communicate independently • This could be used to network with another laptop directly, for example • The outside world isn’t visible in ad hoc mode INFO 331 chapter 6
Channels & Association • In infrastructure mode, need to associate with an access point before data can be sent or received • Each access point is given a Service Set Identifier (SSID), and channel • The SSID is a readable name, like ‘sixflags’ • Channels 1-11 are available, but only channels 1, 6, and 11 are non-overlapping INFO 331 chapter 6
It’s a jungle out there! • A Wi-Fi jungle is when you can choose from multiple access points (APs), possibly using the same channels • Could occur downtown, where many cafés and local networks could intersect • How tell the networks (APs) apart? • Each AP sends beacon frames periodically, with the AP’s SSID and MAC address • You choose which AP with which to associate INFO 331 chapter 6
Passive vs Active scanning • When access points broadcast their presence, and you merely look for their beacon frames, this is passive scanning • A wireless host can also broadcast a signal to look for APs, this is active scanning INFO 331 chapter 6
After association • Once an AP has been selected for association, generally DHCP is used to get an IP address, find DNS servers, etc. • To be allowed to associate, might have to authenticate the host • Can specify which MAC addresses are allowed to associate • May require logging into the network, verify identity with a Radius or Diameter server INFO 331 chapter 6
802.11 Multiple Access Control • Ethernet has been very successful • Recall it used CSMA/CD – carrier sense multiple access with collision detection • Wait for a pause in traffic before transmitting, and sense when a collision occurs • 802.11 uses a variation of this – CSMA/CA • Collision avoidance instead of detection • Also adds link-layer acknowledgement & retransmission (ARQ) INFO 331 chapter 6
802.11 Collision Avoidance • Why no collision detection? • It requires ability to send and receive at the same time - here the received signal is weak compared to the sent signal, so it’s expensive to make hardware to do this • The hidden terminal problem and fading make it impossible to detect all collisions • So 802.11 always transmits a full frame • Unlike Ethernet, it won’t stop mid-transmission INFO 331 chapter 6
802.11 ARQ • To transmit data from sender to receiver: • Sender waits a short time period DIFS (distributed inter-frame spacing) • Sender transmits the data using CSMA/CA • Data gets to receiver • Receiver validates integrity of data with CRC • Waits a time SIFS (short inter-frame spacing) • The receiver sends an ACK INFO 331 chapter 6
802.11 ARQ INFO 331 chapter 6
802.11 ARQ • 802.11 uses CRC to check for bit errors • You recall the cyclic redundancy check, right? • If channel is busy when a transmission is ready • Wait a random time of idle channel, and transmit when the channel is idle; don’t count down when the channel is busy • Why? This avoids collisions when multiple hosts are waiting for a clear channel INFO 331 chapter 6
802.11 ARQ • So in wireless communication, it’s all about AVOIDING COLLISIONS! • If the source doesn’t get an ACK within some time, it retransmits • If some number of retransmissions aren’t ACKed, discard the frame INFO 331 chapter 6
802.11 Reservation Scheme • There is an optional scheme to avoid collision even when there are hidden hosts • It’s very polite – each host asks for permission to transmit • Sort of like the polling protocols • Sender sends a Request To Send (RTS) frame to the AP • AP broadcasts a Clear To Send (CTS) frame to reserve use of channel by that sender INFO 331 chapter 6
802.11 Reservation Scheme • Sender then transmits exclusively during that time period – other hosts know from getting the CTS to be quiet • This is very effective at avoiding collisions, but has time overhead to exchange RTS and CTS messages • Often used for sending large data files • May establish threshold, so only files larger than threshold are allowed to use RTS/CTS INFO 331 chapter 6
802.11 point-to-point • Using directional antennae, the 802.11 protocols can be used up to 80 kilometers of distance • This was done in India, for example INFO 331 chapter 6
802.11 Frames • A frame in 802.11 consists of 34 bytes of header and trailer, plus 0 to 2312 bytes of data (payload) • Data generally limited to 1500 bytes due to Ethernet limit • Data is usually an IP datagram or ARP packet INFO 331 chapter 6
802.11 Frame Fields • Frame control (2 B, shown on next slide) • Duration (2 B) for timeout or CTS period • Address 1 (6 B) MAC of destination node • Address 2 (6 B) MAC of transmitting node • Address 3 (6 B) MAC of router leaving this BSS • Sequence control (2 B) just like in TCP • Address 4 (6 B) used only for ad hoc networks • Payload (data) (0-2132 B) • CRC code (4 B) [size verified here] INFO 331 chapter 6
bytes bits 802.11 Frames INFO 331 chapter 6
802.11 Frame Fields • The sizes for frame control parts are in bits (total 16 bits = 2 bytes) • The Type field also distinguishes association frames from normal data frames • WEP is an encryption mode • The duration field can be the timeout interval, or time for a clear to send (CTS) • Address 3 is critical for communicating across wireless networks INFO 331 chapter 6
802.11 Frame Fields • Sequence numbers are also used to tell multipath echoes apart, in addition to detecting retransmissions • Address 4 is only used for ad hoc networks • The CRC field (4 B, not 2) is particularly important, since there is a large chance of bit errors • We’ll ignore the other fields for now INFO 331 chapter 6
Mobility within IP subnet • If a host moves between BSS’ within the same subnet (i.e. they are not connected by a router), it’s relatively easy for the handoff from one AP to another to occur • If the BSS’ are connected by a hub, there’s no problem – the host disassociates from one AP and associates with another INFO 331 chapter 6
Mobility within subnet • If the BSS’ are connected by a switch, the self-learning features of switches is too slow to keep up well • The new AP has to send a broadcast Ethernet message to update the switch with the new association • An 802.11f standards group was working on this issue – standard was withdrawn 2/06 INFO 331 chapter 6
Advanced 802.11 Features • 802.11 hints at supporting added features • Adapt transmission rate, depending on the SNR (signal to noise ratio) and other channel characteristics (e.g. lost frames) • Power management, by limiting the time various functions are on; done by putting itself to sleep • It can tell its access point it’s asleep, so frames aren’t sent to it until it wakes up! INFO 331 chapter 6
802.15 WPAN • The 802.11 standards are designed for wireless communication up to 100 meters • The 802.15 wireless personal area network (WPAN) is for ad hoc wireless networking with a range of about 10 meters • Based on Bluetooth, it’s designed to handle up to eight ‘active’ local devices near a host in a piconet, controlled by a master node INFO 331 chapter 6
802.15 WPAN • The master node decides which devices are active or parked • Can have up to 255 parked devices • Operates at 2.4 GHz using TDM with slot of 625 ms, and 79 channels • Hops randomly across channels (frequency-hopping spread spectrum, or FHSS) • Data rates up to 4 Mbps INFO 331 chapter 6
WiMAX • WiMAX is World Interoperability for Microwave Access, IEEE 802.16 • It uses a base station to coordinate sending and receiving packets, similar to 802.11 infrastructure mode, using TDM • Each frame defines the physical layer properties for later packets; hence the transmission approach can change to get the best reception possible INFO 331 chapter 6
WiMAX • The transmission time allocated to each subscriber can be controlled • WiMAX uses a connection identifier in the packet to allow quality of service (QoS) to be customized • MAC addresses are mapped to the connection identifiers • WiMAX is a complex beast, and is changing rapidly INFO 331 chapter 6
Cellular Internet Access • Since Wi-Fi is limited to about 100 meters, how do we connect to the Internet when far from an access point? • Use your cell phone! • Key concerns are: • Is it fast? • Is it reliable? • Is it going to be better than a long distance wireless LAN? INFO 331 chapter 6
GSM Cellular Architecture • Cellular architecture is broken into … cells • Each cell is a geographic area served by a cell tower, which routes through a mobile switching center (MSC) • Acts like a switching center or central office • The center is connected to the Internet directly, and/or the phone system (Public Switched Telephone Network) INFO 331 chapter 6
Cellular Architecture INFO 331 chapter 6