Module 3 Part 1

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 46

Course Name: Mobile Computing

Semester-VI
Computer Engg.

Pinki Vishwakarma
Associate
Professor
Computer Engg. Department
Mobile Communication
and Computing
Topics to be covered:
• Mobile IP
⮚ Motivation
⮚ Requirement
• IP Packet Delivery
⮚ Mobile IP Terminologies

Source of Reference:
• Jochen Schiller, “Mobile
Communications”,
Objectives
• To understand requirement of mobile
IP.
• To get to know the host mobility
support in mobile IP.
• To introduce the different phases
of Mobile IP.
Motivation for Mobile
IP
Routing: It is based on IP destination address. Network
prefix which determines physical subnet (e.g. 129.13.42). The
change of physical subnet leads to change of IP address to
have a topological correct address (standard IP).
⮚ Solution to the problem is to temporarily change
routing table entries for mobile host but it does not scale
if many mobile hosts or frequent location changes are
there.

⮚ Change mobile host IP-address adjust the


host IP address depending on the current location, DNS
updates take to long time , Old TCP connections break
Requirements for Mobile
IP
Transparency: The mobile end systems keep IP
address, there is continuous service even after link
interruption and the point of connection to the fixed network
can be changed

Compatibility: No changes to the current hosts or


routers and the mobile end systems can communicate with
fixed systems.
Security: authentication of all the registration messages
are done.
Mobile IP
Terminologies
⮚ Mobile Node (MN)

⮚ Home Agent (HA)

⮚ Foreign Agent (FA)


1. Care-of Address (COA)
2. Co-located COA

⮚ Correspondent Node (CN)


Mobile IP
Terminologies
IP Packet
Delivery

1. The Correspondent node (Sender) sends to the IP address of MN, HA


intercepts the packet
2. The HA tunnels the packet to COA by encapsulating it.
3. Then the FA forwards the packet to MN
4. In Reverse the sender (MN) sends to IP address of receiver (CN), FA is
the default router
Outcome
• To bestow an overview of the
Mobile IP technology.
Course Name: Mobile Computing
Semester-VI
Computer Engg.

Pinki Vishwakarma
Associate Professor
Computer Engg. Department
Mobile Computing

Topics to be covered:
• Agent Discovery
➢ Agent Advertisement
➢ Agent Solicitation

Source of Reference:
• Jochen Schiller, “Mobile Communications”,
Addison Wesley Second Edition.
Objectives
• To understand the mobile node current
point of attachment to the Internet or to
an organization's network.
• To understand how a mobile node search
the agents using discovery process.
IP Packet Delivery

1. The Correspondent node (Sender) sends to the IP address of MN, HA intercepts


the packet
2. The HA tunnels the packet to COA by encapsulating it.
3. Then the FA forwards the packet to MN
4. In Reverse the sender (MN) sends to IP address of receiver (CN), FA is the
default router
Agent Discovery
The problem of an mobile node (MN) is how to find a foreign
agent after moving . And how does the MN discover that it
has moved? For this purpose mobile IP describes two
methods:
➢ Agent advertisement

➢ Agent solicitation
Agent advertisement
• Foreign agents and Home agents advertise their presence
periodically using special agent advertisement messages.

• These advertisement messages are seen as a beacon


broadcast into the subnet.

• These advertisements are Internet control message


protocol (ICMP) messages
Agent advertisement
0 7 8 15 16 23 24 31
The type is set to 9
type code checksum The code can be 0, if the agent
#addresses addr. size lifetime also routes traffic from non-mobile
router address 1
nodes, or 16, if it does not route
anything other than mobile traffic.
preference level 1
The number of addresses
router address 2 advertised with this packet is in
preference level 2 #addresses while the addresses
themselves follow as shown.
…………… Lifetime denotes the length of
time this advertisement is valid.
Preference levels for each address
help a node to choose the router
that is the most eager one to get a
new node.
Agent advertisement
type is set to 16
length depends on the number of COAs pro-
vided with the message and equals 6 +
4*(number of addresses).
total number of advertisements sent since
type = 16 length sequence number initialization in the sequence number.
By the registration lifetime the agent can specify
registration lifetime R B H F M G r T reserved the maximum life- time in seconds a node can
request during registration
COA 1 The R bit is the registration bit.
If the agent is currently too busy to accept new
COA 2
registrations it can set the B bit.
... If the agent offers services as a home agent (H)
or foreign agent (F) on the link where the
advertisement has been sent.
M specify minimal encapsulation and G specify
generic routing encapsulation.
The field r at the same bit position is set to zero
and must be ignored.
The field T indicates that reverse tunneling is
supported by the FA.
The following fields contain the COAs advertised.
Agent solicitation
• If no agent advertisements are present or the inter-arrival time is too
high, and an MN has not received a COA by other means, e.g., DHCP.
• Then the mobile node must send agent solicitations.
• The solicitation messages should not flood the network, but an MN
can search for an FA endlessly sending out solicitation messages.
• A mobile node can send out three solicitations, one per second, as
soon as it enters a new network.
• If a node does not receive an answer to its solicitations it must
decrease the rate of solicitations exponentially to avoid flooding the
network until it reaches a maximum interval between solicitations
(typically one minute).
• After these steps of advertisements or solicitations the MN can now
receive a COA, either one for an FA or a co-located COA.
• The MN now knows its location i.e. home network or foreign network
Outcome
• To understand how a mobile node discovers
itself after moving.
Course Name: Mobile Computing
Semester-VI
Computer Engg.

