You are on page 1of 58

Mobile Client and Mobile IP

CONTENTS Mobile Client

Moving beyond desktop


Mobile handset overview
Mobile phones and their features
PDA
Design Constraints in applications for handheld
devices

CONTENTS MOBILE IP

Introduction
Discovery
Registration
Tunneling
Cellular IP
Mobile IP with IPv6

Client Programming

Introduction

ArthurC Clark (1997)


quoted information is not
knowledge, knowledge is not wisdom and wisdom is
not foresight. Each grows out of the other and we need
them all
In essence hardware, software and network together make
powerful applications possible, each is not more or less than
the other

MOVING BEYOND DESKTOP

Handheld devices have evolved


Mobile devices have been traditionally classified as phones,
pagers and personal data assistants (PDAs)

Cell phone- used for communication, similar to wired phones


Pagers provides text message
PDAs provide portable data applications like calendar and
notepad
Most cell phones now include address books and SMS, e-mail
access and almost all contemporary PDAs include
communication capabilities
Today devices offer many permutation and combinations of these
features leading to one-size-fits-all devices

EVOLUTION OF CELLULAR TECHNOLOGY

EVOLUTION OF PDA

COMPARISON OF CAPABILITIES OF DIFFERENT DEVICES

EVOLUTION OF MOBILE TECHNOLOGY

SUMMARIZING

All applications thus have basic requirement


The least they require is:

Some input to provide some useful output


Memory for runtime and persistent storage
Some communication capabilities

Most of these are device capabilities , but programming


at a device level is cumbersome and generally not
advisable
There is a need for some level of abstraction on the
bare hardware this layer of abstraction is the device
operating system

Palm programming is mostly done in C / C++


Symbian in C++ / Java
WinCE or PocketPC in embedded VB or embedded VC

STRUCTURE OF A MOBILE DEVICE

A PEEK UNDER THE HOOD: HARDWARE OVERVIEW

Modern devices have a Million Instructions Per


Second(MIPS) capability to process information stream
(voice/data) stream
Both classes of devices essentially consists of:

A microprocessor
A power source
A signal converter
An I/O unit
Some memory (both persistent and volatile)

Overview of a Digital Communication Device

MOBILE PHONES

The above diagram depicts the internal components of a cell phone


Antenna: the signal reception unit
Circuit board: this is the control unit of the system, it has several important chips
mounted on it, the prominent amongst these are:
1.The analog-to-digital and digital-to-analog conversion chips
This is represented as RF to Digital block
This is the entry and exit point to the phone
This chip is designed to convert analog network signals to digital for the phone to
process and reverse
2. The microprocessor
This controls and co-ordinates the handset functions
It includes the user input / output and network interfaces that include
communication with the base station
3. The ROM and Flash memory chips provide storage for the phones storage
requirements, which include system memory and application memory
Additional memory is also provided through external detachable memory cards
4. The Digital Signal Processor (DSP) is a highly sophisticated chip that manages
the signal manipulations
5. The radio frequency chip manages the signal channels while the power section is
responsible fro power management and recharging

Other components are

Display unit is the output, generally a Liquid Crystal


Display (LCD) panel
Keyboard (qwerty or T): This is the input unit
Microphone: To facilitate speech transmission
Speaker: The microphones listener counter part
Battery: The source of electrical energy

FEATURES OF MOBILE PHONES

Features

Baseband architecture
Processor
Audio / video components
Data storage
Display

Baseband

Functionality is architecturally a larger concept


Helpful in provision of cellular control logic, signal processing
and user interface management
Contributes in memory and energy management
Conglomeration of tradeoffs between electromagnetic
capability, performance, power consumption and cost
Electromagnetic capability is determined by placement of
high speed circuits and RF transmitter location along with
other mechanical constructions
Performance is calibrated in terms of user requirements (like
user interfaces, mobile phone execution engine etc.),
instructions processed per second and other system
requirements

Design constraints in Applications for Handheld Devices

Device characteristics:

