smartphone packet relay networks

49
Smartphone Packet Relay Networks David Flanagan Rochester Institute of Technology August 2012

Upload: napua

Post on 06-Feb-2016

41 views

Category:

Documents


0 download

DESCRIPTION

Smartphone Packet Relay Networks. David Flanagan Rochester Institute of Technology August 2012. Project Overview Introduction/Motivations Related Work Implementation Hardware Project Architecture Results Future Work Conclusion Questions. Outline. SPRN Overview. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Smartphone Packet Relay Networks

Smartphone Packet Relay Networks

David Flanagan

Rochester Institute of TechnologyAugust 2012

Page 2: Smartphone Packet Relay Networks

2/49

Outline• Project Overview• Introduction/Motivations• Related Work• Implementation Hardware• Project Architecture• Results• Future Work• Conclusion• Questions

Page 3: Smartphone Packet Relay Networks

3/49

SPRN Overview SPRN: Smartphone Packet Relay Network Ad-hoc message relaying, phone to phone Self forming, Multi-hop Bluetooth, initially On-demand routing Backup for primary cellular network

Page 4: Smartphone Packet Relay Networks

4/49

Motivation Backup communication for normal cell network

SPRN activates when there is a cell outage Many scenarios for cell outages:

Earthquakes, fires, overloaded bandwidth, terrorist attacks, etc.

Backup communication eases relief efforts Evacuation instructions Medical response Contacting family/friends

Page 5: Smartphone Packet Relay Networks

5/49

MotivationIn 2005 Hurricane Katrina caused widespread death

and destruction.

Over 1,400 cellphone towers were made inoperable.

3 Million customers were without phone lines.

Existing infrastructure and communications strategies were rendered useless[8].

Having a system like SPRN would have helped alleviate communication issues.

Page 6: Smartphone Packet Relay Networks

6/49

Motivation Additional Motivations

Expanded cell radius Bypass use of cell towers altogether

Page 7: Smartphone Packet Relay Networks

7/49

Background and Related Work

Page 8: Smartphone Packet Relay Networks

8/49

Related Work PRNET (DARPA, 1973)[3]

Ad hoc radio network with special hardware Self forming Addressed many issues: node topology, routing,

packet loss, signal interference, etc. Multihop Cellular Network (Ying-Dar Lin 1999)[5,6]

Multi-hops across phones to get to cellular backbone Increase of range and throughput

Page 9: Smartphone Packet Relay Networks

9/49

Related Work ODMA: Opportunity Driven Multiple Access (2004)[4]

Finds most efficient path to cellular backbone Uses one or more ad hoc node hops Goal: Best service with highest efficiency for a node

UCAN: Unified Cellular and Ad hoc Network (2003)[2]

Provides 3G speeds to older devices (without 3G) 3G phones are used as proxies Older phones connect to proxy via wi-fi

Serval Project (2011)[1] Ad hoc mesh networking, where no infrastructure

exists 'Permanent' ad hoc network

Page 10: Smartphone Packet Relay Networks

10/49

Related Work Our Contributions

Cellphone communication bypassing infrastructure completely

Utilization of Android smartphones 'Cheap' unspecialized hardware

Page 11: Smartphone Packet Relay Networks

11/49

Architecture

Hardware | Operation | Architecture Detail

Page 12: Smartphone Packet Relay Networks

12/49

Hardware Android smartphone running v2.2 (Froyo)

Bluetooth Root access to operating system

Less portable, but more application control Android OS very similar to Linux Dalvik VM, runs Java code

Page 13: Smartphone Packet Relay Networks

13/49

SPRN OperationIdeal operation of SPRN is as follows: SPRN inactive, runs in background, low detection

frequency Detects low signal strength, SPRN activates, high

detection frequency Devices locate all neighbors in range (discovery) A packet needs to be transferred

Route requested and formed on demand (if possible) Message passed along route (one or more hops)

Page 14: Smartphone Packet Relay Networks

14/49

Architecture: Overview 3-layer model: Datalink, Routing, Application

More flexibility, especially for future enhancements

Page 15: Smartphone Packet Relay Networks

15/49

Datalink Layer

Overview | Data Structures | Operation | Communication Procedures

Page 16: Smartphone Packet Relay Networks

16/49

Architecture: Datalink Written in C Runs as Root, background daemon Handles:

Physical communication (Bluetooth v2.1 + EDR) Node Association/Disassociation (Discovery)

Communicates with Routing layer via socket Datalink specification

Packet formats, communication procedures Abstraction of intra-node communication and inter-

node communication Nodes are not required to be Android phones!

