Module 6: Wireless Mobile Networks SMD123 Computer Communications Kaustubh Phanse Department of Computer Science and Electrical Engineering Luleå University of Technology Lecture Objectives Wireless links and characteristics Challenges in wireless mobile networks Wireless access technologies IEEE 802.11 (WiFi) wireless LANs IEEE 802.15 (Bluetooth) Cellular networks Mobility management Mobile IP Cellular networks SMD123 Computer Communications 2 1
Elements of a wireless network Network infrastructure Wireless hosts Laptop, PDA, IP phone, Running user applications May be stationary or mobile Wireless does not always mean mobility SMD123 Computer Communications 3 Elements of a wireless network Network infrastructure Base station Typically connected to a wired network Acts as a relay e.g., Cell towers, WiFi 802.11 access points SMD123 Computer Communications 4 2
Elements of a wireless network Network infrastructure Wireless link Typically used to connect mobile(s) to base station Also used as backbone link Multiple access protocol coordinates link access Various data rates, transmission distance, SMD123 Computer Communications 5 Communication modes in wireless networks Network infrastructure Infrastructure mode Base station connects mobiles into wired network Handoff: mobile changes base station providing connection into wired network SMD123 Computer Communications 6 3
Communication modes in wireless networks Ad hoc mode No base stations Nodes can only transmit to other nodes within link coverage Nodes spontaneously form a network All hosts are generally expected to route packets SMD123 Computer Communications 7 Wireless Link Characteristics Decreased signal strength: radio signal attenuates as it propagates through matter (path loss) Interference from other sources: standardized wireless network frequencies (e.g., 2.4 GHz) shared by other devices (e.g., phones, microwave ovens); devices (motors) interfere as well Multipath propagation: radio signal reflects off objects, ground, arriving at destination at slightly different times Communication across (even a point to point) wireless link much more difficult! Multiple access becomes complex! SMD123 Computer Communications 8 4
Code Division Multiple Access (CDMA) Used in several wireless communication standards Unique code (a.k.a chipping sequence) assigned to each user; i.e., code set partitioning Encoded signal = (original data) X (chipping sequence) Decoding: inner-product of encoded signal and chipping sequence Allows multiple users to coexist and transmit simultaneously with minimal interference SMD123 Computer Communications 9 CDMA Encode/Decode sender data bits code d 0 = 1 d 1 = 1 1 1 1 1 1 1 1 slot 1 slot 0 Z i,m = d i. cm channel output Z i,m 1 1 1 1 1 1 1 1 slot 1 channel output slot 0 channel output received input code receiver 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 slot 1 slot 0 D i = Σ Z i,m. cm m=1 M M d 1 = slot 1 channel output d 0 = 1 slot 0 channel output SMD123 Computer Communications 10 5
IEEE 802.11 Wireless LANs 802.11b 2.4-5 GHz unlicensed radio spectrum Up to 11 Mbps Direct sequence spread spectrum (DSSS) in physical layer All hosts use same chipping code Widely deployed, using base stations All use CSMA/CA for multiple access All have base-station and ad-hoc network versions Newer versions of 802.11 802.11a (5-6 GHz range, up to 54 Mbps) 802.11g (2.4-5 GHz range, up to 54 Mbps) SMD123 Computer Communications 11 802.11 LAN Architecture Internet Basic Service Set (BSS) contains: In infrastructure mode: wireless hosts and base stations, a.k.a Access point (AP) BSS 1 AP Distribution system AP BSS 2 SMD123 Computer Communications 12 Extended Service Set (ESS) is a set of several connected BSSs Distribution system connects two or more BSSs Still far from reality! No standard for inter-ap communication ESS 6
802.11 LAN Architecture (contd.) Independent Basic Service Set (IBSS) is an independent wireless LAN: either in infrastructure or ad hoc mode No connectivity to other BSSs or LANs AP Infrastructure mode Ad hoc mode SMD123 Computer Communications 13 802.11: Channels 802.11b: spectrum divided into 11 channels (North America) at different frequencies [13 channels for Europe] Neighboring APs should choose non-overlapping frequency bands to ensure interference-free operation 802.11b Channel Distribution in North America SMD123 Computer Communications 14 7
802.11: Association AP broadcasts beacon frames (containing the SSID: Service Set Identifier and its MAC address) periodically Host must associate with an AP Scans channels, listening for beacon frames Selects AP to associate with May perform authentication (Module 8!) Will typically run DHCP to get IP address in AP s subnet SMD123 Computer Communications 15 IEEE 802.11: Multiple Access Distributed Coordination Function (DCF) CSMA - transmit only when channel is idle No collision detection! Difficult to sense collisions when transmitting due to weak received signals (fading) Can t sense all collisions in any case: e.g., hidden terminal So instead, avoid collisions as far as possible! CSMA/CA: CSMA with collision avoidance Point Coordination Function (PCF) Contention-free polling: AP decides which host should transmit SMD123 Computer Communications 16 8
IEEE 802.11: Multiple Access (contd.) Shortest Inter-Frame Spacing (SIFS) Shortest waiting time for medium access (10 OR 28 usec) Generally used by high priority traffic and control messages such as ACKs DCF Inter-Frame Spacing (DIFS) Longest waiting time for medium access SIFS + two slot times PCF Inter-Frame Spacing (PIFS) Waiting time in between SIFS and DIFS SIFS + one slot time SMD123 Computer Communications 17 IEEE 802.11 CSMA/CA Sense is channel is idle for DIFS, if yes, then transmit entire frame If frame received OK, receiver responds with an ACK after SIFS If channel sensed busy then Start random backoff timer Timer counts down while channel idle Transmit when timer expires If no ACK received after transmitting frame, increase random backoff interval, and restart timer Channel sensed idle sender receiver DIFS data SIFS ACK SMD123 Computer Communications 18 9
Hidden terminal problem A, B hear each other B, C hear each other A, C can not hear each other In other words, A and C are unaware of collision of their simultaneous transmission to B! A B C SMD123 Computer Communications 19 Alleviating hidden terminal problem Basic idea: allow sender to reserve channel rather than random access of data frames Sender first transmits a small request-to-send (RTS) packet using CSMA Simultaneous RTSs may still collide with each other (but they re short) Avoid collisions of long data frames The receiver broadcasts clear-to-send (CTS) in response to RTS All nodes that hear RTS and/or CTS know that the channel is being reserved Sender that received the CTS transmits data frame Other stations defer transmissions SMD123 Computer Communications 20 10
Example scenario with RTS-CTS A AP B RTS(A) RTS(B) reservation collision RTS(A) CTS(A) CTS(A) DATA (A) time ACK(A) ACK(A) SMD123 Computer Communications 21 802.11 frame: addressing frame control 2 2 6 6 6 2 6 0-2312 4 duration address 1 address 2 address 3 seq control address 4 payload CRC Address 1: MAC address of wireless host or AP to receive this frame Address 2: MAC address of wireless host or AP transmitting this frame Address 3: MAC address of router interface to which AP is attached Address 4: for use only in ad hoc mode SMD123 Computer Communications 22 11
More on 802.11 framing duration of reserved transmission time (RTS/CTS) frame sequence number (for reliable ARQ) frame control 2 2 6 6 6 2 6 0-2312 4 duration address 1 address 2 address 3 seq control address 4 payload CRC 2 2 4 1 1 1 1 1 1 1 1 Protocol To From More Power More Type Subtype Retry WEP Rsvd version AP AP frag mgt data frame type (RTS, CTS, ACK, data) SMD123 Computer Communications 23 802.15: Personal Area Network (PAN) Less than 10 m diameter Replace cables (mouse, keyboard, headphones, ) Ad hoc: no infrastructure Master/slaves: Slaves seek permission to transmit Master grants requests 802.15: evolved from Bluetooth specification 2.4-2.5 GHz radio band Up to 721 kbps S M S P S P M P S P radius of coverage P Master device Slave device Parked device (inactive) SMD123 Computer Communications 24 12
Cellular Network Architecture cell covers geographical region base station (BS) analogous to 802.11 AP mobile users attach to network through BS air-interface: physical and link layer protocol between mobile and BS MSC connects cells to wide area net manages call setup (more later!) handles mobility (more later!) Mobile Switching Center Mobile Switching Center Public telephone network, and Internet SMD123 Computer Communications 25 Cellular standards: brief survey 2G systems: voice channels IS36 TDMA: combined FDMA/TDMA (North America) GSM (Global System for Mobile Communications): combined FDMA/TDMA (most of Europe and Asia) Most widely deployed IS-95 CDMA SMD123 Computer Communications 26 13
Cellular standards: brief survey 2.5 G systems: voice and data channels General Packet Radio Service (GPRS) Evolved from GSM Data sent on multiple channels (if available) Enhanced Data rates for Global Evolution (EDGE) Also evolved from GSM, using enhanced modulation Date rates up to 384 kbps CDMA-2000 (phase 1) Data rates up to 144 kbps Evolved from IS-95 SMD123 Computer Communications 27 Cellular standards: brief survey 3G systems: multimedia Two major and competing standards Universal Mobile Telecommunications Service (UMTS) CDMA-2000 Data rates in the range: 144 kbps 2 Mbps Quality of Service (QoS) 4G? ng? SMD123 Computer Communications 28 14
What is mobility? Spectrum of mobility, from the network perspective: no mobility nomadicity high mobility mobile wireless user, using same access point mobile user, connecting/ disconnecting from network using DHCP. mobile user, passing through multiple access point while maintaining ongoing connections (like cell phone) SMD123 Computer Communications 29 Handling mobility in cellular networks Home network: network of cellular provider you subscribe to (e.g., Telia, Vodafone, ) Home Location Register (HLR) permanent cell phone number, profile information (services, preferences, billing), information about current location, etc. Visited network: network in which mobile currently resides Visitor Location Register (VLR): database with entry for each user currently in network Could be home network SMD123 Computer Communications 30 15
GSM: Indirect Routing to Mobile home MSC consults HLR, gets roaming number of mobile in visited network mobile user HLR 2 home network home Mobile Switching Center VLR Mobile Switching Center 4 visited network SMD123 Computer Communications 31 3 correspondent 1 call routed to home network Public switched telephone network home MSC sets up 2 nd leg of call to MSC in visited network MSC in visited network completes call through base station to mobile GSM: Handoff within same MSC old BSS VLR Mobile Switching Center old routing new routing new BSS Handoff goal: route call via new base station (without interruption) Reasons for handoff: Stronger signal to/from new base station Load balance: free up channel in current BSS GSM doesn t mandate why to perform handoff (policy), only how (mechanism) Handoff initiated by old BSS SMD123 Computer Communications 32 16
GSM: Handoff with Common MSC old BSS VLR Mobile Switching Center 2 4 1 7 8 5 6 3 new BSS SMD123 Computer Communications 33 GSM: Handoff between MSCs Anchor MSC: first MSC visited during call call remains routed through anchor MSC New MSCs add on to end of MSC chain as mobile moves to new MSC IS-41 allows optional path minimization step to shorten multi-msc chain SMD123 Computer Communications 34 17
GSM: Handoff between MSCs home network Home MSC correspondent home network Home MSC correspondent anchor MSC MSC PSTN anchor MSC MSC PSTN MSC MSC MSC MSC (a) before handoff (b) after handoff SMD123 Computer Communications 35 Handling mobility in the Internet Let routing handle it: routers advertise permanent address of mobile-nodes-in-residence via usual routing table exchange. routing tables indicate where each mobile located no changes to end-systems Let end-systems and network edge handle it SMD123 Computer Communications 36 18
Mobility: approaches Let routing handle it: routers not advertise permanent address of mobile-nodes-in-residence scalable via usual routing table exchange. routing tables indicate to millions where ofeach mobile located mobiles no changes to end-systems Let end-systems and network edge handle it But how? Mobile IP! SMD123 Computer Communications 37 Mobile IP: Vocabulary Home network: permanent home of mobile (e.g., 128.119.40/24) Home agent: entity that will perform mobility functions on behalf of mobile, when mobile is remote Permanent address: address in home network, can always be used to reach mobile e.g., 128.119.40.186 wide area network correspondent SMD123 Computer Communications 38 19
Mobile IP: More Vocabulary Permanent address: remains constant (e.g., 128.119.40.186) Visited network: network in which mobile currently resides (e.g., 79.129.13/24) Care-of-address: address in visited network. (e.g., 79,129.13.2) wide area network Correspondent: wants to communicate with mobile SMD123 Computer Communications 39 Foreign agent: entity in visited network that performs mobility functions on behalf of mobile. Mobile IP: Agent Discovery Agent advertisement: foreign/home agents advertise service by broadcasting ICMP messages 0 8 16 24 type = 9 code = 0 checksum H,F bits: home and/or foreign agent router address standard ICMP fields R bit: registration required type = 16 length sequence # RBHFMGV registration lifetime reserved bits 0 or more care-ofaddresses mobility agent advertisement extension SMD123 Computer Communications 40 20
Mobile IP: Registration Example home agent HA: 128.119.40.7 foreign agent COA: 79.129.13.2 ICMP agent adv. COA: 79.129.13.2. visited network: 79.129.13/24 Mobile agent MA: 128.119.40.186 registration req. COA: 79.129.13.2 HA: 128.119.40.7 MA: 128.119.40.186 Lifetime: 9999 identification: 714 encapsulation format. registration req. COA: 79.129.13.2 HA: 128.119.40.7 MA: 128.119.40.186 Lifetime: 9999 identification:714. registration reply time HA: 128.119.40.7 MA: 128.119.40.186 Lifetime: 4999 Identification: 714 encapsulation format. registration reply HA: 128.119.40.7 MA: 128.119.40.186 Lifetime: 4999 Identification: 714. SMD123 Computer Communications 41 Mobile IP: Indirect Routing foreign-agent-to-mobile packet packet sent by home agent to foreign agent: a packet within a packet dest: 128.119.40.186 dest: 79.129.13.2 dest: 128.119.40.186 Permanent address: 128.119.40.186 dest: 128.119.40.186 packet sent by correspondent Care-of address: 79.129.13.2 Triangle routing is not very efficient! SMD123 Computer Communications 42 21
Mobility via Direct Routing Route optimization home network correspondent forwards to foreign agent foreign agent receives packets, forwards to mobile 4 visited network correspondent requests, receives foreign address of mobile 2 1 wide area network 3 4 mobile replies directly to correspondent SMD123 Computer Communications 43 22