Low-end processors
Small screen size
Cumbersome input device
Limited battery power
Memory limitations

Design Constraint 1: Processing Power

Processing speed starts from 16MHz


Some heavy duty computations like encryption key
generation is a drain on the devices resources, thus
needs a good processor design
Offloading the computations to the server is always a
good idea, but will leads to poor response, which is
frustrating experience for the user
Too many computations on the client while allowing
for faster response eat into valuable memory

Categorizing client based on the functionality and


specificity of the software

Thin clients:

Generic, cater to wide range of sources


Similar to web browsers
Communication from the server is mainly based on
different flavors of Markup Language(ML)
Requires a local parser
The server needs to send large amount of display
information to the client, to adequately represent data,
chocking up the transmission channel
Thus the thin client offers generality at the cost of
bandwidth
This is a major consideration in networks where the users
pay for the data and not call time

Thick Clients:

The intelligence resides in the device and a call is made to


the server only for data
Computation is done locally
While this approach resolves the bandwidth problem but
introduces two major concerns viz., size of the application
on the device and the distribution of the application when
an update of fix happens

Thin plus or semi-thick clients:

These lie somewhere in between thick and thin

Based on the functionality of the application


The bandwidth availability
Cost constraints

Design Constraint 2: Screen Size:

Handheld device characterized by

Small screen size


Limiting information that we can display at one time
Screen should be designed very carefully to fit the small
screen display
Good practice to limit the scrolling to two screens below
Navigation should be easy using a single click
General thumb rule is to consider the depth of the
navigation should be at most four clicks

Design Constraint 3: Cumbersome Input Devices

Most devices sport stylus or T keypad or very small


qwerty keyboard keying is a pain
Input should be kept to the minimum
Try to device inputs as a single click kind of option like
Yes / No may be substituted by a radio button as scroll
and click in most devices is easier than clicking

Design Constraint 4: Application Load Time

Generally, user switch on their handhelds for short


duration
Eg: Often it is used to retrieve a contact number
The load time for such application should be low as the
user would not like to wait for the application to load
each time

Design Constraint 5: Battery

Batteries are scarce resource


One of the keys to the success of the application is long
battery life
Sound, extended animations, Serial or IR
communications
and
many
MIME
intensive
applications use CPU for longer period and thus
consume large amounts of power

Design Constraint 6: Memory

Most of the handheld devices have limited storage


space, ranging from 512MB to 8GB
Dynamic heap ranging from 32K to 256K
Such circumstances optimization is very crucial
The optimization mantra is

heap first
speed second
code size third

Design Constraint 7: Data Storage

All devices provide some amount of persistent storage


This is very limited
Different devices organize data in different ways
Palm OS-based devices

Treat all storage as database blocks

Design Constraint 8: Backward Compatibility

Devices are rapidly evolving and in very short span of


time the user feel their device a being obsolete
Users are not expected to upgrade their system every
time an advanced version becomes available
So, to gain wider acceptance, there is a need to write
applications in such a manner that they will run on all
versions of the device
At the same time give the users of a later version better
functionality

Design Constraint 9: Application Size

Applications need to be stored on the devices


Most devices have limit on the size of executables
This needs to be taken care during the design phase
Should ensure that only absolutely necessary stuff
resides on the device

RECENT DEVELOPMENTS IN CLIENT TECHNOLOGIES

Mobile devices are becoming increasingly popular


Grown upto 3.5 billion by the end of 2009
Dividing line between mobile phones, PDAs or mobile
computers are slowly disappearing
Host of multimedia features introduced
Services and portals having specific affinity to support
these devices are gaining popularity
Several independent service providers catering to
various sets of use cases
Range of OS like Symbian, Windows Mobile, Samsung's
Bada, Palm OS, Blackberry OS, Iphone OS, Googles
Android etc.

MOBILE IP

INRODUCTION TO MOBILE IP

Mobile computing aids user with continuous access to


data and services in a state of mobility
Mobile Computing vs Portable Computing

Portable Computing

Mobile Computing

