Vous êtes sur la page 1sur 9

Module 28 Mobile IP: Discovery, Registration and Tunneling

Learning Objectives Introduction to different phases of Mobile IP Understanding how a mobile node search the agents using Discovery process Understand how care-of-addresses are acquired Understand the registration process in which a mobile registers its care-of- addresses with Home Agent Understand techniques of Tunneling and encapsulation 1. Introduction

In the previous module we have introduced Mobile IP technology, its need in context with
In the previous module we have introduced Mobile IP technology, its need in context with the
mobile ubiquitous scenario, the components entities and working of Mobile IP. We had learnt
that whenever the mobile node travels into a new network, it acquires a temporary address
which it informs to its home agent. Any packet for the mobile node is forwarded to the
temporary address by the Home Agent by encapsulating it in another packet. To support this
functioning, the first thing necessary is that the mobile node understands that it is in a foreign
network, search for the foreign agent and obtain COA. Then secondly the mobile node registers
COA with the Home agent. Then the mechanisms for tunneling and encapsulations follow. All
these activities are performed in three phases identified as: Discovery, Registration and
Tunneling. This module aims with deep understanding of these phases and the activities
underneath them.
2.
Discovery
In this phase, the mobile node finds that it is in a foreign network and searches for a foreign
agent. This can be done in two ways by agent Advertisements and agent solicitation.

2.1

Agent Advertisement

Agent advertisements are used to discover the home and foreign agents while moving from one network area to network. The process is similar as when the internet nodes detect routers by ICMP router discovery protocol (RFC 1256). Therefore the same RFC 1256 is used for agent discovery with the support of mobility by attaching special extensions to ICMP messages. The Home Agent and Foreign Agent periodically send a router advertisement ICMP messages in the form of beacon frames. In this way they show their willingness to act as Mobile IP routers. When the mobile node receives the advertisement; it compares the network part of the agent s IP address with the network part of its own IP address (Home address). A mismatch in network parts indicates that mobile node is in a foreign network. The foreign agent provides foreign-

agent care-of-address through agent advertisement which is the address of foreign agent itself. Many nodes can share the same care-of-address which reduces demand of already scarce IPv4 addresses and also IPv6 addresses looking at the sprawl of mobile computing devices. It also reduces bandwidth because foreign agent is end of the tunnel therefore messages from foreign agent to mobile node are not encapsulated.

The following Extensions are applied to ICMP router Advertisement and are shown in Figure 1

Original ICMP Packet

type =16 length Sequence number registration lifetime R B H F M G r T
type =16
length
Sequence number
registration lifetime
R
B H
F
M G
r
T reserved
COA 1
COA 2
Figure 1: Agent Advertisement Packet with Mobility Extension
Mobile-IP extension
1)
Type = 16
2) Length = number of COA provided with the message. It is equal to 6+4*(no. of
addresses)
3) Registration lifetime = maximum lifetime specified by the agent in seconds which
4)
5)
the node can request during registration.
Sequence No. = total no. of advertisements sent during initialization.
The flags after registration lifetime explain the features of advertisement. They are
described as:

R-bit: registration with this agent is required even when the mobile node uses a co- located COA. B-bit: The Foreign agent is busy to take any registrations H-bit: Agentis home agent F-bit: Agent is foreign agent M-bit: Minimal encapsulation is used for encapsulation G-bit: Generic routing encapsulation is used r-bit: was initially set to V in first version of mobile IP (RFC 2002) suggested use of header compression and should be ignored. T-bit: reverse tunneling. The fields following the flags lists the COAs advertised. The foreign agent should advertise at least one CoA. Home agents do not broadcast care-of- addresses but they still broadcast mobility agent advertisements which the mobile node knows when they return to their home network.

2.2 Agent Solicitation

The mobile node can also broadcast an agent solicitation based on RFC 1256 for router solicitations. It will be answered by the foreign agent. A mobile node can search the foreign agent using agent solicitation. To avoid flooding of the network, three solicitations are sent per second as it enters a new network. This gap can be large for dynamic networks with moving mobile nodes or the app s which require continuous packet stream. If a node does not get reply for agent solicitation, it decreases the rate of solicitations to avoid flooding of network.

