network layer: location/service management

68
Network Layer: Location/Service Management Y. Richard Yang 11/27/2012

Upload: hieu

Post on 19-Mar-2016

56 views

Category:

Documents


3 download

DESCRIPTION

Network Layer: Location/Service Management. Y. Richard Yang 11 /27/2012. Outline. Admin. and recap Network layer Intro Location/service management. Admin. Project meeting slots posted on the Sign Up page of classesv2 - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Network Layer:  Location/Service Management

Network Layer: Location/Service

Management

Y. Richard Yang

11/27/2012

Page 2: Network Layer:  Location/Service Management

2

Outline

Admin. and recap Network layer

Intro Location/service management

Page 3: Network Layer:  Location/Service Management

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

Page 4: Network Layer:  Location/Service Management

4

Recap: Improving Wireless Capacity

transmission successful if there

are no other transmitters within a

distance (1+)r of the receiver

Interference constraint a single half-duplex

transceiver at each node

Radio interface constraint

T

b

nWTbh

1 2)(

21

)(

1

2 16)(

WTrT

b

bh

h

hb

nWL

8 rate*distance capacity:

Reduce LIncrease

W

Approx.optimal

Multipletransceivers

Reduceinterf. area

Page 5: Network Layer:  Location/Service Management

5

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

Channel Radio Power

IDLE Not allocated

Almost zero

CELL_FACH

Shared, Low Speed

Low

CELL_DCH Dedicated, High

Speed

High

Courtesy: Erran Li.

Page 6: Network Layer:  Location/Service Management

6

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

Page 7: Network Layer:  Location/Service Management

7

Recap: Wireless Link LayerThe 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

B

A

S EF

H

J

D

CG

IK

M

N

L

Page 8: Network Layer:  Location/Service Management

8

Outline

Admin. and recap Network layer

Intro to networks

Page 9: Network Layer:  Location/Service Management

9

Network Layer Services Transport packets from source to dest Network layer protocol in host and routerBasic functions: Control plane

compute routing from sources to destinations

Data plane: forwarding move packets from input interface to

appropriate output interface(s)

BA

S1 ED2

S2JD1

CG

I K

M

N

L

Page 10: Network Layer:  Location/Service Management

10

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

src dstrequest

result

Page 11: Network Layer:  Location/Service Management

Discussion: How to Specify a Destination?

11

B

A

S EF

H

J

D

CG

IK

M

N

L

Page 12: Network Layer:  Location/Service Management

Two Basic Approaches for Identifying Destinations

Locators Encode locations on

network topology

Identifiers (ID) Independent of

network topology

12

A

ED

CB

F

Page 13: Network Layer:  Location/Service Management

13

Addressing Scheme: Telephone Very first scheme: connection

by operators to business Identifier or locator?

Page 14: Network Layer:  Location/Service Management

14

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.”

Page 15: Network Layer:  Location/Service Management

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?

15

BA

S E D

FJD

CG

I KM

N

L

Page 16: Network Layer:  Location/Service Management

Evolution of Telephone Addressing Scheme

Identifier (business, person)

Locator (hierarchical phone #)

Identifier (person again w/ mobile phones, 800)

16

Page 17: Network Layer:  Location/Service Management

17

IP Addressing Also a hierarchical

locator addressing scheme

network part (high order bits)

host part (low order bits)

What’s a network? (from IP address perspective)

device interfaces with same network part of IP address

link layer can reach each other

223.1.1.1

223.1.1.3

223.1.1.4

223.1.2.2223.1.2.1

223.1.2.6

223.1.3.2223.1.3.1

223.1.3.27

223.1.1.2

223.1.7.0

223.1.7.1223.1.8.0223.1.8.1223.1.9.1

223.1.9.2

Page 18: Network Layer:  Location/Service Management

Addressing Scheme: Sensornet Example

Destination: message to a sensor (e.g., who detected fire)<ID = D> <Lat=37.3169; Long=-121.8740> <temperature = highest>

18

BA

S ED

FJ

DC

GI K

M

N

L

// id.// loc// id

Page 19: Network Layer:  Location/Service Management

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

Page 20: Network Layer:  Location/Service Management

Basic Network Layer Model

20

A

ED

CB

F

Each node is a network attachment point (e.g., router, base station), to which hosts/user device attaches

User device identified by addressing scheme• locator: identifies attachment point• identifier: independent of location

Page 21: Network Layer:  Location/Service Management

21

Routing in IP/Telephone Networks Represent a network

as a graph Determine a path

to each destination on the graph

Key problems Location management

• Find attached point for id-based naming Routing

• Find path from src to dst attach point

A

ED

CB

F2

21

3

1

1

2

53

5

Page 22: Network Layer:  Location/Service Management

Outline Admin. Network layer

Intro to networks Location management

• service discovery

22

Page 23: Network Layer:  Location/Service Management

The Service Discovery Problem

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.edu23

src dstrequest

result

Page 24: Network Layer:  Location/Service Management

24

Today’s Internet: DNS

routers

DNS<hostname, service>

IP address

servers

clients

Page 25: Network Layer:  Location/Service Management

25

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

Page 26: Network Layer:  Location/Service Management

26

DNS: Naming Scheme Each DNS server stores resource records (RR)

Type=NS name is domain (e.g.

yale.edu) value is the name of

the authoritative name server for this domain

RR format: (name, value, type, ttl)

Type=A name is hostname value is IP address

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

Page 27: Network Layer:  Location/Service Management

27

DNS Name Resolution A host queries local DNS server, who may

forward the query to the corresponding DNS server

Page 28: Network Layer:  Location/Service Management

28

Problems of Traditional DNS Service Discovery

Support fixed types of services, e.g., A, NS, CNAME, MXstatic and fixed record structure makes it difficult to introduce new services or non-trivial service queries

Depends on infrastructure: a DNS server

Page 29: Network Layer:  Location/Service Management

29

General Naming Paradigm: Linda

                                                                                       

“Distributed workspace” by David Gelernter in the 80’s at Yale

Very influential in naming and resource discovery

Page 30: Network Layer:  Location/Service Management

30

General Naming Paradigm: Linda

                                                                                       

Naming scheme: arbitrary tuples (heterogeneous-type

vectors)

Name resolution:o Nodes write into shared memoryo Node read matching tuples from

shared memory exact matching is required for extraction

Page 31: Network Layer:  Location/Service Management

31

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 evaluatedo example: eval("ab",-6,abs(-6)) creates tuple (“ab”, -6, 6)

Page 32: Network Layer:  Location/Service Management

32

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

Page 33: Network Layer:  Location/Service Management

33

JavaSpaces – Visual Overview

                                                                                                                   

Page 34: Network Layer:  Location/Service Management

34

ProgressSupport fixed types of services, e.g.,

A, NS, CNAME, MXLinda name space

Depends on infrastructure: a DNS server?

Page 35: Network Layer:  Location/Service Management

35

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 DNSformat—DNS-SD each node picks

own name:<instance name> .<app-proto> .<service> .<domain>

PrinterNetwork

169.254.1.219

169.254.4.51

169.254.10.29

Page 36: Network Layer:  Location/Service Management

36

DNS without Central DNS Server: mDNS

PrinterNetwork

169.254.1.219

169.254.4.51

169.254.10.29

PC_BILL

PC_LARRY

lj21569478

Bill’s Files

Larry’s Tunes

Laserjet in the Closet Under

the Stairs

Page 37: Network Layer:  Location/Service Management

37

mDNS: Example Use the mDNS command on Mac as example

Advertise an LPR printer on port 515mDNS -R "My Test" _printer._tcp. . 515 pdl=application/postscript

Advertise a web page on local machine

mDNS -R "My Test" _http._tcp . 80 path=/path-to-page.html

Browse web pages on local machines

mDNS -B _http._tcp

Page 38: Network Layer:  Location/Service Management

38

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

Page 39: Network Layer:  Location/Service Management

39

Service Registration in Androidpublic 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);}