We move with the computing device from one location to another


Use network while stationary
Offers seamless computing and data networking facility even if the
user is in a state of mobility and changes the network

Handling Mobility Management where a user is at a


vehicular state and accessing the network

IP and TCP working

IP routes packets from a source endpoint to the


destination endpoint
IP address of a node is a combination of network
address and the node address
The network portion of an IP address is used by routers
to deliver the packet to the last router in the chain to
which the target computer is attached
The last router then uses the host portion of the IP
address to deliver the IP packet to the destination
computer
In addition to IP we need TCP / UDP port of the
applications

Connections scenario

A TCP connection is identified by a quadruplet that contains


the IP address and the port number of the sender
endpoint along with the IP address and the port number of
the receiving endpoint
In case the users are mobile, it is essential that all of these four
identifiers remain constant (physically / virtually)
The TCP ports are application specific and thus are generally
constant
IP address will change when a node moves from one subnet to
another
To fix this problem, Mobile IP allows the mobile node to use
two IP addresses
The IP addresses are called home address and care-ofaddress

Home address and Care-of-address

Home address

Original static IP address of the node


Known to everybody as the identity of the node

Care-of-address

Changes at each new point of attachment


Is mobile nodes location specific address
These are similar to MSISDN number and the MSRN(Mobile
Station Roaming Number) respectively as in GSM network

Two more network elements in Mobile IP that play a


very significant role in routing of the packets as part of
mobility management are home agent and foreign
agent
Home agent

It is a router on a mobile nodes home network


It forwards datagrams for delivery to the mobile node
through a tunnel when it is away from home
The home agent also maintains current location
information of the mobile node

Foreign Agent

It is a router on a mobile nodes visited network which


provides routing services to the mobile node while registered
The foreign agent detunnels and delivers datagrams to the
mobile node that were tunneled by the mobile nodes home
agent
For datagrams sent by a mobile node, the foreign agent may
serve as a default router for registered mobile nodes
This is similar to the concept of HLR and VLR in cellular
network

Step 1:

Step 2:

The mobile node registers its new care-of address with its home agent
informing its new location and new care-of address

Step 5:

The care-of address can either be determined from a foreign agents


advertisement or by some external assignment mechanism like DHCP

Step 4:

When the mobile node detects that it has moved to a foreign network,
it registers with the foreign agent and obtains a care-of address on the
foreign network

Step 3:

When a mobile node is located on its home network, it operates with its
mobility services

The home agent forwards all the incoming data packets to the foreign
network using the care-of address

Step6:

The delivery requires that the packet header is modified so that the
care-of address becomes its destination IP address

Step 7:

The new header encapsulates the original packet, causing the


mobile nodes home address to have no impact on the
encapsulated packet routing
Diagram depicting how Mobile IP works
The diagram shows
General terms how Mobile IP deals with the problem of
dynamic IP addresses
On returning to its home network from being registered
elsewhere, the mobile node deregisters with its foreign agent,
through exchange of a Registration Request and the
Registration Reply message

Mobile IP Architecture

Let us look at the example of IP datagrams being


exchanged over a TCP connection between the mobile
node A and another host Server X, following are the
steps involved:

Step 1:

Server X wants to transmit an IP datagram to node A


The home address of A is advertised and known to X
X does not know whether A is in the home network or somewhere
else, thus X sends the packet to A with As home address as the
destination IP address in the IP header
The IP datagram is routed to As home network

Step 2:

At the As home network, the incoming IP datagram is


intercepted by the home agent
The home agent discovers that A is in a foreign network
A care-of address has been allocated to A by this foreign
network and available with the home agent
The home agent encapsulates the entire datagram inside a
new IP datagram, with As care-of address in the IP header
This new datagram with the care-of address as the
destination address is retransmitted by the home agent

Step 3:

At the foreign network, the incoming IP datagram is


intercepted by the foreign agent
The foreign agent is the counterpart of the home agent in the
foreign network
The foreign agent strips off the outer IP header, and delivers
the original datagram to A