If the mobile node moves to a network that has no foreign agents or all the agents are busy it can acquire a temporary address through DHCP (RFC 2131) .The mobile node acts as its own foreign agent and the address obtained as known as co-located care-of-address.

3.Registration Once the care-of-address is achieved through the two steps describe as above the mobile
3.Registration
Once the care-of-address is achieved through the two steps describe as above the mobile node
registers it with its Home agent and informs about the current location where the packets
intended for it can be forwarded. The mobile node sends a registration request to the Home
Agent with its Care-of address information. The Home Agent receives this request and accepts
or reject it andaccordingly sends a registration reply back to the mobile node. The process of
registration request depends on the location of COA.
Case 1.When care-of-address is of foreign agent
In case of foreign agent COA, the registration is done via FA as shown in Figure 2.
MN
FA
HA
Registration request Registration request Registration reply Registration reply
Registration
request
Registration
request
Registration
reply
Registration
reply

Figure 2 : Registration process of mobile node with FA COA

It involves four steps

a. The Mobile node sends a registration request to foreign agent and at the same time requests for forwarding services.

b. FA forwards the registration request to the Home agent of that mobile node.

c. HA either accepts or rejects the request and sends a registration reply to the FA.

d. FA relays this reply to the mobile node.

Duringthe registration process, the Home agent maintains mobile binding containing the Home address, Care-of-address and registration lifetime. This is called binding of the mobile node. Registration lifetime is negotiated during registration process and represents validity of registration in seconds. It cannot be greater than provided with agent advertisement. The registration is valid till that period and is automatically deleted after the lifetime expires. The MN registers again before the binding period expires when it moves to another foreign network or when it returns to the Home network. This prevents mobility bindings of the nodes which are no longer used.

The registration can be unsuccessful if there are too many tunnels at HA and it
The registration can be unsuccessful if there are too many tunnels at HA and it cannot handle
more requests or when there is authentication failure or HA is not reachable to FA.
Case 2. If the mobile node uses co-located address it can directly send request to the Home
Agent (Figure 3)
MN Registration
HA
request
Registration
reply

Figure 3: Registration process of mobile node with HA

UDP packets used for the registration requests and reply. UDP header for registration request contains the following fields

0

7

8

15

16

23

24

31

type 1

S

B

D

M

G

R

T

x

lifetime

home address

home agent

COA

Identification

extensions Figure 4: Registration request format

Type = 1 for registration request 8 bits per flag as follows S bit is set if MN wants previous mobility bindings to be retained hence permitting simultaneous binding. B bit is set if MN wishes to receive broadcast messages which the HA receives in Home network. D bit indicates that MN uses co-located address hence take part in tunnels decapsulation at the end point. M bit indicates that the mode of encapsulation is minimal encapsulation. G bit indicates generic routing encapsulation. T bit indicates reverse tunneling from the FA r & x are set to zero Life time = validity of registration in seconds. A zero indicates the deregistration and all the bits set to one indicates infinite time. Remaining fields are Source address of packet which is interface address of MN. Destination address is that of FA or HA depending on type of COA. COA of the MN at the new agent. Identification which is generated by mobile node to uniquely identify a request and match it with registration reply. This field protects against replay attacks of registrations. Extensions contain parameter for authentication.

Extensions contain parameter for authentication. Registration message between mobile node and home agent

Registration message between mobile node and home agent should be authenticated to prevent any malicious node to disrupt the traffic between mobile node and foreign agent using bogus care-of-address. Using 128-bit secret key and HMAC-MD5 hashing algorithm, a digital signature is generated. Each mobile node and home agent shares a common secret which makes digital signature unique and allows the agent to authenticate the mobile node.

Registration Reply:

0

7

8

15

16

31

type = 3

code

lifetime

Home address

Home agent

COA

Identification

extensions

Figure 5: Registration reply format