Page 40: Network Layer:  Location/Service Management

40

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); } }

...}

Page 41: Network Layer:  Location/Service Management

Challenge of using Name Resolution in Mobile Computing

41

src dst

SD

name/ID

location

Name -> location binding can be dynamic as a mobile device changes attach point

Page 42: Network Layer:  Location/Service Management

Mobile Name-Loc Binding Design Issues Binding database update

Hand off dst may move during a session (phone call)

42

Page 43: Network Layer:  Location/Service Management

Outline Admin. Network layer

Intro to networks Location/service management

• service discovery• cellular network location management

43

Page 44: Network Layer:  Location/Service Management

44

BSC

Radio Subsystem

BSC

GSMMS (mobile station)BSC (base station controller)BTS (base transceiver station)MSC (mobile switching center)GMSC (gateway MSC)

fixed network

MSC MSC

GMSCNetwork &Switching Subsystemand OperationSubsystem

MS

MS

MS

MS

MS

MS

BTS

BTS

BTS

BTS

BTS

Location Registry

Page 45: Network Layer:  Location/Service Management

45

Location Registry (LR) update in Cellular NetworksProblem definition:

How to update the mapping between ph# and current attachment point (BTS) of the phone?

Page 46: Network Layer:  Location/Service Management

46

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

Page 47: Network Layer:  Location/Service Management

