Presentation is loading. Please wait.

Presentation is loading. Please wait.

Christopher Bednarz Justin Jones Prof. Xiang ECE 4986 Fall 2011 Department of Electrical and Computer Engineering University.

Similar presentations


Presentation on theme: "Christopher Bednarz Justin Jones Prof. Xiang ECE 4986 Fall 2011 Department of Electrical and Computer Engineering University."— Presentation transcript:

1

2 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

3 Overview/Features  USB Tethering System: Android Phone & Linux Computer  Unique: Scalable for a network configuration Support for multiple machines  Permanent Network Solution Easy on the phone Customizable 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 256 Open Connection: Limited up to four devices  Maximum Cellular throughput ~ 50%

4 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

5 Minimum 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

6  Interface Tasks (Chris) Tunnel to Router Interface: Hook Traffic into router program Phone 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 & Verification Optimization

7 Internet/Transport Features Protocol Selection: IPv4, TCP, UDP, ICMP ○ Alternatives: IPv6, DCCP, SCTP, RSVP, ECN, etc. Constraints: ○ NO IP Fragmentation ○ Client connections only TCP Features TCP Options: MSS Support ~ 1460 byes vs. 536 ○ Alternatives: Timestamp, SACK, Window Scaling

8 System Optimization (Phone) Open Connections Maintained Single Connection Manager Thread ○ Alternatives: Dynamic Thread Allocation, Thread Pool Resource Limitation: limited open connections to 256 Idle Connection lifetime, TCP: 20 seconds, UDP 5 seconds (Limited Connections) ○ Alternatives: Unlimited lifetime, Very Low lifetime

9 Network Request User Mode Program Network to Application Conversion Phone Socket/Datagram Time  Application to Network Conversion

10 Tunnel Interface  Tunnel Driver (Linux 2.6+) Intercept Internet Traffic Must 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

11 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

12 Network Traffic TCP Header IPv4 Header Data Lookup Table Android Device Command Data

13 General  Pre-allocated Thread Pool: limit allocation overhead  Maintain a table that stores state/connection information  Timers maintained to eliminate idle connections Emulation  TCP  Non-blocking Socket Channel  Data had to wait until ACK command  Persist timer held, in case of potential deadlock  UDP: Non-blocking Datagram Channel  ICMP: isReachable  Received data appended the data received command  If no command ready or data not on channel, thread sleeps to allow other threads to be processed  Phone notifies router of any errors, and flushes commands from the failed connection (sync to router)

14 Router  Abstract Tester: Phone command emulator, allowed testing of the router implementation ~ 98% of Maximum Data Throughput (Fast Computer) Phone  Thread Pool Model maximum throughput ~ 50%  Limited throughput utilizing Java/Dalvik sockets/datagram 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

15 Conclusions  Functional system, cellular optimization could lead to great potential  Performance limited by Java socket/datagram implementation  Security Improvements, Network flexibility of the Linux OS Improvements:  Possibly port to Windows Server for those interested  Provide an interactive GUI

16 Faculty Advisor: Professor Xiang Coordinator: Professor Miller

17

18

19 Router Abstract Tester

20 Simplified VHL Design

21 Tunnel Interface Structure Source/Destination Computer WLAN / ETH Router, Kernel Mode User Mode Program TUN Router, User Mode IPTables (Firewall)

22

23 Phone/Router Interface User Mode Program ADB/USB Android Program Internet Cell Phone


Download ppt "Christopher Bednarz Justin Jones Prof. Xiang ECE 4986 Fall 2011 Department of Electrical and Computer Engineering University."

Similar presentations


Ads by Google