* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download CS434/534: introduction
Asynchronous Transfer Mode wikipedia , lookup
Distributed firewall wikipedia , lookup
Internet protocol suite wikipedia , lookup
Computer network wikipedia , lookup
Network tap wikipedia , lookup
Piggybacking (Internet access) wikipedia , lookup
Airborne Networking wikipedia , lookup
List of wireless community networks by region wikipedia , lookup
Cracking of wireless networks wikipedia , lookup
Recursive InterNetwork Architecture (RINA) wikipedia , lookup
Network Layer: Location/Service Management Y. Richard Yang 11/27/2012 Outline Admin. and recap Network layer Intro Location/service management 2 Admin. Project meeting slots posted on the Sign Up page of classesv2 If none of the time works, please send me email to schedule appointments Each team needs to schedule two meetings to discuss your project by the end of semester Sharing of devices (status post to a google doc?) 4 x 10” Android (2 Xoom, 1 Nexus 10, 1 Galaxy Tab 2 10.1 ) 3 x 7” Android (2 Nexus 7/Wifi; 2 Nexus 7/Wifi/Cellular) 1 x Android phone 1 x iPad 2 1 x iPad w/ Retina display 1 x Nokia Lumia 920 10 x GNURadio sets 1 x Altera FPGA set 3 Recap: Improving Wireless Capacity Reduce interf. area Radio interface constraint Interference constraint a single half-duplex transmission transceiver at each node Multiple successful if there are no other transmitters within a distance (1+D)r of the receiver transceivers T n h(b) WT 2 b 1L Reduce rate*distance capacity: T h ( b ) Approx. optimal 16WT (r ) 2 D b 1 h 1 h 2 b Increase W 8W L n D 4 Recap: RRC State and App Given the large overhead for radio resource control (RRC), wireless networks implement RRC state machine on mobile devices for data connection Courtesy: Erran Li. Channel Radio Power IDLE Not allocated Almost zero CELL_FAC H Shared, Low Speed Low CELL_DCH Dedicated, High Speed High 5 Case Study: Pandora Streaming Problem: High resource overhead of periodic audience measurements (every 1 min) Recommendation: Delay transfers and batch them with delay-sensitive transfers 6 Recap: Wireless Link Layer The basic services of the link layer framing, link reliability, etc link access: interference, quality of service (and fairness) control, link state management Guided by network layer transmit to which neighbor at what quality S E F B C M J A L G H K I D N 7 Outline Admin. and recap Network layer Intro to networks 8 Network Layer Services Transport packets from source to dest Network layer protocol in host and router Basic functions: Control plane S1 B A compute routing from sources to destinations E D2 C G S2 I K J M L D1 N Data plane: forwarding move packets from input interface to appropriate output interface(s) 9 Network Layer: API API (provided to upper layer) transmit( info, src, dest, …); A key decision in network layer design is how to represent destinations? we refer to how a client specifies destination as the addressing scheme the supported addressing scheme(s) can have profound impacts on usability, flexibility, scalability request src dst result 10 Discussion: How to Specify a Destination? S E F B C M J A L G H K I D N 11 Two Basic Approaches for Identifying Destinations Locators Encode locations on network topology Identifiers (ID) B C A F D E Independent of network topology 12 Addressing Scheme: Telephone Very first scheme: connection by operators to business Identifier or locator? 13 Addressing Scheme: Telephone The telephone numbering scheme: invented in 1888 by Almon Strowger, an undertaker: “No longer will my competitor steal all my business just because his wife is a BELL operator.” 14 Addressing Scheme: Telephone E.164: Maximum 15 digits Hierarchical addressing scheme: country code + national destination (area) code (optional) + subscriber number e.g., +1-203-432-6400 Why hierarchical addressing scheme? S E D B C M L J A G F D K I N 15 Evolution of Telephone Addressing Scheme Identifier (business, person) Locator (hierarchical phone #) Identifier (person again w/ mobile phones, 800) 16 IP Addressing Also a hierarchical locator addressing scheme network part (high order bits) host part (low order bits) 223.1.1.2 223.1.1.1 223.1.1.4 223.1.1.3 223.1.9.2 What’s a network? 223.1.9.1 223.1.8.1 (from IP address perspective) 223.1.2.6 device interfaces with same network part of 223.1.2.1 223.1.2.2 IP address link layer can reach each other 223.1.7.0 223.1.8.0 223.1.7.1 223.1.3.27 223.1.3.1 223.1.3.2 17 Addressing Scheme: Sensornet Example Destination: message to a sensor (e.g., who detected fire) // id. <ID = D> <Lat=37.3169; Long=-121.8740> // loc <temperature = highest> // id S B A E D C J G F I K M L D N 18 Addressing Scheme: Printer How may we specify the destination as the color printer on the 2nd floor of AKW Internet domain name: lw2c.cs.yale.edu Internet protocol (IP) address: 128.36.231.8 [building = AKW; floor=2; entity = printer; quality = color] 19 Basic Network Layer Model Each node is a network attachment point (e.g., router, base station), to which hosts/user device attaches B C A F D E User device identified by addressing scheme • locator: identifies attachment point • identifier: independent of location 20 Routing in IP/Telephone Networks Represent a network as a graph Determine a path to each destination on the graph 5 2 A 2 1 Key problems B D 3 C 3 1 5 F 1 E 2 Location management • Find attached point for id-based naming Routing • Find path from src to dst attach point 21 Outline Admin. Network layer Intro to networks Location management • service discovery 22 The Service Discovery Problem request src dst result How does a src connect to a dst in an ID- based addressing scheme? ID-based phone# IP address difficult to remember, uses domain name lw2.cs.yale.edu 23 Today’s Internet: DNS clients DNS <hostname, service> routers IP address servers 24 DNS: Domain Name System Function map domain name (e.g. cs.yale.edu) and service type (e.g., email) to IP address (e.g. 128.36.232.5) Domain name: a hierarchical name space implemented by a distributed database to allow distributed, autonomous administration called a zone 25 DNS: Naming Scheme Each DNS server stores resource records (RR) RR format: (name, Type=A name is hostname value is IP address Type=NS name is domain (e.g. yale.edu) value is the name of the authoritative name server for this domain value, type, ttl) Type=CNAME name is an alias name for some “canonical” (the real) name value is canonical name Type=MX value is hostname of mail server associated with name 26 DNS Name Resolution A host queries local DNS server, who may forward the query to the corresponding DNS server 27 Problems of Traditional DNS Service Discovery Support fixed types of services, e.g., A, NS, CNAME, MX static and fixed record structure makes it difficult to introduce new services or non-trivial service queries Depends on infrastructure: a DNS server 28 General Naming Paradigm: Linda “Distributed workspace” by David Gelernter in the 80’s at Yale Very influential in naming and resource discovery 29 General Naming Paradigm: Linda Naming scheme: arbitrary tuples (heterogeneous-type vectors) Name resolution: o Nodes write into shared memory o Node read matching tuples from shared memory exact matching is required for extraction 30 Linda: Core API out(): writes tuples to shared space example: out("abc", 1.5, 12). result: insert (“abc”, 1.5, 12) into space read(): retrieves tuple copy matching arg list (blocking) example: read(“abc”, ? A, ? B) result: finds (“abc”, 1.5, 12) and sets local variables A = 1.5, B = 12. Tuple (“abc”, 1.5, 12) is still resident in space. in(): retrieves and deletes matching tuple from space (blocking) example: same as above except (“abc”, 1.5, 12) is deleted eval(expression): similar to out except that the tuple argument to eval is evaluated o example: eval("ab",-6,abs(-6)) creates tuple (“ab”, -6, 6) 31 Linda Extension: JavaSpaces Industry took Linda principles and made modifications add transactions, leases, events store Java objects instead of tuples a very comprehensive service discovery system Definitive book, “JavaSpaces Principles, Patterns, and Practice” 2 of 3 authors got Ph.D.’s from Yale 32 JavaSpaces – Visual Overview 33 Progress Support fixed types of services, e.g., A, NS, CNAME, MX Linda name space Depends on infrastructure: a DNS server ? 34 DNS without Central DNS Server: mDNS Multicast in a small world no central address server • each node is a responder link-local addressing • send to multicast address: 224.0.0.251 Leverage DNS 169.254.1.219 format—DNS-SD each node picks own name: <instance name> . <app-proto> . <service> . <domain> Network Printer 169.254.10.29 169.254.4.51 35 DNS without Central DNS Server: mDNS PC_BILL 169.254.1.219 Laserjet in the Closet Under the Stairs Bill’s Files Printer Network 169.254.10.29 lj21569478 169.254.4.51 PC_LARRY Larry’s Tunes 36 mDNS: Example Use the mDNS command on Mac as example Advertise an LPR printer on port 515 mDNS -R "My Test" _printer._tcp. . 515 pdl=application/postscript Advertise a web page on local machine mDNS -R "My Test" _http._tcp . 80 path=/pathto-page.html Browse web pages on local machines mDNS -B _http._tcp 37 Service Discovery in Android Based on mDNS/DNS-SD Foundation for peer-to-peer/Wi-Fi Direct in Android See http://developer.android.com/training/connect- devices-wirelessly/nsd.html 38 Service Registration in Android public void registerService(int port) { NsdServiceInfo serviceInfo = new NsdServiceInfo(); serviceInfo.setServiceName("NsdChat"); serviceInfo.setServiceType("_http._tcp."); serviceInfo.setPort(port); mNsdManager = Context.getSystemService(Context.NSD_SERVICE); mNsdManager.registerService( serviceInfo, NsdManager.PROTOCOL_DNS_SD, mRegistrationListener); } 39 Service Discovery in Android mNsdManager.discoverServices( SERVICE_TYPE, NsdManager.PROTOCOL_DNS_SD, mDiscoveryListener); public void initializeDiscoveryListener() { // Instantiate a new DiscoveryListener mDiscoveryListener = new NsdManager.DiscoveryListener() { // Called as soon as service discovery begins. @Override public void onDiscoveryStarted(String regType) { Log.d(TAG, "Service discovery started"); } @Override public void onServiceFound(NsdServiceInfo service) { // A service was found! Do something with it. Log.d(TAG, "Service discovery success" + service); if (!service.getServiceType().equals(SERVICE_TYPE)) { // Service type is the string containing the protocol and // transport layer for this service. Log.d(TAG, "Unknown Service Type: " + service.getServiceType()); } else if (service.getServiceName().equals(mServiceName)) { // The name of the service tells the user what they'd be // connecting to. It could be "Bob's Chat App". Log.d(TAG, "Same machine: " + mServiceName); } else if (service.getServiceName().contains("NsdChat")){ mNsdManager.resolveService(service, mResolveListener); } } ... } 40 Challenge of using Name Resolution in Mobile Computing src dst location name/ ID SD Name -> location binding can be dynamic as a mobile device changes attach point 41 Mobile Name-Loc Binding Design Issues Binding database update Hand off dst may move during a session (phone call) 42 Outline Admin. Network layer Intro to networks Location/service management • service discovery • cellular network location management 43 MS (mobile station) BSC (base station controller) BTS (base transceiver station) MSC (mobile switching center) GMSC (gateway MSC) GSM Network & Switching Subsystem and Operation Subsystem Location Registry GMSC fixed network MSC MSC BSC MS BSC MS Radio Subsystem BTS MS MS MS BTS BTS MS BTS BTS 44 Location Registry (LR) update in Cellular Networks Problem definition: How to update the mapping between ph# and current attachment point (BTS) of the phone? 45 Two Primitives for Cellular Location Management Mobile station: reports to the network of the cell it is in called update uses the uplink channel Network: queries different cells to locate a mobile station called paging uses the downlink channel 46 Performance of the Two Primitives A city with 3M users During busy hour (11 am - noon) Update only total # update messages: 25.84 millions Paging only call arrival rate: 1433 calls/sec total # paging transactions: 5.2 millions 47 Discussion A user receives one call for ~5 cells (25M vs 5M) visited, thus may not need to update after every switching of cell However, if no update at all, then paging cost can be high—may need to page the MS at every cell Q: how do you page? 48 Location Management Through Location Areas (LA) Used in the current cellular networks A hybrid of paging and update Partitions the cells into location areas (LA) e.g., around 10 cells in diameter in current systems A global home location register (HLR) database for a carrier An MSC of each LA maintains a visitor location register (VLR) of the LA 49 MS (mobile station) BSC (base station controller) BTS (base transceiver station) MSC (mobile switching center) GMSC (gateway MSC) GSM Network & Switching Subsystem and Operation Subsystem HLR MSC GMSC fixed network MSC VLR VLR BSC MS BSC MS Radio Subsystem BTS MS MS MS BTS BTS MS BTS BTS 50 LA Based Update/Paging Each cell (BTS) of an LA periodically announces its LA id If a MS moves to a new LA, it reports its location to visiting MSC MSC/VLR notifies HLR that it currently has MS When locating a MS, the network pages the cells in an LA 51 GSM Location Update: Example 52 GSM Location Update: Example 53 GSM Location Update: Example 54 GSM Location Update: RR Connection Setup 55 GSM Location Update: Update 56 GSM Location Update: Update 57 GSM Location Update: Update 58 GSM Location Update : Authenticate Subscriber 59 GSM Location Update: Enable Ciphering 60 GSM Location Update: RR Connection Release 61 Remaining Issue: How to Decide the LAs: A Simple Model Assume the cells are given Cell i has on average Ni users in it during one unit time; each user receives calls per unit time There are Nij users move from cell i to cell j in a unit of time N12 Cell 2 Cell 1 N1 N21 N2 62 How to Decide the LAs: A Simple Scenario N12 Cell 2 Cell 1 N1 N21 N2 Separate LAs for cells 1 and 2 #update: N12 + N21 #paging: (N1 + N2) Merge cells 1 and 2 into a single LA #update: 0 #paging: 2 (N1 + N2) 63 Cost Comparison Separate Merge Cupdate (N12 + N 21 ) ? 2l (N1 + N2 ) where C_update is relative cost of update to paging, assuming paging cost per cell is 1 • At the same mobility, if call arrival rate is high, more likely separate • At the same call arrival rate, if higher mobility, more likely to merge 64 Extension: From GSM to GPRS to 3G UMTS 65 Extension: From GSM to GPRS to 3G UMTS Issue: it is anticipated that users will make more connections in data network Same mobility but higher lambda => smaller location area 66 UMTS Location Update 67 Summary The LA/RA/UTRANA design considers call pattern: when (how often) does a mobile station receive a call mobility model: how does a mobile station move Issues of LA based approaches Users roaming in LA borders may generate a lot of updates 68