Application Development for Mobile and Ubiquitous Computing 3. Mobile Internet
Dr. Ing. Thomas Springer Technische Universität Dresden Chair of Computer Networks in Cooperation with Michael Berger (Siemens AG)
Lecture “Application Development for Mobile and Ubiquitous Computing“
© TU Dresden, Siemens Thomas Springer WS07/08, S.1
Lecture Overview
Mobile Internet
DHCP Mobile IP Mobile TCP
Lecture “Application Development for Mobile and Ubiquitous Computing“
© TU Dresden, Siemens Thomas Springer WS07/08, S.2
OSI – Reference Model
Application Layer
TCP/IP Protocol Suite
IEEE 802 Standards
Presentation Layer
Application Layer
Session Layer
Transport Layer Mobile
TCP
Transport Layer
Network Layer DHCP,
MobileNetwork Layer IP
Link Layer Logical Link Control MAC layer
Link Layer
Physical Layer
Physical Layer
Physical Layer
Lecture “Application Development for Mobile and Ubiquitous Computing“
© TU Dresden, Siemens Thomas Springer WS07/08, S.3
Mobile Internet
Extension of existing infrastructure
mobile devices wireless network technologies mobility of users
Extension and modification of existing protocols
network layer: assignment of addresses
DHCP for dynamic address assignement Mobile IP for mobility support
transport layer: optimizations for wireless communication application layer: service discovery, alternative / adapted internet services (e.g. WWW)
Lecture “Application Development for Mobile and Ubiquitous Computing“
© TU Dresden, Siemens Thomas Springer WS07/08, S.4
Network Layer
Challenge
Change of subnet/cell implicates changes of IP Address
reconfiguration of network required (new IP, new Standard gateway, new DNS) breakage of established connections mobile device not reachable without further support (DNS does not work with fast changing IP addresses)
Dynamic Host Configuration Protocol (DHCP)
supports automatic assignement of IP addresses automatic configuration of network (Router, Subnetmask, DNS) + optional parameters (WebServer, Mailserver) automatic configuration of all network parameters
Lecture “Application Development for Mobile and Ubiquitous Computing“
© TU Dresden, Siemens Thomas Springer WS07/08, S.5
Dynamic assignment – DHCP DISCOVER
Lecture “Application Development for Mobile and Ubiquitous Computing“
© TU Dresden, Siemens Thomas Springer WS07/08, S.6
Dynamic assignment – DHCP OFFER
Lecture “Application Development for Mobile and Ubiquitous Computing“
© TU Dresden, Siemens Thomas Springer WS07/08, S.7
Dynamic assignment – DHCP ACK
Lecture “Application Development for Mobile and Ubiquitous Computing“
© TU Dresden, Siemens Thomas Springer WS07/08, S.8
Dynamic assignment – DHCP ACK
Lecture “Application Development for Mobile and Ubiquitous Computing“
© TU Dresden, Siemens Thomas Springer WS07/08, S.9
DHCP – Address Assignment
3 kinds of address assignment
manual:
fixed assignment of IP addresses to devices (identified by MAC address) defined by system administrator
automatic:
available IP addresses are assigned to mobile devices for unlimited time frame
dynamic:
available IP addresses are assigned for limited time frame (Lease) periodic refreshment of address assignment by mobile device required
dynamic address assignment fits best for mobile hosts
Lecture “Application Development for Mobile and Ubiquitous Computing“
© TU Dresden, Siemens Thomas Springer WS07/08, S.10
Refresh Lease
Result is assigned IP Address (Lease)
Lease is valid for a defined time frame (T=lease time)
For refresh two times defined by server
T1 – 50 % of lease time T2 – 87,5 % of lease time
T1 – Client tries to refresh lease
Client sends DHCP REQUEST to formerly used DHCP Server if DHCP ACK, then lease time for IP address starts again
T2 – if no positiv answer for DHCP REQUEST
clients sends DHCP DISCOVER via broadcast to all local DHCP Servers to refresh lease
© TU Dresden, Siemens Thomas Springer WS07/08, S.11
Lecture “Application Development for Mobile and Ubiquitous Computing“
Mobile IP
Challenge
IP address of mobile device changes in each subnetwork connection break in case of subnetwork change services offered by mobile device not reachable because of changing IP address
Goal
no changes of IP routing
Mobile IP
subnet independent IP address to mobile device infrastructure for packet forwarding and address updates
Lecture “Application Development for Mobile and Ubiquitous Computing“
© TU Dresden, Siemens Thomas Springer WS07/08, S.12
Two Addresses per Mobile Host
Care-of-Address (COA): • temporary address of Mobile Host in visited Foreign Agent network Two kinds: • Foreign-Agent-Care-of-Address: • foreign agent is responsible for packet forwarding to Mobile Host • multiple Mobile Host can use same Foreign-Agent COA Mobile Host • Co-located-Care-of-Address • address is assigned to Mobile Host in Visiting Network and registered with the Home Agent Corresponding Host • No Foreign Agent used • COAs have to be unique
Lecture “Application Development for Mobile and Ubiquitous Computing“ © TU Dresden, Siemens Thomas Springer WS07/08, S.13
Home Address: • permanent address of Mobile Host indepenent of subnet
Internet
Home Agent
Foreign Agent: • Located in the subnet visited by the Mobile Host (Visiting Network)
Home Agent: • Proxy of Mobile Host located in the Home Network of the Mobile Host • Always informed about the current location of the Mobile Host (IP address)
Internet
Overview
Foreign Agent
Home Agent
Mobile Host
Corresponding Host: • Communication partner of Mobile Host
Corresponding Host
Mobile Host: • Mobile device which moves between different subnets • Identified by unique IP address
Lecture “Application Development for Mobile and Ubiquitous Computing“
© TU Dresden, Siemens Thomas Springer WS07/08, S.14
Mobile IP – 3 Parts
Agent Discovery
discover Network type (home network, visiting network) and Agent (home agent or foreign agent) 2 kinds of discovery mechanisms 1. Agent Advertisment
Agent periodically sends broadcasts to all hosts in subnet Mobile Host can discover Agent using the broadcast message
2.
Agent Solicitation
if advertisment period to long, Mobile Host sends request for Agent Advertisment via broadcast to the subnet no Advertisment message – Mobile Host assumes Home Network Otherwise – get IP address via DHCP as Care-of-Address COA registered to Home Agent
Registration Tunneling
Lecture “Application Development for Mobile and Ubiquitous Computing“ © TU Dresden, Siemens Thomas Springer WS07/08, S.15
Registration
1. Registration Request (HAddr, COA)
Foreign Agent
2. Register COA
Internet
HAddr COA
Home Agent
Mobile Host
3. Registration Reply
• Authentification of Mobile Host based on Message Digest • Limited validity of COA, periodic re-registration of Mobile Host required Corresponding Host
Lecture “Application Development for Mobile and Ubiquitous Computing“
© TU Dresden, Siemens Thomas Springer WS07/08, S.16
Tunneling – Foreign Agent COA 3. HA encapsulates Packet
4. FA extracts Foreign Agent encapsulated packet and forwards it to Mobile Host to HAddr into packet to Foreign-Agent-COA and forward packet to FA → called Tunneling
Internet
HAddr COA
Home Agent 2. Resolve COA Mobile Host
5. Mobile Host sends packets (Acknowlegement) directly to Corresponding Host Corresponding Host using HAddr as sender IP
1. Packet send to Home Address of Mobile Host
Lecture “Application Development for Mobile and Ubiquitous Computing“
© TU Dresden, Siemens Thomas Springer WS07/08, S.17
Tunneling – Co-Located COA
Foreign Agent
4. Mobile Host extracts encapsulated packet
3. HA encapsulates packet to HAddr into packet to Co-Located-COA and forward directly packet to Mobile Host Internet no Foreign Agent used
HAddr COA
Home Agent 2. Resolve COA Mobile Host
5. Mobile Host sends packets (Acknowlegement) directly to Corresponding Host Corresponding Host using HAddr as sender IP
1. Packet send to Home Address of Mobile Host
Lecture “Application Development for Mobile and Ubiquitous Computing“
© TU Dresden, Siemens Thomas Springer WS07/08, S.18
Reverse Tunneling
Router in Visited Network can block packets of Mobile Host because sender address (HAddr) does not correspond to subnet Solution - Reverse Tunneling
Packet to Corresponding Host are encapsulated into packets to Home Agent Home Agent extracts encapsulated packets and forwards them to Corresponding Host
Reverse Tunneling can be requested by Mobile Host, Home Agent or Foreign Agent
Lecture “Application Development for Mobile and Ubiquitous Computing“
© TU Dresden, Siemens Thomas Springer WS07/08, S.19
Mobile IP IPv6
Mobile IP is developed on top of IPv4
for Mobile IP additional hosts necessary
One Home Agent per Home Network One Foreign Agent in each Visiting Network, if Foreign-Agent COA is used
Mobile IP in IPv6
integrated into IP protocol
Co-Located COAs used only - no Foreign Agents required Functionality of Home Agent directly integrated into IPv6 router – no separate Home Agents required
Mobile Hosts inform Routers about new COA – enabling direct routing between Corresponding Host and Mobile Host
Lecture “Application Development for Mobile and Ubiquitous Computing“ © TU Dresden, Siemens Thomas Springer WS07/08, S.20
OSI – Reference Model
Application Layer
TCP/IP Protocol Suite
IEEE 802 Standards
Presentation Layer
Application Layer
Session Layer
Transport Layer Wireless
TCP Transport Layer
Network Layer Logical Link Control MAC layer
Network Layer
Link Layer
Link Layer
Physical Layer
Physical Layer
Physical Layer
Lecture “Application Development for Mobile and Ubiquitous Computing“
© TU Dresden, Siemens Thomas Springer WS07/08, S.21
Transport Layer
Challenge
TCP is optimized for wired networks
Assumption
– Packet loss is mostly caused by congestions
Congestion Control and Avoidance
– drastic reduction of packet rate and slow start – larger timeout intervals for retransmissions
Assumption is not valid for wireless networks
much higher packet error rates packet losses during handovers and disconnections bundled packet losses necessary reaction:
– fast error recovery – no reduction of packet rate
Result in case of un-adapted TCP for wireless networks:
data rates far below possible data rate slow error recovery (high response times)
Lecture “Application Development for Mobile and Ubiquitous Computing“ © TU Dresden, Siemens Thomas Springer WS07/08, S.22
TCP Overview
reliable transport protocol
uses acknowledgements (ACK) and retransmission of lost packets sequence numbers per bytes in packets cummulative acknowledgements based on sequence number sliding window protocol for flow control mechanism for congestion control
assumption: packet loss mostly due to congestion, i.e. router drops packets because of queue length decrease of sending rate to resolve congestion
Lecture “Application Development for Mobile and Ubiquitous Computing“
© TU Dresden, Siemens Thomas Springer WS07/08, S.23
Algorithms for Congestion Control (2)
4 Algorithms: Slow Start, Congestion Avoidance, Fast Retransmit, Fast Recovery Packet loss detected
Retransmission Timeout
sender window reduced to one packet Retransmission Timer doubled slow start (exponential grow of sender window size)
Fast Retransmit (3 duplicated ACK)
TCP assumes loss of next unack packet retransmit packet before Retransmission Timeout efficient handling of seldom packet losses slidely decrease of sender window no change of Retransmission Timer
Lecture “Application Development for Mobile and Ubiquitous Computing“ © TU Dresden, Siemens Thomas Springer WS07/08, S.24
Congestion Control in TCP
Lecture “Application Development for Mobile and Ubiquitous Computing“
© TU Dresden, Siemens Thomas Springer WS07/08, S.26
Slow Start and Fast Recovery
Lecture “Application Development for Mobile and Ubiquitous Computing“
© TU Dresden, Siemens Thomas Springer WS07/08, S.28
Performance loss for TCP caused by Packet Error rate
Throughput of TCP with and without linklayer recovery versus packet error rate
Average end-to-end delay of TCP with and without link-layer recovery versus packet error rate
Lecture “Application Development for Mobile and Ubiquitous Computing“
© TU Dresden, Siemens Thomas Springer WS07/08, S.29
TCP Performance in microcellular wireless networks
• • • •
transferring 4 Mbytes of data between an MH and an SH MHs connect to 2 Mbit/s WLAN (IEEE 802.11) 4.3 BSD-Tahoe version of TCP from the University of California at Berkeley, Mobile IP software from Columbia University
© TU Dresden, Siemens Thomas Springer WS07/08, S.30
Lecture “Application Development for Mobile and Ubiquitous Computing“
Behavior of TCP congestion window in response to cell boundary crossings
after packet loss window size is degraded to 1 packet instead of fast error recovery
Lecture “Application Development for Mobile and Ubiquitous Computing“ © TU Dresden, Siemens Thomas Springer WS07/08, S.31
Two general Approaches for Wireless TCP
Wireless TCP
No change of TCP Change of TCP
Hiding Packet Losses
End-toEnd
Differentiated Handling of Packet Losses
Split Connection
Link-Layer
Extended Receiver Information TCP-Aware
Explicit Loss Notification
Explicit Congestion Notification
No Endto-End
TCP-Unaware
Lecture “Application Development for Mobile and Ubiquitous Computing“
© TU Dresden, Siemens Thomas Springer WS07/08, S.32
Hiding Packet Losses – Split Connection
Splitting up heterogeneous end-to-end TCP connections into homogeneous connections at the Base Station Advantages:
Separate flow control and error handling to improve performance of connection parts
Hiding of wireless packet losses from wired connection
Optimized protocol can be used between Mobile Host and Base Station No protocol changes required
Disadvantages:
No end-to-end semantics for connections Protocol stack has to be processed twice Component required at base station to maintain connections Additional overhead during handover - connection state has to be transfered between Base Stations packet buffers for both directions
Lecture “Application Development for Mobile and Ubiquitous Computing“
© TU Dresden, Siemens Thomas Springer WS07/08, S.33
Hiding Packet Losses – Change of Link Layer
Extension of error correction at link layer
Transparent for transport layer (TCP) Hiding packet losses from TCP
Two Approaches
TCP Unaware - independent from transport layer TCP Aware - Applying information from transport layer
TCP Unaware - Component at Base Station performs:
Forward error correction (FEC) Automatic Repeat Request (ARQ) Packet retransmission at link layer
Disadvantages
Interfering mechanisms for error handling at link and transport layer E.g. uncoordinated timeout intervals, duplicated retransmissions Result: performance reduction
Lecture “Application Development for Mobile and Ubiquitous Computing“
© TU Dresden, Siemens Thomas Springer WS07/08, S.34
TCP Aware - Snoop Protocol
Snoop Agent
Transparently intercepts routing code without changing the packet flow Control of packets and acknowledgements Caching of unacknowledged packets from Fixed to Mobile Host at Base Station Detection of packet losses and retransmission before TCP retransmision Support of packet flow from Mobile Host to Fixed Host using negative ACK
Advantages:
End-to-end semantics Only transient state information at Base Station – no additional overhead during handover Hinders interfering error correction at link and transport layer no changes of TCP necessary
Disadvantages:
transparency of link and transport layer broken (link layer depends on transport layer) no support for encrypted TCP packet headers (packet header/sequence numbers not availalbe without decryption)
Snoop Agent
Lecture “Application Development for Mobile and Ubiquitous Computing“ © TU Dresden, Siemens Thomas Springer WS07/08, S.35
Differentiated Handling of Packet Losses
Extensions to TCP protocol
Exchange of information about data transmission between communication partners
Extended Receiver Information
E.g. selective Acknowledgements (ACK) Array of Sequence Numbers
Unchanged TCP SACK
Explicit Loss Notification (ELN)
Attach information about router state to each packet (Queue length) Detection of concestions possible ELN-Bit of TCP ACK set if congestion detected Retransmission if ELN set, else congestion avoidance
Explicit Congestion Notification (ECN)
ECN-bit of TCP packets set by router in case of packet drop caused by congestion
Lecture “Application Development for Mobile and Ubiquitous Computing“
© TU Dresden, Siemens Thomas Springer WS07/08, S.36
Increased Performance for TCP
Performance of six protocols across a range of bit-error rates, ranging from 1 error every 16 KB to 1 every 256 KB shown on a log-scale
Lecture “Application Development for Mobile and Ubiquitous Computing“ © TU Dresden, Siemens Thomas Springer WS07/08, S.37
Summary
Explicit support at the network and transport layer required for wireless connections and mobility support
DHCP enables automated reconfiguration of network settings (IP address, gateway, DNS, …) Mobile IP supports mobility of mobile stations
Mobile devices remain reachable after network changes
Mobile TCP improves performance of TCP
Split-Connection Snoop Differentiated Handling of Packet Losses
Lecture “Application Development for Mobile and Ubiquitous Computing“ © TU Dresden, Siemens Thomas Springer WS07/08, S.38