You are on page 1of 46

UNIT III

MOBILE TRANSPORT AND APPLICATION


LAYER
TCP Overview

• Applications relay on transport layer such as TCP


(connection oriented) or UDP (connectionless) in case
of Internet.
• TCP: in-order delivery or reliable data transmission
using retransmission techniques
• TCP encounters packet loss, it assumes network
internal congestion and slows down the transmission
rate
•Transport control protocols typically designed for
–Fixed end-systems in wired networks
Traditional TCP
•TCP congestion control
- packet loss in fixed networks typically due to (temporary)
overload situations
- router have to discard packets as soon as the buffers are full
- TCP recognizes congestion only indirectly via missing
acknowledgements, retransmissions unwise, they would only
contribute to the congestion and make it even worse
- TCP (+ all other TCP connections experiencing the same
congestion) slows down the transmission rate dramatically to
resolve the congestion.
- Even under heavy load, TCP guarantees at least sharing of
the bandwidth
• TCP slow-start
- The behavior TCP shows after the detection of congestion
is called slow start
- Sender calculates a congestion window for a receiver
- Congestion window size = one segment (TCP packet)
- exponential increase* of the congestion window up to the
congestion threshold, then linear increase
- missing acknowledgement causes the reduction of the
congestion threshold to one half of the current congestion
window
- congestion window starts again with one segment
*slow-start vs. exponential increase: window is increased by one
for each acknowledgement, that is, 1 !2 !4 !8 … In other words,
the slow-start mechanism is rather a “quick-start”.
• TCP fast retransmit/fast recovery

- TCP sends an acknowledgement only after receiving a packet