Pinki Vishwakarma
Associate
Professor
Computer Engg. Department
Mobile Computing

Topics to be covered:
• Registration
⮚ Registration Request
⮚ Registration Reply
• Tunneling and Encapsulation
⮚ IP-in-IP encapsulation

Source of Reference:
• Jochen Schiller, “Mobile
Communications”,
Addison Wesley Second Edition.
Objectives
• To understand the mobile node
registration process in which a mobile
registers its care- of addresses with Home
Agent after agent discovery.
• To understand the techniques of Tunneling
and encapsulation.
IP Packet
Delivery

1. The Correspondent node (Sender) sends to the IP address of MN, HA


intercepts the packet
2. The HA tunnels the packet to COA by encapsulating it.
3. Then the FA forwards the packet to MN
4. In Reverse the sender (MN) sends to IP address of receiver (CN), FA is
the default router
Registratio
• After having n
received a COA, the MN has to
register with the HA.
• Registration can be done in
two different ways depending on the
location of the COA.

⮚COA is at the FA

⮚COA is co-located
Registration (COA is at the
FA) • If the COA is at the FA, registration is
done as
• The MN sends its registration request
containing the COA to the FA which is
forwarding the request to the HA.
• The HA now sets up a mobility binding
containing the mobile node’s home IP
address and the current COA.
• The mobility binding contains the
lifetime of the registration which is
negotiated during the registration
process.
• Registration expires automatically
after the lifetime and is deleted
• Therefore the MN should reregister
before expiration.
• After setting up the mobility binding,
Registration of a mobile node
via the FA the HA sends a reply message back to
the FA which forwards it to the MN.
Registration(COA is co-
located)
• If the COA is co-located,
registration is simple.
• The MN sends the
request directly to the HA
and vice versa.
• However, if the MN
received an agent
advertisement from the FA
Registration of a it should register via this FA
mobile node directly
with the HA
if the R bit is set in the
advertisement.
Registration
Request •

UDP packets are used for registration requests.
type is set to 1 for a registration request. With the
0 8 15 16 24 31 S bit an MN can specify if it wants the HA to retain
2 prior mobility bindings. This allows for
7 3 simultaneous bindings.
type 1 S B DMG r T x lifetime • Setting the B bit indicates that an MN also wants
to receive the broadcast packets which have
been received by the HA in the home network.
home address • If an MN uses a co-located COA, it also takes care
of the decapsulation at the tunnel endpoint. The
home agent
D bit indicates this behavior.
COA
• The bits M and G denote the use of minimal
encapsulation or generic routing
Identification
extensions ...
encapsulation.
• T indicates reverse tunneling, r and x are set to
zero.
• Lifetime denotes the validity of the registration in
seconds. Zero value indicates deregistration.
Registration request
• The home address is the fixed IP address of the
MN, home agent and COA represents the
tunnel endpoint.
• The 64 bit identification is generated by the MN
to identify a request and match it with
registration replies.
Registration
Reply • A registration reply, is a UDP
packet
• type field set to 3
• code indicating the result of the
registration request.
• The lifetime field indicates how
many seconds the registration
is valid if it was successful.
• Home address and home
agent are the addresses of the MN
Registration
and the HA, respectively.
Reply • The 64-bit identification is used to
match registration requests with
replies.
• The extensions contain parameters
for authentication.
Registration
Reply

Registration reply
codes
Tunneling and
Encapsulation
• A tunnel is a virtual pipe established for data packets
between a tunnel entry and a tunnel endpoint.
• Tunneling is sending a packet through a tunnel, is achieved
by using encapsulation.
• Encapsulation is the mechanism of taking a packet
consisting of packet header and data and putting it into the
data part of a new packet.
• The reverse operation, taking a packet out of the data part
of another packet, is called decapsulation.
• Encapsulation
⮚ IP-in-IP encapsulation
⮚ Minimal encapsulation
⮚ Generic routing encapsulation
Tunneling and
• TheEncapsulation
HA takes the original packet with the MN as desti-
nation, puts it into the data part of a new packet and sets
the new IP header in such a way that the packet is routed to
the COA. The new header is also called the outer header for
obvious reasons.
• There is an inner header which can be identical to the
original header.

IP encapsulation
IP-in-IP encapsulation
• The version field ver is 4 for IPV4
• The internet header length (IHL)
denotes the length of the outer
header in 32 bit words.
• DS(TOS) is just copied from the inner
header.

