Title: SessionBased Mobility An EndtoEnd Approach
1Session-Based MobilityAn End-to-End Approach
- Alex C. Snoeren
- MIT Laboratory for Computer Science
- (with Hari Balakrishnan, Frans Kaashoek, and Jon
Salz)
2An Example SSH Session
- Remote log in / port forwarding
- Provides secure remote communication
- Data compressed and encrypted as a stream
3Todays Network Abstraction
SSH Client
TCP
IP
SSH Server
TCP
IP
lt18.31.0.139, 2345gt
lt169.229.60.64, 22gt
Each application must perform ad-hoc recovery and
disconnection management, or fail
- System provides a connection service
- Binds ltIP, portgt, ltIP, portgt tuple
- Any change invalidates the connection
- No support for periods of disconnectivity
4Mobile Networking Challenges
- Changing end points
- Change in node attachment point
- Multi-homing (multiple network interfaces)
- Readdressing DHCP renewal, NAT crash, etc.
- Internet Suspend/Resume
- Wireless device goes out of range
- Save device power or connectivity costs
- Transient Internet connectivity outage
Complete solution needs to address both
5Current Approaches
- Only solve half the problem
- Mobile IP, VIP, Physical Media Independence,
- MSOCKS, SLM, Application check-pointing,
- Dont support intelligent adaptation
- Rocks, Mobile sockets, Mobile file systems,
- Use application-specific point solutions
- RTSP, SCTP, SIP multimedia calls,
- Web shopping carts, J2EE servlets,
- HTTP range requests, FTP restart points,
6Reconsider System Abstraction
- Many applications create sessions
- Long-lived collections of connections
- Entity of processing and resource allocation
- Can we provide a useful system abstraction?
- Flexible enough for different users, applications
- Efficient to implement, leverage shared resources
- Easy to use, but backwards compatible
Session is the salient mobility entity
71, 2, 3 Mobility
- System Session Abstraction SBK01
- Collaborative management of end point changes
- Support for unmodified legacy apps SaSB02
- Preserving Reliable Connections
- TCP connection migration SB00
- Session Continuations SSaBK02
- Application-guided disconnection handling
- System support for long-lived sessions SAB01
8Goals Minimally Invasive
- Overhead only on mobility events
- As secure as non-mobile situations
- Require no infrastructure support
- Demonstrate pure end-to-end solution
- Deployable via proxies if desired
- Enable intelligent session adaptation
Transparency is always an option
9Managing Changing End Points
- Applications handle discovery
- Lots of ways to resolve to ltIP, portgt pair
- User specifies local network policy
- Different users, different choices
- System manages tracking
- Clear semantics, scalable, and efficient
10End-to-End Session Tracking
Discovery Update (e.g., DNS Update)
Discovery Query (e.g., DNS Lookup)
Session Initiation
ltyyy.yyy.yyy.yyy, Qgt
ltxxx.xxx.xxx.xxx, Pgt
Session Update
Correspondent Node
xxx.xxx.xxx.xxx
yyy.yyy.yyy.yyy
11System Session Abstraction
- Set of network connections to remote end point
- All involved in single collaborative activity
- Application identifies end points, initiates
connections - System manages tracking
- Maintains semantics of reliable protocols
- Exposes changes to apps that register interest
- / Find remote end point /
- dhost gethostbyname(dst)
- / Validate remote end point /
- daddr valid_address(dhost)
- / Create a new session /
- sid session_create(flags, )
- / Specify end points discovery /
- set_lookupfunc(sid, gethostbyname,
dst, hostname) - / Create two connections /
- connect(a, daddr, )
- add_connection(sid, a)
- connect(b, daddr, )
- add_connection(sid, b)
- / Register interest in changes /
- register_handler(sid, mobhandler)
12Robust Session Management
Session Layer
App
Policy Engine
session_create()
add_connection()
Challenge/Response Protocol
Diffie-Hellman Key Exchange
Mobility Daemon
Established
Lost
Connecting
Migrating
C, P
C, P
Frozen
Not Supported
13Dynamic Library Interposition
- Intercept POSIX API
- Wrap each connection in its own session
Legacy Application
Migrate Daemon
fd
sid session_create() add_connection(sid, )
libmigrate
libc
Session Establishment
Kernel
14- PART 1
- Problem Track changing end points
- Solution System session abstraction
- PART 2
- Problem Preserve reliable connections
- Solution TCP Migrate Options
- PART 3
- Problem Internet Suspend/Resume
- Solution Session continuations
15Connection Preservation
Kernel
App
Kernel
App
Session Layer
Session Layer
- Provide stable view of dynamic kernel socket
- But what about reliable connections?
- User level Double buffer, session layer re-sync
- Full access Extend transport protocol
16Transmission Control Protocol
- The reliable protocol
- 91 of all bytes, 83 of all packets CAIDA 00
- SSH, FTP, HTTPS, telnet, IMAP, SMTP, etc.
- SYN/ACK handshake
- Negotiates options, sequence space
- Reliable transport
- In-order delivery
- Retransmits lost data
17TCP Connection Migration
- Resume previous connection with new one
- Provide special Migrate TCP option
- Sent on SYN packets of new connection
- Preserve buffers and sequence space
- Retransmission engine just works
- Compatible with SACK, FACK, Snoop
- Entirely backwards compatible
18TCP ConnectionMigration
fixed
mobile
1.
(MigrateOK, )
2.
SYN 0 / ACK 1
(MigrateOK, )
3.
1. Initial SYN 2. SYN/ACK 3. ACK (with
data) 4. Normal data transfer 5. Migrate
SYN 6. Migrate SYN/ACK 7. ACK (with data)
4.
DATA 47
ACK 23
19TCP StateMachineChanges
- 2 new transitions between existing states
- - and -
- 1 new state handles pathological race condition
appl migrate send SYN (migrate T, R)
recv SYN (migrate T, R) send SYN, ACK
recv SYN (migrate T, R) send SYN, ACK
recv RST
2MSL timeout
MIGRATE_WAIT
20Migration Trace
Buffered Packets (old address)
Migrate SYN
21A Lossy Trace with SACK
Buffered Packets (old address)
ACK w/SACK
Migrate SYN
22- PART 1
- Problem Track changing end points
- Solution System session abstraction
- PART 2
- Problem Preserve reliable connections
- Solution TCP Migrate Options
- PART 3
- Problem Internet Suspend/Resume
- Solution Session continuations
23Internet Suspend/Resume
- Intelligent disconnection handling
- Buffer otherwise lost communications
- Emulate remote services locally
- Release resources while disconnected
- Graceful resumption handling
- Reallocate resources and restore state
- Adapt to new network conditions
- Indicate how to resume processing
24Motivating Continuations
- Observation complete context inappropriate
- Some previous state irrelevant, or, even worse,
- Invalidated due to change in conditions
- (C.f. TCP Connection state)
- Similar problem in programming languages
- Block when state and context is complex
- Pass continuation if state and context is small
- Continuations can request blocking behavior
25Using Continuations
- Expand session notion
- Align with application
- Annotate state, resources,
- associated computation
- Include system state
- Provide synchronization and preservation
assistance - Shared attribute/value store
- Persist local system IPC, file descriptors
- System invokes continuation at session resumption
- Generated in response to disconnection
notification
App
User level
SL
Kernel
26Conserving Session Resources
Resources dedicated to active session
emacs
gtgt Resources dedicated to suspended session
SSHd
Socket Buffers
Open Files
Release system resources as well
Network Ports
Kernel
Continuation generation is recursive!
27SSH Continuation
- Dont suspend until its convenient
- Process pending data, deliver to app or network
- Only a minimum of state to preserve
- Auth, crypto, and compression state
- Preserve IPC to child processes
- Notify child processes of disconnection
- Tunneled apps share connectivity fate
Added 250 LOC in an afternoon
28Continuation Efficiency
SSHd
FTPd
SSHd
FTPd
Anecdotal evidence of size and speed
29Continuation Solution Spectrum
- Fast TCP handoff
- One RTT
- Normal movement
- Four RTTs re-sync
- Suspend/Resume
- Complete flexibility
Request
Challenge
Response
Continuation Info
Data SYN
Data SYN/ACK
Resumed connection
30Conclusion Future Directions
- Sessions are viable system abstractions
- Useful, flexible, and easy to use
- Admit robust, efficient implementation
- Continuations enable suspend/resume
- Useful for mobility across hosts?
- Continuations eliminate dependencies
- An area for future exploration
31- PART 1
- Problem Changing end points
- Solution System session abstraction
- PART 3
- Problem Internet Suspend/Resume
- Solution Session continuations
32System Session Tracking
- Directly notify remote end point
- Subject to same delays as communication
- Discovery service update is off path
- No impact on handoff performance
- Rediscover only if necessary
- Simultaneous moves of both end points
33Solution Session Continuations
- Need explicit disconnection directive
- What to do if disconnected
- What to do upon resumption
- App needs to answer first question
- Perform necessary disconnection duties
- Prepare an answer for question 2
part of 1
Answer to 2 is a session continuation
34Migrate Architecture
Session Creation
Mobility Events
Connectivity Updates
Policy Decisions
Application
Connectivity Monitor
Policy Engine
Session Layer
Kernel
35Session Continuations
- Goal suspend/resume operation
- Perform needed cleanup on disconnect
- Specify what to do on resumption
- How encapsulate rest of the session
- Package together remaining computation and the
state, context resources necessary to execute
it - Generate default continuations for sessions that
dont provide their own
36Deploying a New Abstraction
- Legacy Apps deal in connections, not sessions
-
- Managed through the standard POSIX API
Legacy Application
libc
Kernel
37An Example SSH Session
server
client
- Remote log in / port forwarding
- Provides secure remote communication
- Data compressed and encrypted as a stream
38TCP Overview
- Connection-oriented
- Binds two end points
- Specified by IP Address
- SYN/ACK handshake
- Negotiates options, sequence space
- Reliable transport
- In-order delivery
- Retransmits lost data
39Transmission Control Protocol
- Internet standard for reliable transport
- 91 of all bytes, 83 of all packets CAIDA 00
- Transport for many session protocols
- SSH, FTP, HTTPS, telnet, imap, SMTP, etc.
40Current Approaches
- Systems bundle discovery and tracking
- System does both (e.g. Mobile IP)
- Limits granularity of tracking
- or
- Application does both
- Makes tracking unnecessarily expensive
- Interface selection is pre-determined
41Managing Changing End Points
- Discover remote end points of interest
- DNS, service location, resource discovery,
- Select appropriate local end point
- Ethernet, 802.11, cellular, Bluetooth,
- Communications track both as they move
- Enhanced Mobile IP, Persistent connections,
42Flexible Separate Each Activity
- Applications handle discovery
- Lots of ways to resolve to ltIP, portgt pair
- User specifies local network policy
- Different users, different choices
- System manages tracking
- Follows the application-specified end point
- Clear semantics, scalable, and efficient
43Eliminating Per-Packet Overhead
- Double buffering takes time, memory
- Unify session/connection buffers, or
- Preserve connection buffers
- Synchronization adds latency
- Eliminate need to synchronize connections
- Needs to be entirely backwards-compatible