- A sender receiving continuous acknowledgements for the same
packet -> informs sender of two things:
✓receiver got all packets up to the acknowledged packet in
sequence
Thus gap in the packet stream is not due to severe
congestion, but a simple packet loss due to a transmission error.
The sender can now retransmit the missing packet(s)
before the timer expires.
This behavior is called fast retransmit.
✓ receipt of acknowledgements shows that there is no congestion
to justify a slow start
- The sender can continue with the current congestion window.
- The sender performs a fast recovery from the packet loss gap
and is actually receiving packets
- Therefore, packet loss is not due to congestion, continue with
current congestion window (fast recovery)
Mobility and TCP
• TCP assumes congestion from a missing acknowledgement
(wrong one)
- here we often have packet loss due to transmission errors
- mobility itself can cause packet loss, if e.g. a mobile node
roams from one access point (e.g. foreign agent in Mobile IP) to
another while there are still packets in transit to the wrong access
point and forwarding is not possible
• The performance of an unchanged TCP degrades severely
- However, TCP cannot be changed fundamentally due to
the large base of installation in the fixed network, TCP for
mobility has to remain compatible
- The basic TCP mechanisms keep the whole Internet
together
• Following sections present some classical solutions before
discussing current TCP tuning recommendations
Indirect TCP (I-TCP)
• I-TCP segments the TCP connection into a fixed part and a wireless part -> , no real end-to-
end connection any longer
- good place for segmenting the connection between mobile host and correspondent
host is at the foreign agent of mobile IP
- foreign agent acts as a proxy and relays all data in both directions
- hosts in the fixed part of the net do not notice the characteristics of the wireless part
- CN (pckt) -> FA ((ack<-) +frwd(pckt->)) ->MH
- MH receives the pckt & ack is only used by the FA
- If pckt loss due to transmission error in wired connection, FA ->retransmission & CN
would not notice this
- MH (pckt) -> FA ((ack<-) +frwd(pckt->)) ->CN
- Pckt loss on wireless link-> MHs notice this much faster due to the lower RTT and can
directly retransmit the packet
• I-TCP requires several actions as soon as a handover takes place
• Pckt redirection + buffer data(das already ack.ed data) from old proxy to new
proxy (AFTER REGISTRATION) + sockets of proxy must migrate to the new
FA located in the access point.
• socket reflects-> current state of the TCP connection, i.e., sequence number,
addresses, ports etc.
• No new connection may be established for the mobile host, and the correspondent
host must not see any changes in connection state.
➢ I - TCP Advantages:
• no changes in the fixed network necessary, no changes for the
hosts (TCP protocol) necessary, all current optimizations to TCP
still work
• transmission errors on the wireless link do not propagate into the
fixed network
• simple to control, mobile TCP is used only for one hop, between a
foreign agent and a mobile host
• therefore, a very fast retransmission of packets is possible, the
short delay on the mobile hop is known
➢ I - TCP Disadvantages:
• loss of end-to-end semantics, an acknowledgement to a sender
does now not any longer mean that a receiver really got a packet,
foreign agents might crash
• higher latency possible due to buffering of data with the foreign
agent and forwarding to a new foreign agent
• high trust at foreign agent; end-to-end encryption impossible
Snooping TCP
• leaves the TCP end-to-end connection intact
• buffer data close to the mobile host to perform fast local retransmission in case of packet
loss
• foreign agent buffers all packets with destination mobile host and additionally ‘snoops’
the packet flow in both directions to recognize acks
• changes of TCP only within the foreign agent
• If the FA does not receive an ackt from mobile host within a certain time
- either the packet or the acknowledgement has been lost.
- Alternatively, the FA receives a duplicate ACK which also shows the loss of a
packet
• Data transfer to the mobile host
- FA buffers data until it receives ACK of the MH, FA detects packet loss
via duplicated ACKs or time-out
- fast retransmission possible, transparent for the fixed network
• Data transfer from the mobile host
- FA detects packet loss on the wireless link via sequence numbers, FA
answers directly with a NACK to the MH
- MH can now retransmit data with only a very short delay
• Integration of the MAC layer
- MAC layer often has similar mechanisms to those of TCP
- thus, the MAC layer can already detect duplicated packets due to
retransmissions and discard them
• Problems
- snooping TCP does not isolate the wireless link as good as I-TCP
- snooping might be useless depending on encryption schemes
Mobile TCP
• Special handling of lengthy and/or frequent disconnections
(+Dropping packets due to a handover or higher bit error rates )
• M-TCP splits as I-TCP does
- unmodified TCP is used on standard supervisory host (SH)
connection , while optimized TCP is used on SH-MH connection.
• Supervisory host
- similar to proxy
- no caching, no retransmission via SH (if pckt lost(wirless),
retransmission by sender)
- monitors all packets, if disconnection of MH detected (no
ack received)
✓Chokes the sender by setting sender window size to 0
✓sender automatically goes into persistent mode(no
retransmission)
- connectivity detected -> SH re-open the window to old value
• M-TCP advantages:
- maintains end-to-end semantics: SH does not send any ACK itself but
forwards the ACKs from the MH
- if MH is disconnected, a
✓ avoids useless retransmissions
✓ slow starts or breaking connections by simply shrinking the sender’s
window to 0.
- Since it does not buffer data in the SH, it is not necessary to forward buffers
to a new SH. Lost packets will be automatically retransmitted to the new SH.
• M-TCP disadvantages:
- SH does not act as proxy, M-TCP assumes low bit error rates, which is not
always a valid assumption.
- adapted TCP on wireless link; new software needed
Fast retransmit/fast recovery
• Problem: Change of foreign agent often results in packet loss
- TCP reacts with slow-start although there is no
congestion
• Solution: Forced fast retransmit
- as soon as the mobile host has registered with a new
foreign agent, the MH sends (three) duplicated
acknowledgements to correspondent hosts
- this forces the fast retransmit mode at the
communication partners
- additionally, the TCP on the MH is forced to continue
sending with the actual window size and not to go into slow-
start after registration
• Advantages:
• Disadvantage: on handover: packet loss due to problems on
the wireless link is not considered
Transmission/time-out freezing
• Mobile hosts can be disconnected for a longer time
- no packet exchange possible, e.g., in a tunnel,
disconnection due to overloaded cells or multiplex with higher
priority traffic
- TCP disconnects after time-out completely
• TCP freezing
- MAC layer is often able to detect interruption in advance
- MAC can inform TCP layer of upcoming loss of connection
- TCP stops sending, but does now not assume a congested
link
- MAC layer signals again if reconnected
• Advantage: scheme is independent of data
• Disadvantage: software on the mobile host to be changed,
Selective retransmission
• TCP acknowledgements are often cumulative
- if single packet is lost, sender has to
retransmit everything starting from the lost
packet (go-back-n retransmission) -> wastes
bandwidth
• Selective retransmission as one solution
- sender can now retransmit only the missing
packets
• Advantages: much higher efficiency
• Disadvantages: more complex software in a
receiver, more buffer needed at the receiver
Transaction oriented TCP
• TCP phases
- three handshake messages (connection setup), request
message (data transmission), three handshake messages
(connection release)
- thus, even short messages need a minimum of 7 packets!
• Transaction oriented TCP, describes a TCP version to avoid this
overhead
- connection setup, data transfer and connection release can
be combined
- thus, only 2 or 3 packets are needed
• Advantage: Efficiency
• Disadvantage: Requires changed TCP
TCP over 2.5/3G wireless networks
• characteristics have to be considered when deploying applications
over 2.5G/3G wireless links:
- Data rates: 2.5G systems are 10–20 kbit/s uplink and 20–50
kbit/s downlink, 3G and future 2.5G systems will initially offer
data rates around 64 kbit/s uplink and 115–384 kbit/s downlink.
data rates are asymmetric: expected that users will download more
data compared to uploading(is limited by the limited battery
power)
- Latency:
Wireless Application Protocol (WAP)
• An open, global specification that empowers mobile users with
wireless devices to easily access and interact with internet
information and services instantly.
• WAP is a standard for delivery of content from the Internet to
mobile devices.
• WAP uses Internet standards such as XML, user datagrams
protocol (UDP), and IP, but have been optimized for the unique
constraints of the wireless environment:
- low bandwidth.
- high latency.
- less connection stability (calls may drop).
- less predictable availability (network congestion).
• WAP protocol stack is designed to minimize the required
bandwidth and maximize the number of wireless network types
that can deliver WAP content
• The basis for transmission of data is formed by different bearer
services.
• WAP does not specify bearer services, but uses existing data
services and will integrate further services.
• Examples are message services, such as SMS of GSM, HSCSD in
GSM, or packet switched data, such as GPRS in GSM.
• The www in the internet offers web pages with the help of HTML and
web servers.
• To be able to browse these pages or additional pages with handheld
devices, a wireless markup language (WML) has been defined in
WAP.
• Special filters within the fixed network can now translate HTML into
WML, web servers can already provide pages in WML, or the
gateways between the fixed and wireless network can translate HTML
into WML.
• Gateways not only filter pages but also act as proxies for web access.
• WML is additionally converted into binary WML for more efficient
transmission.
• A special gateway can be implemented to access traditional telephony
services via binary WML.
• This wireless telephony application (WTA) server translates, e.g.,
signaling of the telephone network (incoming call etc.) into WML
events displayed at the handheld device.
Transport Layer
(Wireless Datagram Protocol (WDP))
• The WAP datagram protocol (WDP) is the Transport layer that sends and
receives messages via any available bearer network.
• Transport layer service access point (T-SAP) is the common interface to be used
by higher layers independent of the underlying network.
• At the T-SAP WDP offers a consistent datagram transport service independent
of the underlying bearer.
• WDP offers source and destination port numbers used for multiplexing and
demultiplexing of data respectively.
• WDP management entity supports changes in the environment -> may influence
the correct operation of WDP.
• Also includes: current configuration of the device, currently available bearer
services, processing and memory resources etc.
• Design and implementation: considered vendor-specific and is outside the scope
of WAP.
• The service primitive TDUnitdata.req is to send a datagram with the destination
address (DA), destination port (DP), Source address (SA), source port (SP), and
user data (UD) as mandatory parameters
• T-DUnitdata.ind service primitive indicates the reception of data.
• If a higher layer requests a service but cannot be fulfill, this error is indicated
with the T-DError.ind service primitive
• Error code (EC) is returned indicating the reason for the error to the higher
layer.
• If any errors happen when WDP datagrams are sent from one WDP entity to
another, wireless control message protocol (WCMP) provides error handling
mechanisms and should therefore be implemented.
• WCMP contains control messages that resemble the ICMP messages and can
also be used for diagnostic and informational purposes.
• WCMP can be used by WDP nodes and gateways to report errors.
• WCMP error messages must not be sent as response to other WCMP error
messages.
• WCMP messages are for destination unreachable (route, port, address
unreachable), parameter problem (errors in the packet header), message too big,
reassembly failure, or echo request/reply.
Security Layer
Wireless transport layer security (WTLS)
• WTLS provide different levels of security [»privacy (encryption)
»data integrity (MACs) »authentication (public-key and
symmetric)].
• Optimized for low-bandwidth communication channels
• WTLS supports datagram and connection-oriented transport layer
protocols
• Employs special adapted mechanisms for wireless usage
»Long lived secure sessions
»Optimised handshake procedures
• Before data can be exchanged via WTLS, a secure session has to be
established.
• Sequence of service primitives needed -> ‘full handshake’.
• Initiate the session with the SEC-Create primitive.
• Peer answers with a SEC-Create.res
• The peer also issues a SEC-Exchange primitive -> peer wishes to perform
public-key authentication with the client, i.e., the peer requests a client
certificate (CC) from the originator.
• The originator answers with its certificate and issues a SEC-Commit.req
primitive -> handshake is completed for the originator’s side.
• The certificate is delivered to the peer side and the SEC-Commit is indicated.
• The WTLS layer of the peer sends back a SEC-Commit.cnf to the originator.
• This concludes the full handshake for secure session setup.
• After setting up a secure connection between two peers, user data can be
exchanged -> done using the simple SEC-Unitdata primitive
• SEC-Unitdata has exactly the same function as T-DUnitdata (transfers a
datagram between a sender and a receiver).
• This data transfer is still unreliable, but is now secure.
Transaction Layer
Wireless transaction protocol (WTP)
• The basis is formed from three classes of transaction service:
- Class 0 provides unreliable message transfer, without any result
message.
- Class 1 provide reliable message transfer, without result message.
- Class 2 provide reliable message transfer, with, exactly one reliable
result message (the typical request/response case).
• WTP achieves reliability using duplicate removal, retransmission,
acknowledgements and unique transaction identifiers.
• No WTP-class requires any connection set-up or tear-down phase -> avoids
unnecessary overhead on the communication link.
• WTP allows for asynchronous transactions, abort of transactions, concatenation
of messages, and can report success or failure of reliable messages (e.g., a
server cannot handle the request).
• The term initiator is used for a WTP entity initiating a transaction (aka client),
and the term responder for the WTP entity responding to a transaction (aka
server).
• The three service primitives offered by WTP are:
- TR-Invoke to initiate a new transaction
- TR-Result to send back the result of a previously initiated transaction
-TR-Abort to abort an existing transaction.
• The PDUs exchanged between two WTP entities for normal transactions are
the invoke PDU, ack PDU, and result PDU.
• A special feature of WTP -> ability to provide a user acknowledgement or,
alternatively, an automatic acknowledgement by the WTP entity.
• If user acknowledgement is required, a WTP user has to confirm every message
received by a WTP entity.
• A user acknowledgement provides a stronger confirmed service because it
guarantees that the response comes from the user of the WTP and not the WTP
entity itself.
Session Layer
Wireless session protocol (WSP)
• WSP provides a shared state between a client and a server to
optimize content transfer.
• State is needed in web browsing, for example, to resume browsing
in exactly the same context in which browsing has been
suspended.
• Many web content providers therefore use cookies to store some
state on a client machine, which is not an elegant solution.
• This is an important feature for clients and servers.
• Client users can continue to work where they left the browser or
when the network was interrupted, or users can get their
customized environment every time they start the browser.
• WSP offers the following general features needed for content exchange between
cooperating clients and servers:
- Session management:
– WSP introduces sessions that can be established from a client to a
server
– Sessions can also be released in an orderly manner.
– Assume a mobile device is being switched off – it would be useful for
a user to be able to continue operation at exactly the point where the
device was switched off.
– Capability negotiation:
– Clients and servers can agree upon a common level of protocol
functionality during session establishment.
– Example parameters to negotiate are maximum client SDU size,
maximum outstanding requests, protocol options, and server SDU
size.
– Content encoding:
– WSP also defines the efficient binary encoding for the content it
transfers.
– WSP offers content typing and composite objects, for web browsing.
• Wireless session protocol/browsing (WSP/B) which comprises protocols and
services most suited for browsing-type applications.
• WSP/B offers the following features adapted to web browsing:
– HTTP/1.1 functionality: extensible request/reply methods, composite
objects, and content type negotiation.
✓ content headers are used to define content type, character set encoding,
languages etc., but binary encodings -> defined for well-known headers
to reduce protocol overheads.
– Exchange of session headers: Client and server can exchange request/reply
headers (include content types, character sets, languages, device
capabilities, and other static parameters)
– Push and pull data transfer: Pulling data from a server is using the
request/response mechanism from HTTP/1.1.
✓ Three push mechanisms: a confirmed data push within an existing
session context, a non-confirmed data push within an existing session
context, and a non-confirmed data push without an existing session
context
– Asynchronous requests: supports a client that can send multiple requests to
a server simultaneously
Application Layer
Wireless Application Environment (WAE)
• Main idea: to create a general-purpose application environment based mainly
on existing technologies and philosophies of the world wide web.
• WAE has already integrated the following technologies and adapted them for
use in a wireless environment with low power handheld devices:
- HTML (Raggett, 1998),
- JavaScript (Flanagan, 1997),
- handheld device markup language HDML (King, 1997) form the basis
of the wireless markup language (WML)
- scripting language WMLscript.
• The exchange formats for business cards and phone books vCard (IMC, 1996a)
and for calendars vCalendar (IMC, 1996b) have been included.
• URLs from the web can be used.
• A wide range of mobile telecommunication technologies have been adopted
and integrated into the wireless telephony application (WTA)
• Global goal of the WAE: to minimize over-the-air traffic and
resource consumption on the handheld device
• A client issues an encoded request for an operation on a remote
server.
• Encoding is necessary to minimize data sent over the air and to
save resources on the handheld device.
• Decoders in a gateway now translate this encoded request into a
standard request as understood by the origin servers.
• The origin servers will respond to the request.
• The gateway now encodes the response and its content (if there is
any) and transfers the encoded response with the content to the
client.
• The WAE logical model also includes push services.
• Then an origin server pushes content to the gateway.
• The gateway encodes the pushed content and transmits the encoded
push content to the client.
• Several user agents can reside within a client.
• User agents includes: browsers, phonebooks, message editors etc.
• WML user agent that supports WML, WMLscript, or both (i.e., a
‘WML browser’).
• WTA user agent handles access to, and interaction with, mobile
telephone features (such as call control).
• User agent profile (UAProf), which describes the capabilities of a
user agent.
• Capabilities may be related to hardware or software.
• Examples are: display size, operating system, browser version,
processor, memory size, audio/video codec, or supported network
types.
• The basic languages WML and WMLScript, and the WTA will be
described in the following three sections.