Wolkite University Department of Information Technology
Wolkite University Department of Information Technology
7
• The mobile node uses two IP addresses: a fixed home address
and a care-of address that changes at each new point of
attachment.
• The protocol can use two different types of care-of addresses:
a “foreign agent care-of address” is an address of a foreign
agent with which the mobile node is registered, and a
“collocated care-of address” is an externally obtained local
address that the mobile node has associated with one of its
own network interfaces.
• To communicate with a remote host, a mobile host goes
through three phases: agent discovery, registration, and data
transfer.
8
Agent discovery
• The following steps provide a rough outline of operation of the mobile
IP protocol
1. Mobility agents (FA and HA) advertise (UDP by well known port)
their presence via agent advertisement messages.
2. A mobile node receives these agent advertisements and determines
whether it is on its home network or a foreign network.
3. When a mobile node detects that it has moved to a foreign network,
it obtains a care of address on the foreign network.
4. The mobile node then registers its new care-of address with its
home agent through exchange of a registration request and
registration reply message with it, possibly via a foreign agent. 9
Mobile IP registration
• Mobile IP registration is the method by which mobile nodes
request forwarding services when visiting a foreign network,
inform their home agent of their current care-of address, renew a
registration that is due to expire, and/or deregister when they
return home.
• Each "Mobility binding" has a negotiated lifetime limit To
continue, reregister within lifetime
• Deregistration with foreign agents is not required. Expires
automatically.
• Simultaneous registrations with more than one COA allowed.
10
Fig 6.2: Mobile IP Registration
• Goal: inform the home agent of current location of MN (COA-
FA or co-located COA)
• Uses UDP port 434
11
Binding
• When HA accepts the request it associates the home
address of the mobile node with the care-of address
• Association maintained until registration lifetime
expires
• Triplet that contains the home address, care-of
address and registration lifetimes is called a binding
• A registration request can be considered a binding
update sent by the mobile node
12
Packet forwarding from MN to CN
• Packets sourced by mobile nodes are routed to their
destination using standard IP routing mechanisms.
• The MN sends the packet as usual with its own fixed
IP address (its home address) as the source address
and CN͛ s address as destination (Fig 6.3).
• The router with the FA acts as default router and
forwards the packet in the same way as it would do
for any other node in the foreign network.
13
Fig 6.3: Data transfer from the mobile
14
Packet forwarding from CN to MN
• Mobile IP allows mobile nodes to communicate using only
their home address, regardless of their current location.
• Packets destined to a mobile node are routed first to their
home network—a network identified by the network prefix of
the mobile node’s (permanent) home address.
• CN sends an IP packet with MN as a destination address and
CN as a source address. The internet, not having information
on the current location of MN, routes the packet to the router
responsible for the home network of MN (Fig 6.4).
15
Fig 6.4: Data transfer to the mobile
16
Indirect routing
• The HA intercepts the packet, knowing that MN is currently
not in its home network. The packet is not forwarded into the
subnet as usual, but encapsulated and tunneled to the COA.
• A new header is put in front of the old IP header showing the
COA as new destination and HA as source of the encapsulated
packet.
• The foreign agent now decapsulates the packet, i.e., removes
the additional header, and forwards the original packet with
CN as source and MN as destination to the MN.
17
Encapsulation and Tunneling
• The default encapsulation mechanism that must be
supported by all mobility agents using mobile IP is IP-
within-IP (RFC 2003)
• Using IP-within-IP, home agent inserts a new IP header in
front of the IP header of any datagram
18
Encapsulation
• Destination address set to the care-of address
• Source address set to the home agent’s address
• Processes the packet again.
• Minimal encapsulation (optional): A new, condensed header is
inserted between the original IP header and the original IP
payload.
– The original IP header is then modified to form a new outer
IP header.
– avoids repetition of identical fields
• e.g. TTL, IHL, version, TOS
19
Direct Routing
• What if MN is in same subnetwork as the node to which it is
communicating and HA is on the other side of the world?
• Triangular routing overhead
– Crossing internet is more expensive than local delivery
– higher latency and network load
• Solution: Direct Routing
– CN learns the current location of MN
– Direct tunneling to this location
– Binding cache maintained at corresponding host
20
Binding update
• When a HA receives a packet to be tunneled to a MN, it sends
a binding update message to the CN
– When a HA receives a binding request message, it replies
with a binding update message
– CN caches binding and uses it for tunneling subsequent
packets
• CN that perceives a near-expiry can choose to ask for a
binding confirmation using the binding request message
• Home agent can choose to ask for an acknowledgement to
which a CN has to reply with a binding ack message
22
Binding Warning
• When a FA receives a tunneled message, but sees no
visitor entry for the mobile host, it generates a binding
warning message to the appropriate HA
• When a HA receives a warning, it issues an update
message to the corresponding host
• When a MN moves from one foreign agent to another …
• Packets in flight to the old FA are lost and are expected to
be recovered through higher layer protocols (e.g. TCP)
23
Fig 6.6: Change of FA
24
Smooth hand-off
• Make previous FA forward packets to the new FA
Send binding updates to the old FA through the new
FA
• Such forwarding will be done for a pre-specified
amount of time (registration lifetime)
• Update can also help old FA free any reserved
resources immediately
• Security in Mobile IP (Reading Assignment)
25
Reading assignment
• Adhoc Routing Protocols
26
End of the class!!
27