47

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

Page 48: Network Layer:  Location/Service Management

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

Page 49: Network Layer:  Location/Service Management

49

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

Page 50: Network Layer:  Location/Service Management

50

BSC

Radio Subsystem

BSC

GSMMS (mobile station)BSC (base station controller)BTS (base transceiver station)MSC (mobile switching center)GMSC (gateway MSC)

fixed network

MSC MSC

GMSCNetwork &Switching Subsystemand OperationSubsystem

MS

MS

MS

MS

MS

MS

BTS

BTS

BTS

BTS

BTS

VLRVLR

HLR

Page 51: Network Layer:  Location/Service Management

51

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

Page 52: Network Layer:  Location/Service Management

GSM Location Update: Example

52

Page 53: Network Layer:  Location/Service Management

GSM Location Update: Example

53

Page 54: Network Layer:  Location/Service Management

GSM Location Update: Example

54

Page 55: Network Layer:  Location/Service Management

GSM Location Update: RR Connection Setup

55

Page 56: Network Layer:  Location/Service Management

GSM Location Update: Update

56

Page 57: Network Layer:  Location/Service Management

GSM Location Update: Update

57

Page 58: Network Layer:  Location/Service Management

GSM Location Update: Update

58

Page 59: Network Layer:  Location/Service Management

GSM Location Update : Authenticate Subscriber

59

Page 60: Network Layer:  Location/Service Management

GSM Location Update: Enable Ciphering

60

Page 61: Network Layer:  Location/Service Management

GSM Location Update: RR Connection Release

61

Page 62: Network Layer:  Location/Service Management

62

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

Cell 1 Cell 2

N1N2

N12

N21

Page 63: Network Layer:  Location/Service Management

63

How to Decide the LAs: A Simple Scenario

Separate LAs for cells 1 and 2 #update: #paging:

Merge cells 1 and 2 into a single LA #update: #paging:

Cell 1 Cell 2

N1N2

N12

N21

N12 + N21

(N1 + N2)

02 (N1 + N2)

Page 64: Network Layer:  Location/Service Management

Cost Comparison

where C_update is relative cost of update to paging, assuming paging cost per cell is 1

64

• 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

Merge Separate

Page 65: Network Layer:  Location/Service Management

Extension: From GSM to GPRS to 3G UMTS

65

Page 66: Network Layer:  Location/Service Management

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

Page 67: Network Layer:  Location/Service Management

UMTS Location Update

67

Page 68: Network Layer:  Location/Service Management

68

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