* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Mobile and wireless communication
Survey
Document related concepts
Transcript
89-850 Communication Networks: Wireless and Mobile Communication Networks Prof. Amir Herzberg BIU, Dept. of CS From ch.6 of Kurose and Ross, 3rd edition; and [KMK], ch. 8. Computer Networking: A Top Down Approach Featuring the Internet, 3rd edition. Jim Kurose, Keith Ross Addison-Wesley, July 2004. All material copyright 1996-2004 J.F Kurose and K.W. Ross, All Rights Reserved 6: Wireless and Mobile Networks 6-1 Background: Wireless and Mobile Networks # wireless (mobile) phone subscribers now exceeds # wired phone subscribers! Computer nets: laptops, palmtops, PDAs, Internet-enabled phone promise anytime untethered Internet access Internet telephony: a reality, an earthquake Two important (but different) challenges Wireless link: no CD (e.g. hidden-terminal), reliability, security Mobility of computers and users; provisioning Plus: limited computing power and energy 6: Wireless and Mobile Networks 6-2 Wireless and Mobile Communication Networks: Outline 6.1 Introduction Wireless 6.2 Wireless links, characteristics 6.3 IEEE 802.11 wireless LANs (“wi-fi”) Sensor and personalarea networks Mobility 6.5 Principles: addressing and routing to mobile users 6.6 Mobile IP 6.7 Cellular networks 6.8 Mobility and higherlayer protocols 6.9 Summary 6: Wireless and Mobile Networks 6-3 Elements of a wireless network network infrastructure wireless hosts laptop, PDA, IP phone run applications may be stationary (non-mobile) or mobile wireless does not always mean mobility 6: Wireless and Mobile Networks 6-4 Elements of a wireless network network infrastructure base station typically connected to wired network relay - responsible for sending packets between wired network and wireless host(s) in its “area” e.g., cell towers, 802.11 access points 6: Wireless and Mobile Networks 6-5 Wireless network characteristics Lower Signal/Noise ratio (cf. wired networks) Limited, shared spectrum: orthogonal signals (FDMA/CDMA/TDMA) or `collisions as noise` C A B A B Hidden terminal problem C C’s signal strength A’s signal strength space B, A hear each other Signal fading: A, C can not hear each other B, C hear each other B, C hear each other B, A hear each other A, C can not hear each other interfering at B 6: Wireless and Mobile Networks 6-9 Wireless Link Characteristics Differences from wired link …. Energy and computing-power limitations Decreased signal strength • Obstacles and hidden-terminal problem • Collision detection hard or impossible More noise • Interference from other sources • Multipath propagation different delays interferences between paths or (multipath) fading Lower signal/noise Higher bit error rate …. more “difficult” 6: Wireless and Mobile Networks 6-10 Hi/Low BER States Model Wireless links often have two BER states High, Low E.g., due to (multipath) fading Model by two-state Markov model: (1g) g Good Bad b (1b) Simplify: all packets Ok in `Good`, fail in `Bad` 6: Wireless and Mobile Networks 6-11 Wireless and Mobile Communication Networks: Outline 6.1 Introduction Wireless 6.2 Wireless links, characteristics 6.3 IEEE 802.11 wireless LANs (“wi-fi”) Ad-hoc, sensor and personal-area networks Mobility 6.5 Principles: addressing and routing to mobile users 6.6 Mobile IP 6.7 Cellular networks 6.8 Mobility and higherlayer protocols 6.9 Summary 6: Wireless and Mobile Networks 6-13 IEEE 802.11 Wireless LANs 802.11 Wireless LANs 5-6 GHz 2.4-5 GHz (unlicensed) 802.11b lo-cost, good propagation; but slow, interferences Up to 11Mbps Up to 54 Mbps 802.11a 802.11g All use CSMA/CA for multiple access All have base-station and ad-hoc network versions 6: Wireless and Mobile Networks 6-14 802.11 LAN: Infrastructure and Ad-Hoc modes Infrastructure mode: wireless host communicates with base station base station = access point (AP) Internet router LAN switch AP BSS 1 DS AP Basic Service Set (BSS) (aka “cell”) contains: • wireless hosts (mobiles) • access point (AP): base station Extended Service Set (ESS) • One or more BSS • Connect by LANswitch or DS • DS=Distribution System Ad hoc mode: hosts only • =Independent BSS (IBSS) BSS 2 6: Wireless and Mobile Networks 6-16 802.11 Media Access Coordination (MAC) Point Coordination Function (PCF) Only in Infrastructure mode Access point coordinates transmissions Allows: bounded delay , QoS Distributed Coordination Function (DCF) Ad-hoc or Infrastructure mode All are peers Like Ethernet, uses CSMA: random access, carrier sense Unlike Ethernet: Ack, no Collision Detection Optional: use RTS/CTS (Request/Clear To Send) No bound on delay (starvation possible) Our focus 6: Wireless and Mobile Networks 6-18 IEEE 802.11 DCF Like Ethernet, uses CSMA: random access carrier sense: don’t collide with ongoing transmission Unlike Ethernet: Ack, no Collision Detection no collision detection – transmit all frames to completion ACK: to detect loss without collision detection Why no collision detection? difficult to receive (sense collisions) when transmitting due to weak received signals (fading) can’t sense all collisions in any case: hidden terminal, fading And… loss may be due to (higher) error rate of wireless Goal: avoid collisions: CSMA/CA (Collision Avoidance) 6: Wireless and Mobile Networks 6-19 802.11 DCF MAC Protocol: CSMA/CA [simplified] 802.11 sender 1 if sense channel idle then sender - transmit entire frame (no Colli. Detect) 2 if sense channel busy then - start random backoff timer - timer counts down while channel idle - transmit when timer expires receiver data 802.11 receiver if frame received OK then return ACK else ignore (no NACK!) SIFS: Short Inter-Frame Space – max time to begin Ack [e.g., 16μsec in 802.11a] ACK 6: Wireless and Mobile Networks SIFS (e.g. 16s) 6-20 802.11 DCF MAC Protocol: CSMA/CA sender 802.11 sender (when trying to send) 1 if sense channel idle for DIFS then DIFS transmit entire frame (no CD) [DIFS>SIFS+2Tprop for priority to ACK] 2 if sense channel busy then - count down the backoff timer - – but only while channel idle - transmit when timer expires receiver - - If ACK, reduce backoff range by 1 data DIFS - if no ACK, double backoff range, select time randomly from range, repeat 2 ACK SIFS (e.g. 16s) 802.11 receiver if frame received OK - return ACK (within SIFS) 6: Wireless and Mobile Networks 6-21 802.11 DCF MAC Operation Data Frames and their ACK DIFS Src Data SIFS Ack Dest DIFS Contention Window Next MPDU Other Defer Access Backoff after Defer Src found channel idle for DIFS send data Other sender found channel busy Wait for DIFS idle time, then exponential backoff delay [slot=Tprop] 6: Wireless and Mobile Networks 6-22 Two Additional Mechanisms in 802.11 PCF (Point Coordination Function) Polling to coordinate senders, e.g. to ensure QoS SIFS < PIFS < DIFS (priorities!) DCF with RTS/CTS mechanism Can’t detect collision while sending… Collision for long packet is wasteful RTS (Request to Send): request to reserve channel to send long packet w/o collisions CTS (Clear to Send): approve RTS Optional mechanism 6: Wireless and Mobile Networks 6-23 RTS/CTS [optional in 802.11 MAC] Sender sends small request-to-send (RTS) RTSs may collide with each other (but are short) Include indication of length of packet transmission AP broadcasts clear-to-send CTS in response to RTS CTS heard by all nodes sender transmits data frame other stations defer transmissions for time specified in CTS Q: if you hear RTS only (no CTS), should you wait? Avoid data frame collisions completely using small reservation packets! 6: Wireless and Mobile Networks 6-24 Collision Avoidance: RTS-CTS exchange A B AP reservation collision DATA (A) defer time 6: Wireless and Mobile Networks 6-25 Q: Defer on RTS, CTS or both? Idea 1: RTS contains length, defer till end A B RTS C D RTS CTS CTS data ACK ACK 6: Wireless and Mobile Networks 6-26 Q: Defer on RTS, CTS or both? Idea 1: RTS contains length, defer till end Problem: maybe not granted? Idea 2: defer only on CTS A RTS B C RTS CTS D RTS CTS data ACK ACK 6: Wireless and Mobile Networks 6-27 Q: Defer on RTS, CTS or both? Idea 1: RTS contains length, defer till end Problem: maybe not granted? Idea 2: defer only on CTS A What if unheard? RTS B C D RTS CTS CTS data ACK ACK 6: Wireless and Mobile Networks 6-28 Q: Defer on RTS, CTS or both? Idea 1: RTS contains length, defer till end Problem: maybe not granted? Idea 2: defer only on CTS What if unheard? A Solution: Defer by CTS • By length in CTS Defer by RTS… But only 2 DIFS ! Ok if A hears either recipient or sender RTS B C D RTS CTS CTS data ACK ACK 6: Wireless and Mobile Networks 6-29 802.11 DCF MAC Example 1 .... ACK Data time 2 time 3 RTS ACK Data CTS time 4 RTS CTS Data ACK time node defers; backoff counter frozen 1 backoff period RTS time 2 RTS time 3 RTS CTS Data ACK time 4 time 6: Wireless and Mobile Networks 6-30 802.11 addressing & `switching` AP R1 router H1 Internet AP R1 MAC addr AP MAC addr dest. address source address 802.3 frame AP identified in 802.11 frame (Unlike regular switch!!) AP MAC addr H1 MAC addr R1 MAC addr address 1 address 2 address 3 802.11 frame 6: Wireless and Mobile Networks 6-31 802.11: mobility within same subnet H1 remains in same IP subnet: IP address can remain same Works fine for hub Switch: which AP is associated with H1? self-learning switch will see frame from H1 and “remember” port to reach H1 Solution: when H1 joins, AP2 sends switch a packet from H1 router hub or switch BBS 1 AP 1 AP 2 H1 BBS 2 6: Wireless and Mobile Networks 6-34 MAC Management, Beacons and Traffic Indication Map (TIM) 802.11 has several MAC management frames (Re/De)Association req/response, Authentication… Beacon (sent periodically by AP) Timestamp, Beacon Interval, Capabilities, SSID, Rates, Parameters, Traffic Indication Map (TIM) Allows host to select AP (or host can send probe) TIM: list of (associated but sleeping) hosts with packets queued at the access point. Even sleeping hosts (sometimes) listen to Beacon • To check incoming messages in TIM, get broadcasts • Sleeping to save energy when idle 6: Wireless and Mobile Networks 6-35 Ad Hoc Networking Ad hoc networks no base stations transmit to other nodes within link coverage nodes organize themselves into a network: route among themselves Supported in 802.11 but still many open issues, research WANET: Wireless AdHoc NETwork MANET: Mobile Ad-Hoc Net (they move, too!) 6: Wireless and Mobile Networks 6-36 802.15: personal area network less than 10 m diameter replacement for cables (mouse, keyboard, headphones) ad hoc: no infrastructure master/slaves: slaves request permission to send (to master) master grants requests Evolved from Bluetooth P S P radius of coverage M S P S P M Master device S Slave device P Parked device (inactive) 6: Wireless and Mobile Networks 6-37 Sensor Networks A special interesting type of Ad-Hoc network… Idea: distribute low-cost `sensors` to perform measurements, even do actions Applications: Weather forecasts, natural disaster warnings Detection of physical damages (leakage, fire,…) Military applications: intelligence, smart mines Properties… Wireless Random location Low cost, energy 6: Wireless and Mobile Networks 6-38 Which Transmission Range? When using AP/Bases, nodes must reach it Large transmission range But in sensor networks, WANET? Smaller transmission range Saves energy, allows spectrum reuse (cellular?) But: requires routing, forwarding by nodes 6: Wireless and Mobile Networks 6-39 Connectivity, Topology, Routing… Assume nodes distributed uniformly in area [?] One dimensional (line), two (surface), three (space) Let n be number of nodes Let r(n) be transmission range of node Questions: Probability that all/most nodes are connected Probability that (almost) entire area is `covered` by nodes [connected to `base`/`edge`] • Number (and cost) of nodes Routing, scheduling, broadcast protocols for nodes • Using minimal resources (energy, storage) • Minimize collisions 6: Wireless and Mobile Networks 6-40 Sensor Network Tasks/Protocols Routing, forwarding, broadcast Neighbor/topology discovery, organization E.g. setup spanning tree for efficient broadcast Optimization tasks • Optimize communication • Load balancing (also to save energy) Location measurement Clock synchronization Use to save energy (listen only once per interval) Distributed computation E.g. to detect image Handling mobility (MANET) 6: Wireless and Mobile Networks 6-41 Wireless and Mobile Communication Networks: Outline 6.1 Introduction Wireless 6.2 Wireless links, characteristics 6.3 IEEE 802.11 wireless LANs (“wi-fi”) Mobility 6.5 Principles: addressing and routing to mobile users 6.6 Mobile IP 6.7 Cellular networks 6.8 Mobility and higherlayer protocols 6.9 Summary 6: Wireless and Mobile Networks 6-48 What is mobility? Covered in [KR], not in [KMK] spectrum of mobility, from the network perspective: no mobility mobile wireless user, mobile user, using same access connecting/ point disconnecting from network using DHCP. high mobility mobile user, passing through multiple access point while maintaining ongoing connections (like cell phone) 6: Wireless and Mobile Networks 6-49 Mobility: Vocabulary home network: permanent “home” of mobile (e.g., 128.119.40/24) Permanent address: address in home network, can always be used to reach mobile e.g., 128.119.40.186 home agent: entity that will perform mobility functions on behalf of mobile, when mobile is remote wide area network correspondent 6: Wireless and Mobile Networks 6-50 Mobility: 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 Foreign agent: entity in visited network that performs mobility functions on behalf of mobile. 6: Wireless and Mobile Networks 6-51 How do you contact a mobile friend: Consider friend frequently changing addresses, how do you find her? I wonder where Alice moved to? search all phone books? call her parents? expect her to let you know where he/she is? 6: Wireless and Mobile Networks 6-52 Mobility: approaches 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 `breaks` routing (aggregation), allows MITM Let end-systems handle it: indirect routing: communication from correspondent to mobile goes through home agent, then forwarded to remote direct routing: correspondent gets foreign address of mobile, sends directly to mobile 6: Wireless and Mobile Networks 6-53 Mobility: approaches Let routing handle it: routers advertise permanent Breaks not address via usual Allowsof mobile-nodes-in-residence route scalable routing table exchange. MITM aggregation to millions of attacks routing tables indicate mobiles where each mobile located no changes to end-systems let end-systems handle it: indirect routing: communication from correspondent to mobile goes through home agent, then forwarded to remote direct routing: correspondent gets care-ofaddress of mobile, sends directly to mobile 6: Wireless and Mobile Networks 6-54 Mobility: registration visited network home network 1 2 wide area network foreign agent contacts home agent home: “this mobile is resident in my network” mobile contacts foreign agent on entering visited network End result: Foreign agent knows about mobile Home agent knows location of mobile 6: Wireless and Mobile Networks 6-55 Mobility via Indirect Routing foreign agent receives packets, forwards to mobile home agent intercepts packets, forwards to foreign agent home network visited network 3 wide area network correspondent addresses packets using home address of mobile 1 2 4 mobile replies directly to correspondent 6: Wireless and Mobile Networks 6-56 Indirect Routing: comments Mobile uses two addresses: permanent address: used by correspondent (hence mobile location is transparent to correspondent) care-of-address: used by home agent to forward datagrams to mobile foreign agent functions often done by mobile itself triangle routing: correspondent-home-networkmobile inefficient when correspondent, mobile are in same network 6: Wireless and Mobile Networks 6-57 Indirect Routing: moving between networks suppose mobile user moves to another network registers with new foreign agent new foreign agent registers with home agent home agent update care-of-address for mobile packets continue to be forwarded to mobile (but with new care-of-address) mobility, changing foreign networks transparent: ongoing connections can be maintained! 6: Wireless and Mobile Networks 6-58 Mobility via Direct Routing correspondent forwards to foreign agent foreign agent receives packets, forwards to mobile home network 4 wide area network 2 correspondent requests, receives foreign address of mobile visited network 1 3 4 mobile replies directly to correspondent 6: Wireless and Mobile Networks 6-59 Mobility via Direct Routing: comments overcome triangle routing problem non-transparent to correspondent: correspondent must get care-of-address from home agent what if mobile changes visited network? 6: Wireless and Mobile Networks 6-60 Accommodating mobility with direct routing anchor foreign agent: FA in first visited network data always routed first to anchor FA when mobile moves: new FA arranges to have data forwarded from old FA (chaining) foreign net visited at session start wide area network anchor foreign agent 1 2 4 5 correspondent agent correspondent 3 new foreign agent new foreign network 6: Wireless and Mobile Networks 6-61 Response (mobilecorresponding) Triangle routing: mobile corresponding Using mobile host’s `home’ IP address Foreign network may block for `IP spoofing` (egress filtering) Indirect via foreign: mobileFA corresp. Requires FA (Foreign agent) to `spoof` Indirect via home: mobile homecorresp. Overhead… but works Direct: mobile corresponding Use temporary IP address (and mobile IP) 6: Wireless and Mobile Networks 6-62 Wireless and Mobile Communication Networks: Outline 6.1 Introduction Wireless 6.2 Wireless links, characteristics 6.3 IEEE 802.11 wireless LANs (“wi-fi”) Mobility 6.5 Principles: addressing and routing to mobile users 6.6 Mobile IP 6.7 Cellular networks 6.8 Mobility and higherlayer protocols 6.9 Summary 6: Wireless and Mobile Networks 6-63 Mobile IP RFC 3220 has many features we’ve seen: home agents, foreign agents, foreign-agent registration, care-of-addresses, encapsulation (packet-within-a-packet) three components to standard: indirect routing of datagrams agent discovery registration with home agent 6: Wireless and Mobile Networks 6-64 Mobile IP: indirect routing foreign-agent-to-mobile packet packet sent by home agent to foreign agent: a packet within a packet dest: 79.129.13.2 dest: 128.119.40.186 dest: 128.119.40.186 Permanent address: 128.119.40.186 dest: 128.119.40.186 Care-of address: 79.129.13.2 packet sent by correspondent 6: Wireless and Mobile Networks 6-65 Mobile IP: agent discovery agent advertisement: foreign/home agents advertise service by broadcasting ICMP messages (typefield = 9) 0 type = 9 H,F bits: home and/or foreign agent R bit: registration required 16 8 24 checksum =9 code = 0 =9 standard ICMP fields router address type = 16 length registration lifetime sequence # RBHFMGV reserved bits 0 or more available Care-Of-Addresses (COA) mobility agent advertisement extension 6: Wireless and Mobile Networks 6-66 Mobile IP: registration example home agent HA: 128.119.40.7 foreign agent COA: 79.129.13.2 visited network: 79.129.13/24 ICMP agent adv. COA: 79.129.13.2 …. registration req. COA: 79.129.13.2 HA: 128.119.40.7 MA: 128.119.40.186 Lifetime: 9999 identification: 714 encapsulation format …. 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 …. 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 …. 6: Wireless and Mobile Networks 6-67 Wireless and Mobile Communication Networks: Outline 6.1 Introduction Wireless 6.2 Wireless links, characteristics 6.3 IEEE 802.11 wireless LANs (“wi-fi”) Mobility 6.5 Principles: addressing and routing to mobile users 6.6 Mobile IP 6.7 Cellular networks 6.8 Mobility and higherlayer protocols 6.9 Summary 6: Wireless and Mobile Networks 6-68 Components of cellular network architecture MSC cell connects cells to wide area net manages call setup (more later!) handles mobility (more later!) 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 Mobile Switching Center Public telephone network, and Internet Mobile Switching Center wired network 6: Wireless and Mobile Networks 6-69 Multiple operators (providers) recall: correspondent wired public telephone network MSC MSC MSC MSC MSC different cellular networks, operated by different providers 6: Wireless and Mobile Networks 6-70 Handling mobility in cellular networks home network: network of cellular provider you subscribe to (e.g., Sprint PCS, Verizon) home location register (HLR): database in home network containing permanent cell phone #, profile information (services, preferences, billing), information about current location (could be in another network) 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 6: Wireless and Mobile Networks 6-71 GSM: indirect routing to mobile home network HLR 2 home MSC consults HLR, gets roaming number of mobile in visited network correspondent home Mobile Switching Center 1 3 VLR Mobile Switching Center 4 Public switched telephone network call routed to home network home MSC sets up 2nd leg of call to MSC in visited network mobile user visited network MSC in visited network completes call through base station to mobile 6: Wireless and Mobile Networks 6-72 GSM: handoff with common MSC Handoff goal: route call via new base station (without interruption) reasons for handoff: VLR Mobile Switching Center old routing old BSS new routing new BSS stronger signal to/from new BSS (continuing connectivity, less battery drain) 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 6: Wireless and Mobile Networks 6-73 GSM: handoff with common MSC VLR Mobile Switching Center 2 4 1 8 old BSS 5 7 3 6 new BSS 1. old BSS informs MSC of impending handoff, provides list of 1+ new BSSs 2. MSC sets up path (allocates resources) to new BSS 3. new BSS allocates radio channel for use by mobile 4. new BSS signals MSC, old BSS: ready 5. old BSS tells mobile: perform handoff to new BSS 6. mobile, new BSS signal to activate new channel 7. mobile signals via new BSS to MSC: handoff complete. MSC reroutes call 8 MSC-old-BSS resources released 6: Wireless and Mobile Networks 6-74 GSM: handoff between MSCs anchor MSC: first MSC visited during cal home network correspondent Home MSC call remains routed through anchor MSC new MSCs add on to end anchor MSC PSTN MSC MSC MSC of MSC chain as mobile moves to new MSC Or: optional path minimization step to shorten multi-MSC chain 6: Wireless and Mobile Networks 6-75 GSM: handoff between MSCs anchor MSC: first MSC visited during cal home network correspondent Home MSC call remains routed through anchor MSC new MSCs add on to end anchor MSC PSTN MSC MSC MSC (b) after handoff of MSC chain as mobile moves to new MSC IS-41 allows optional path minimization step to shorten multi-MSC chain 6: Wireless and Mobile Networks 6-76 Wireless, mobility: impact on higher layer protocols logically, impact should be minimal … best effort service model remains unchanged TCP and UDP can (and do) run over wireless, mobile … but performance-wise: packet loss/delay due to noise, collisions, handoff TCP interprets loss as congestion, will decrease congestion window un-necessarily delay impairments for real-time traffic limited bandwidth of wireless links 6: Wireless and Mobile Networks 6-78 Summary Wireless wireless links: capacity, distance channel impairments CDMA IEEE 802.11 (“wi-fi”) CSMA/CA reflects wireless channel characteristics cellular access Mobility principles: addressing, routing to mobile users home, visited networks direct, indirect routing care-of-addresses case studies mobile IP mobility in GSM impact on higher-layer protocols 6: Wireless and Mobile Networks 6-79