android home network

22
ANDROID HOME NETWORK Christopher Bednarz Justin Jones Prof. Xiang ECE 4986 Fall 2011 http://code.google.com/p/alt-hs/ Department of Electrical and Computer Engineering University of Michigan Dearborn

Upload: ellie

Post on 12-Jan-2016

23 views

Category:

Documents


0 download

DESCRIPTION

Christopher Bednarz Justin Jones Prof. Xiang ECE 4986 Fall 2011 http://code.google.com/p/alt-hs/. Android Home Network. Department of Electrical and Computer Engineering University of Michigan Dearborn. System Overview. Overview/Features - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Android Home Network

ANDROID HOME NETWORK

Christopher Bednarz

Justin Jones

Prof. Xiang

ECE 4986 Fall 2011

http://code.google.com/p/alt-hs/

Department of Electrical and Computer Engineering

University of Michigan Dearborn

Page 2: Android Home Network

SYSTEM OVERVIEWOverview/Features USB Tethering System: Android Phone & Linux Computer Unique: Scalable for a network configuration

Support for multiple machines Permanent Network Solution

Easy on the phoneCustomizable Security Features

No modifications to Android Phone & Linux Computer Android 1.5+

Achievements Fully functional under moderately heavy loads Network Scalable

Limitations Currently Limited to 512 Open Connection: Limited up to three

devices Maximum Cellular throughput ~ 10%

Page 3: Android Home Network

TECHNICAL PROBLEM & REQUIREMENTS

Technical Problem

Provide a flexible, secure, and reliable system that enables an Android device to send and receive network traffic for a small LAN

Design Requirements

1. Unmodified Android Device and Linux Computer

2. Routing capable

3. USB Interface (Phone/Router)

4. Support the major protocols: TCP, UDP, ICMP

5. Scalable customizable security features

6. FAST

Page 4: Android Home Network

TECHNICAL SPECIFICATIONSMinimum System Specifications Routing Computer: 1GHz, 64 MB Ram, 64 MB Space, Linux

2.6, NICs, USB 2.0, switch (optional) Android Device: 64MB Ram, 20 MB Storage, Android 1.5+,

Data / Tethering Services/Subscription

Performance Specifications Maximum cellular throughput: 95% Maintain enough connectivity for up to 4 machines Fully Functional, Stable

System Standards Router Development: POSIX C API: Threading, Sockets,

Portability Phone Development: Java/Dalvik JVM, Android API Network Protocols: IPv4, TCP, UDP, ICMP Network Inter: IEEE 802.11, IEEE 802.3 (Ethernet), USB 2.0

Page 5: Android Home Network

Interface Tasks (Chris)Tunnel to Router Interface: Hook Traffic into router

programPhone to Router USB Interface: Controlled Socket link

between phone and router Router Tasks (Chris)

TCP/UDP/ICMP Implementation: TCP/UDP/ICMP to Application Converter

Phone Tasks (Chris & Justin)TCP/UDP/ICMP Implementation: Socket/Datagram

Channel Connection Integration (Chris)

Debugging, Validation & VerificationOptimization

SUBSYSTEMS

Page 6: Android Home Network

DESIGN CRITERIA

Internet/Transport FeaturesProtocol Selection: IPv4, TCP, UDP, ICMP

○ Alternatives: IPv6, DCCP, SCTP, RSVP, ECN, etc.Constraints:

○ NO IP Fragmentation○ Client connections only

TCP FeaturesTCP Options: MSS Support ~ 1460 byes vs. 536

○ Alternatives: Timestamp, SACK, Window Scaling

Page 7: Android Home Network

DESIGN CRITERIASystem Optimization (Phone)

Open Connections Maintained Independent Threads (Thread Pool)○ Alternatives: Dynamic Thread Allocation, Single

ThreadedResource Limitation: limited open connections to

512Idle Connection lifetime, TCP: 20 seconds, UDP 5

seconds (Limited Connections)○ Alternatives: Unlimited lifetime, Very Low lifetime

Page 8: Android Home Network

Network Request

User Mode Program

Network to Application Conversion

Phone

Socket/Datagram

Time

Application to Network Conversion

HIGH LEVEL DESIGN

Page 9: Android Home Network

INTERFACE DESIGNTunnel Interface Tunnel Driver (Linux 2.6+)

Intercept Internet TrafficMust be: started, setup/configured, obtained

Dedicated Thread: Non-blocking Read/Writes Raw Buffers stored into a BufferQueue

Phone/Router USB Interface Android Debugging Bridge Features:

Converts USB signals into a network socket Phone/Router: Dedicated threads: read into a

BufferQueue, processed in respective programs

Page 10: Android Home Network

General Convert Packets to Simple Commands for phone to process Convert Simple Commands to Packets for Network Consumption

TCP Emulation Reliability tradeoff Complex Must maintain State diagram:

3 – Way Handshake (Connection Establishment) Data Transfer 4 – Way Handshake (Connection Termination)

Flow Control Track Sequence Numbers Sliding Window Sized limited to 40 MSS ~ 57KB

UDP/ICMP Emulation No Reliability, Simple Design Stateless: Send or Receive Data, phone handles connectivity

ROUTER DESIGN: TCP/UDP/ICMP EMULATION

Page 11: Android Home Network

Network Traffic

TCP Header

IPv4 Header

Data

Lookup Table

Android Device

Command

Data

Page 12: Android Home Network

PHONE DESIGN

Page 13: Android Home Network

RESULTSRouter Abstract Tester:

Phone command emulator, allowed testing of the router implementation ~ 98% of Maximum Data Throughput (Fast Computer)

Phone Thread Pool Model maximum throughput ~ 10% 512 Open Connections == 512 Open Threads: Dalvkim JVM not

efficient Estimated Support no more than 3 machines

Overall System stable even under heavy loads No port-mapping correlation, indirectly very secure form of NAT Very Difficult to debug Some redundancy between the phone and router

Page 14: Android Home Network

CONCLUSIONS

Conclusions Functional system, cellular optimization could lead to

great potential Poor Threading Performance, Android not ready for

server level apps Security Improvements, Network flexibility of the Linux

OS

Improvements: Move to a single Super thread for cellular sockets Possibly port to Windows Server for those interested Provide an interactive GUI

Page 15: Android Home Network

ACKNOWLEDGMENTS

Faculty Advisor: Professor Xiang

Coordinator: Professor Miller

Page 16: Android Home Network

QUESTIONS

Page 17: Android Home Network

BACKUP

Page 18: Android Home Network

Router Abstract Tester

Page 19: Android Home Network

Simplified VHL Design

Page 20: Android Home Network

Tunnel Interface Structure

Source/Destination Computer

WLAN / ETH

Router, Kernel Mode

User Mode Program

TUN

Router, User Mode

IPTables (Firewall)

Page 21: Android Home Network
Page 22: Android Home Network

Phone/Router Interface

User Mode Program

ADB/USB

Android Program

Internet

Cell Phone