The length field covers the complete
encapsulated packet. The fields up to
TTL have no special meaning for
mobile IP. TTL must be high enough
so the packet can reach the tunnel
endpoint.
• The IP-in-IP, is the type of the
protocol used in the IP payload. This
field is set to 4, the protocol type for
IPv4.
• IP checksum is calculated as usual.
IP-in-IP encapsulation • The tunnel entry as source address
(the IP address of the HA) and the
tunnel exit point as destination
address (the COA).
Outcome
• To get to know how a mobile node
performs registration process after moving.
• To get to know the tunneling concept and
different encapsulation techniques used for
Mobile IP.
Course Name: Mobile Computing
Semester-VI Computer Engg.

Pinki Vishwakarma
Associate
Professor
Computer Engg. Department
Mobile Communication
and Computing
Topics to be covered:
• Tunneling and Encapsulation
⮚ Minimal encapsulation
⮚ Generic routing encapsulation
• Reverse Tunneling

Source of Reference:
• Jochen Schiller, “Mobile
Communications”,
Addison Wesley Second Edition.
Objective
• To understand the techniques of
Tunneling and encapsulation.
IP Packet
Delivery

1. The Correspondent node (Sender) sends to the IP address of MN, HA


intercepts the packet
2. The HA tunnels the packet to COA by encapsulating it.
3. Then the FA forwards the packet to MN
4. In Reverse the sender (MN) sends to IP address of receiver (CN), FA is
the default router
Minimal encapsulation
• The version field ver is 4 for IPV4
• The internet header length (IHL)
denotes the length of the outer
header in 32 bit words.
• DS(TOS) is just copied from the
inner header.
• The length field covers the
complete encapsulated packet. The
fields up to TTL have no special
meaning for mobile IP. TTL must be
high enough so the packet can
reach the tunnel endpoint.
• The value 55 is for the minimal
encapsulation protocol.
• If the S bit is set, the original sender
address of the CN is included as
Minimal encapsulation omitting the source is quite often
not an option.
• No field for fragmentation offset is
left in the inner header and minimal
encapsulation does not work with
already fragmented packets.
Generic routing
• encapsulation
Generic routing encapsulation (GRE) allows the
encapsulation of packets of one protocol suite into the
payload portion of a packet of another protocol suite.
• The packet of one protocol suite with the original packet
header and data is taken and a new GRE header is
prepended. Together this forms the new data part of the new
packet. Finally, the header of the second protocol suite is put
in front.

Generic routing
encapsulation
Generic routing
encapsulation • The outer header is the standard IP
header with HA as source address
and COA as destination address.
• The protocol type used in this outer IP
header is 47 for GRE.
• The other fields of the outer packet,
such as TTL and TOS, may be copied
from the original IP header. However,
the TTL must be decremented by 1
when the packet is decapsulated to
prevent indefinite forwarding.
• The GRE header starts with several
flags:
• The C bit indicates checksum field, If C
Generic routing encapsulation
is set, the checksum field contains a
valid IP checksum of the GRE header
and the payload.
Generic routing
encapsulation• The R bit indicates if the offset and
routing fields are present and
contain valid information.
• The offset represents the offset in
bytes for the first source routing entry.
• The routing field, if present, has a
variable length and contains fields
for source routing.
• If the C bit is set, the offset field is
also present and, vice versa, if the R
bit is set, the checksum field must be
present.
• The checksum field is valid only if C is
Generic routing encapsulation set, and the offset field is valid only if R
is set respectively.
Generic routing
encapsulation • A key field is used for
authentication. If this field is
present, the K bit is set. However,
the authentication algorithms are
not further specified by GRE.
• The sequence number bit S
indicates if the sequence
number field is present, if the s bit
is set, strict source routing is
used. Sequence numbers may be
used by a decapsulator to restore
packet order.

Generic routing encapsulation


Generic routing
encapsulation • The recursion control field (rec.)
dis tinguishes GRE from IP-in-IP and
minimal encapsulation.
• This field represents a counter that
shows the number of allowed
recursive encapsulations.
• As soon as a packet arrives at an
encapsulator it checks whether this
field equals zero.
• If the field is not zero,
additional encapsulation is allowed
the packet is encapsulated and the
field decremented by one.
• Otherwise the packet will most likely
be discarded.
Generic routing encapsulation • The default value of this field should
be 0, thus allowing only one level of
encapsulation.
Generic routing
encapsulation
• The following reserved fields
must be zero and are ignored
on reception.
• The version field contains 0
for the GRE version.
• The following 2 byte protocol
field represents the protocol of the
packet following the GRE header.

Generic routing encapsulation


Reverse tunneling

• The MN can directly send its packets to the CN as in any


other standard IP situation.
• The destination address in the packets is that of CN.
Outcome
• To get to know the tunneling concept and
different encapsulation techniques used
for Mobile IP.

You might also like