Step 4:

A intends to respond to this message and sends traffic to X


In this example X is fixed IP address
For routing As IP datagram to X, each datagram in sent to
some router in the foreign network
This router is the foreign agent
A uses Xs static IP address as the destination address in the
IP header

Step 5:

The IP datagram from A to X travels directly across the


network using the Xs IP address as the destination address

To support operations illustrated in above diagram,


mobile IP needs the support of three basic capabilities:

Discovery a mobile node uses a discovery procedure to


identify prospective home and foreign agents
Registration a mobile node uses a registration procedure
to inform its home agent of its care-of address
Tunneling Tunneling procedure is used to forward IP
datagrams from home address to a care-of address

Discovery

Agent advertisement is transmitted by both home and


foreign agents to advertise their services on a link
Mobile node uses these advertisements to determine
their current point of attachment to the Internet
The Mobile IP discovery procedure has been built on
top of existing ICMP (Internet Control Message
Protocol)

router discovery
router advertisement
router solicitation procedure

Mobile IP uses control messages that are sent to and


rom UDP port number 434

Additional ICMP router information includes

0 One-byte Padding
16 Mobility Agent Advertisement
19 Prefix-Length

Mobile IP control messages include extension like

1 Registration Request
3 Registration Reply
32 Mobile-Home Authentication
33 Mobile Foreign Authentication
34 Foreign-Home Authentication

The discovery process

For discovery

The router or an agent periodically issues a router advertisement


ICMP message
The mobile mode on receiving the advertisement packet
compares the network portion of the router IP address with the
network portion of its own IP address allocated by the home
network
If they do no match then the mobile node knows that it is in a
foreign network
What is router advertisement?

A router advertisement can carry information about default router


and one or more care-of address

If a mobile node needs a care-of address without waiting for the


agent advertisement, then the mobile node can broadcast a
solicitation that will be answered by any foreign agent

Registration

Once a mobile node obtained a care-of address from


the foreign network, same needs to be registered with
the home agent
The mobile node sends a registration request to a
home agent with the care-of address information
When the home agent receives this request, it updates
its routing table and sends a registration reply back to
the mobile node

Authentication

As part of registration, the mobile node needs to be


authenticated
Each mobile node, foreign agent and the home agent
support a mobility security association (SA) for mobile
entities
This is indexed by their security parameters index (SPI)
and IP address, which must be its Home Address
Registration messages between a mobile node and its home
agent MUST be authenticated with an authorizationenabling extensions

Eg: The Mobile-Home Authentication Extension, this MUST be the


first authentication extension, foreign agent-specification
extensions MAY be added to the message after the mobile node
computes the authentication

The registration process involves the following four


steps:

The mobile node requests for forwarding service from the


foreign network by sending a registration request to the
foreign agent
The foreign agent relays this registration request to the home
agent of that mobile node
The home agent either accepts or rejects the request and
sends a registration reply to the foreign agent
The foreign agent relays this reply to the mobile node

Special cases

Assumption is, foreign agent will allocate the care-of


address
Mobile node moves to a network that has no foreign
agents or on which all foreign agents are busy

The care-of address may also be acquired dynamically and a


temporary one also like DHCP
Mobile node may act as its own foreign agent by using a colocated care-of address
A co-located care-of address is an IP address obtained by
the mobile node that is associated with the foreign network
If the mobile node is using a co-located care-of address,
then the registration happens directly with its home agent

Tunneling

In mobile IP, an IP-within-IP encapsulation mechanism


is used
Here the home agent adds a new IP header called the
tunnel header

The new tunnel header uses the mobile nodes care-of


address as the tunnel destination IP address
The tunnel source IP address is the home agents IP address
The tunnel header uses 4 as the protocol number
In IP-within-IP, the entire original IP header is preserved s
the first part of the payload of the tunnel header
The foreign agent after receiving the packet, drops the
tunnel header and delivers the rest tit he mobile node

Tunneling in Mobile IP

IP header in Mobile IP

You might also like