Page 17: Smartphone Packet Relay Networks

17/49

Datalink Data Structures RemoteDeviceInfo

One per device (“node”) Information necessary to communicate Cached for faster lookups after initial contact

Page 18: Smartphone Packet Relay Networks

18/49

Datalink Data Structures ActiveConnection

One thread per device link Node address is primary key

Eliminates contention and multiple device links SynchronizedThreadQueue

Communication between threads and/or layers

Page 19: Smartphone Packet Relay Networks

19/49

Datalink Operation Commands via L2 socket Incoming connections from remote devices

Page 20: Smartphone Packet Relay Networks

20/49

Datalink: Discovery Most aspects handled by Bluetooth hardware Inquiry interval and duration are configurable Event Sequence:

BT HCI reports devices in range (and signal strength)

Devices are either known already or new New devices have preliminary communication:

“version request” L2 is updated with active node list

Page 21: Smartphone Packet Relay Networks

21/49

Datalink: Discovery Version Request

Determines if devices are compatible Exchanges software version and phone ID

Packet format Request and Reply Same format for each (different header type though)

Page 22: Smartphone Packet Relay Networks

22/49

Datalink: Packets Two Varieties

Inter-node and intra-node Inter-node

“Send Message” Upper layer data sent to remote device

Header:

Addresses are BT hardware addresses

Page 23: Smartphone Packet Relay Networks

23/49

Routing Layer

Overview | Routing Protocol | Operation | Data Structures

Page 24: Smartphone Packet Relay Networks

24/49

Architecture: Routing Written in C Runs in a Native Thread

Interacts with L3 via JNI calls Interacts with L1 via socket

The Brain of SPRN Keeps knowledge of network routes and states Passes data between layers

Page 25: Smartphone Packet Relay Networks

25/49

Routing: AODV Protocol Ad hoc On-demand Distance Vector (AODV) routing

Specified by RFC 3561[7]

On Demand Routes only formed when needed Low Maintenance Less routing information passed remotely Quick adaptation to new topology No routing loops

SPRN uses AODV, with minor modifications Simplified, adapted for our network protocol

Page 26: Smartphone Packet Relay Networks

26/49

Routing: AODV Protocol Two main control packets: Route Request (RREQ)

and Route Reply (RREP) RREQ sent out (broadcast) on demand

Search for a destination May be received by end node or intermediate node

with path to destination RREP sent out (unicast) to RREQ sender

Destination has been found Takes reverse path of RREQ

Route is 'established' by each node along this path

Page 27: Smartphone Packet Relay Networks

27/49

Routing: AODV ProtocolRREQ packet format:

RREP packet format:

Page 28: Smartphone Packet Relay Networks

28/49

Routing: Operation Main Thread loops over all function calls; sleeps Data is buffered until it can be processed

Page 29: Smartphone Packet Relay Networks

29/49

Routing: Data Structures Route

Holds information needed to get one hop closer to destination

One route per destination; storage in routing table

Higher sequence numbers indicate newer routes

Page 30: Smartphone Packet Relay Networks

30/49

Routing: Data Structures Node

Similar to RemoteDeviceInfo in L1; one per node Holds data needed to convert between address

formats L2 deals with phone IDs (phone numbers), L1 deals

with Bluetooth addresses

Page 31: Smartphone Packet Relay Networks

31/49

Application Layer

Overview | User Interface | Operation | Actual vs. Ideal Design

Page 32: Smartphone Packet Relay Networks

32/49

Architecture: Application Written in Java (uses Android SDK) Interacts with L2 through JNI calls Handles

User input Displays nearby nodes Activates SPRN (not implemented)

Page 33: Smartphone Packet Relay Networks

33/49

Application Interface

Page 34: Smartphone Packet Relay Networks

34/49

Application: Operation Initialization

Read in properties (external file) Start routing layer Initialize GUI components

Main execution thread Regularly polls L2 via JNI for incoming data Processing incoming data Processes user requests (send data)

Page 35: Smartphone Packet Relay Networks

35/49

Application: Operation Device ID

Device's phone number (e.g. 5855066000) Used to direct messages to an endpoint Set automatically from phone or by user input

Implemented as a property Removes need for central authority

Page 36: Smartphone Packet Relay Networks

36/49

Application: Actual Vs. Ideal Actual implementation does not fit ideal scenario Ideally, user interface is transparent

Automatic device pairing Automatic SPRN activation Automatic intercept and reroute of data

Current Android platform limits options Automatic SPRN activation is possible Device pairing is semi-transparent Intercepting (app) data is not possible

Page 37: Smartphone Packet Relay Networks