UDP datagram for reply contains following words: Type field =3 Code = result of registration
UDP datagram for reply contains following words:
Type field =3
Code = result of registration as specified in Table 1
Lifetime= For how much time in seconds the registration will be valid in case it was
successful
Registration
Code
Explanation
Successful
0
Registration accepted
1
Registration accepted, but simultaneous mobility bindings unsupported
Denied by FA
66
Insufficient resources
67
Mobile node failed authentication
68
Home agent failed authentication
69
Requested lifetime > advertised limit
88
Home agent unreachable
Denied by HA
130
Insufficient resources
131
Mobile node failed authentication
132
Foreign agent failed authentication
133
Registration identification mismatch
136
Unknown Home agent address

4. Tunneling and encapsulation

4.1 Tunneling After the registration process, the HA is informed of COA of the mobile node. When a packet arrives at HA for the mobile node, it forwards it to its COA using a tunnel from HA IP address to the COA. Tunneling means establishment of pipe and pipe is the data stream between two connected ends. Data is inserted from one end and it s retrieved as FIFO words from other end. Tunneling is done using encapsulation.

4.2 Encapsulation

Encapsulation means putting a packet header and data as data of another packet. Decapsulation means removing the packet out from the data part of that packet.The new header is called outer header or tunnel header. The original header is called inner header. There are different ways of performing encapsulation

4.2.1 IP-in-IP encapsulation: In this scheme the home agent adds a new IP header called

tunnel header. The new tunnel header uses HA address as source address and mobile node s COA as the tunnel destination address. The tunnel header use 4 as the protocol number indicating that the next protocol header is again an IP header.

Encapsulated diagram Sr Dest Proto C M ? DATA Sr Dest Proto Src Dest Proto
Encapsulated diagram
Sr
Dest
Proto
C
M
?
DATA
Sr
Dest
Proto
Src
Dest
Proto
H
CO
4 or 55
C
M
?
DATA
Home agent
Foreign agent

Mobile node

Figure 6: IP within IP Encapsulation

Version = 4 IHL DS (TOS) Total length IP identification flags fragment offset Outer Header
Version = 4
IHL
DS (TOS)
Total length
IP identification
flags
fragment offset
Outer Header
time to live
Protocol = 4
Header checksum
IP address of HA (source)
Care-of-address of MN (Destination)
Version = 4
IHL
DS (TOS)
Total length
IP identification
flags
fragment offset
Inner Header
time to live
Protocol = 4
Header checksum
IP address of CN (source)
Home address of MN (Destination)
Figure 7: IP within IP Encapsulation
4.2.2 Minimal Encapsulation (RFC, 2004)
It is an optional encapsulation. To remove the several redundant fields like TOS, minimal
encapsulation is used. The changes are in the inner header. The values of fields reflecting
different are
Protocol field =55
Destination address is IP address of exit point of tunnel
S is original source address present bit; s=1 original source address
Length field is incremented by size of forwarded packet. Increments depend on value
of s. If s=1,it is 12 octets else it is 8
ver.
IHL
DS (TOS)
length
IP identification
Flags
Fragment
offset
TTL
Protocol
IP checksum
=55
IP address of HA
Lay 4
S
reserved
IP checksum
protocol
IP address of MN
Original sender IP address (id S=1)
TCP/UDP/ payload

Figure 8: Minimal Encapsulation

4.2.3 Generic routing Encapsulation (RFC 1701, 2784)

This method supports encapsulation of packet of one protocol suite into data part of another packet of another network protocol type. In this, an additional GRE header is prepended to the original packet. Both of these are added as data part of new header.

Original Header

Original data

Outer header

GRE header

Original header

Original data

New header New data 5. Conclusion In this module, we have elaborately discussed the implementation
New header
New data
5.
Conclusion
In this module, we have elaborately discussed the implementation of Mobile IP
technology in different phases. We had understood the methods for agent
discovery, registration process and how Home agent performs Tunneling and
encapsulation. It can be concluded that Mobile IP technology provides
uninterrupted connectivity to the devices moving from one network to another
network.