37/49

Results

Range | Interference | Latency | Testing Limitations

Page 38: Smartphone Packet Relay Networks

38/49

Results: Distance Test Bluetooth range is short! Signal strength falls off logarithmically with distance 30 feet between devices; approximate limit

Can go further, more transmission errors though

Page 39: Smartphone Packet Relay Networks

39/49

Results: Interference Test Devices placed in a circle of variable, expanding

radius Further distances created more dropped connections

4 devices within an 8 foot radius were unable to maintain all connections

Interference mostly caused by BT discovery? Problem may be avoided by using different

technology Node density per area must be limited to avoid

interference

Page 40: Smartphone Packet Relay Networks

40/49

Results: Latency Test Main metric, defines network scalability Message sending time recorded vs. number of hops

Initial route creation and traversal time Additional message traversal time

Limited data, but trend shows poor scalability Would take about 25 minutes to traverse 100 nodes

#Hops Initial (sec) Additional (sec)

1 21.6 4.1

2 38.3 8.3

3 46.0 11.0

Page 41: Smartphone Packet Relay Networks

41/49

Results: Latency Test High latency due mainly to slow discovery BT Inquiry takes about 10 seconds at each node, not

including processing overhead Additional messages are faster, but still slow Different wireless technology may change scalability

Page 42: Smartphone Packet Relay Networks

42/49

Results: Testing Limitations Need to test: power consumption

Obvious concern, but difficult to gauge Condition of battery? Running background programs?

Limited testing hardware Tested with 4 devices; more data needed for better

conclusions

Page 43: Smartphone Packet Relay Networks

43/49

Future Work

Security | Software Optimizations | Hardware Optimizations

Page 44: Smartphone Packet Relay Networks

44/49

Future Work: Security Major concern! Root privileges

Presents more security risk than necessary(?) AODV, no implicit security

Would need to add authentication, maybe encryption Protect from fake RREP or RERR messages

ID generation User controlled, easy to forge/impersonate

Unfair use of network Crediting for usage?

Page 45: Smartphone Packet Relay Networks

45/49

Future Work: Software Optimization No optimizations yet

Need to establish baseline performance Finding the most efficient route

Factors (per hop): signal strength, bandwidth, velocity, transmission power

More information = better routes, but greater overhead

Packet optimization Alignment, field efficiency, etc

General Code optimization

Page 46: Smartphone Packet Relay Networks

46/49

Future Work: Hardware Optimization Mainly focused on not using Bluetooth

Could decrease initial latency with faster discovery Increase range with higher power transmitter Decrease interference with better multiplexing

technology

Page 47: Smartphone Packet Relay Networks

47/49

Conclusion

Page 48: Smartphone Packet Relay Networks

48/49

Conclusion SPRN is a prototype system Foundation provided for future work Android is almost ideal for SPRN

Needs some modifications to allow more 'risky' behavior

Scalability is an issue currently Bluetooth is not ideal for this application

High latency, short range Good for prototype development though

Page 49: Smartphone Packet Relay Networks

49/49

References[1] P. Gardner-Stephen. The Serval Project: Practical Wireless Ad-hoc Mobile Telecommunications. August 2011.

http://developer.servalproject.org/site/docs/2011/ServalIntroduction.html

[2] H. Luo et al. UCAN: A Unied Cellular and Ad-hoc Network Architecture. Proceedings of the 9th Annual International Conference on Mobile Computing and Networking, pages 353-367, 2003.

[3] J. Jubin and J.D. Tornow. The DARPA packet radio network protocols. Proceedings of the IEEE, 75(1):21-32, January 1987.

[4] P. Lin, Wei-Ru Lai, and C.-H. Gan. Modeling Opportunity Driven Multiple Access in UMTS. Wireless Communications, IEEE Transactions on, 3(5):1669-1677, September 2004.

[5] Y. D. Lin and Y. C. Hsu. Multihop Cellular: A New Architecture for Wireless Communications. 19th Annual Joint Conference of the IEEE Computer and Communications Societies Proceedings, 3:1273-1282, March 2000.

[6] Y. D. Lin, Y. C. Hsu, K. W. Oyang, T.C. Tsa, and D. S. Yang. Multihop wireless IEEE 802.11 LANs: A Prototype Implementation. IEEE ICC'99, June 1999.

[7] C. Perkins. RFC 3561: Ad hoc On-Demand Distance Vector (AODV) Routing. Specication, Nokia Research Center, July 2003.

[8] United States. The Federal Response to Hurricane Katrina: Lessons Learned, 2006. (PREX 1.2:K 15).