Unit3
Unit3
Goals
Using a mobile computer in the Internet
Problem
Mobile Computer will not receive a single packet as soon as it leaves the home network.
In the Internet, A host sends an IP packet with the header containing a destination
address besides other fields. The destination address not only determines the receiver of
the packet, but also the physical subnet of the receiver.
Requirement
A host needs a so-called topologically correct address.
Quick 'Solutions'
New Address
One might think of a quick solution to this problem by assigning the computer a
new, topologically correct IP address as it moves to a new location.
Drawback
1. It is almost impossible to find a (mobile) host in the Internet which has just
changed its address. Especially the domain name system (DNS) needs some time
before it update its internal tables necessary for the mapping of a logical name to
an IP address.
2. A TCP connection cannot survive any address change. Breaking TCP connections
is not an option, using programs like telnet would be impossible.
3. The mobile node would have to notify all communication partners about the new
address.
Page 1
Unit – III
Requirements
Several requirements accompanied the development of the standard:
Transparency: Mobility should remain 'invisible' for many higher layer protocols arid
applications.
Besides maybe noticing a lower bandwidth and some interruption in service,
higher layers should continue to work even if the mobile computer changed its point of
attachment to the network.
The only effects of mobility should be a higher delay and lower bandwidth.
There are some applications for which it is better to be 'mobility aware'. Examples
are cost-based routing or video compression.
Scalability and efficiency: Introducing a new mechanism into the Internet must not
jeopardize the efficiency of the network.
Special care has to be taken considering the lower bandwidth of wireless links.
Page 2
Unit – III
(CN): At least one partner is needed for communication. In the following the CN
represents this partner for the MN. The CN can be a fixed or mobile node.
Home network: The home network is the subnet the MN belongs to with respect to its IP
address. Within the home network no mobile IP support is needed.
Foreign network: The foreign network is the current subnet the MN visits and which is
not the home network.
Foreign agent (FA): The FA can provide several-services to the MN during its visit in
the foreign network. FAs can also provide security services for they belong to the foreign
network as opposed to the MN only visiting.
Typically, an FA is implemented on a router for the subnet the MN attaches to.
Care-of address (COA): The COA defines the current location of the MN from an IP
point of view. All IP packets sent to the MN are delivered to the COA, not directly to the
IP address of the MN.
Foreign agent COA: The COA could be located at the FA, i.e., the COA is an IP address
of the FA. Thus the FA is the tunnel end-point and forwards packets to the MN. Many
MN using the FA can share this COA as common COA.
Home agent (HA): The HA provides several services for the MN and is located in the
home network. The HA maintains a location registry, i.e., it is informed of the MN's
location by the current COA.
Three alternatives for the implementation of an HA exist.
1. The HA can be implemented on a router that is responsible for the home network.
This is obviously the best position, because without optimizations to mobile IP,
all packets for the MN have to go through the router anyway.
2. If changing the router's software is not possible, the HA could also be
implemented on an arbitrary node in the subnet. A disadvantage of this solution is
the double crossing of the router by the packet if the MN is in a foreign network.
A packet for the MN comes in via the router; the HA sends it through the tunnel
which again crosses the router.
3. Finally, a home network is not necessary at all. The HA could be again on the
'router' but this time only acting as a manager for MNs belonging to a virtual
home network. All MNs are always in a foreign network with this solution.
Page 3
Unit – III
IP packet delivery
Page 4
Unit – III
Packet Format
The upper part represents the ICMP packet while the lower part is the extension needed
for mobility.
The TTL field of the IP packet is set to 1 for all advertisements to avoid forwarding of
advertisements.
The IP destination address according to standard router advertisements can be either set
to 224.0.0.1, which is the multicast address for all systems on a link or to the broadcast
address 255.255.255.255.
Basic ICMP
The type is set to 9
The code can be 0, if the agent also routes traffic from non-mobile nodes, or 16, if it does
not route anything other than mobile traffic.
The number of addresses advertised with this packet is in #addresses
The addresses themselves follow.
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.
Page 5
Unit – III
Length depends on the number of COAs provided with the message and equals 6 +
4*(number of addresses).
The total number of advertisements sent since initialization in the sequence number.
The registration lifetime the agent can specify the maximum lifetime in seconds a node
can request
Characteristics of an agent
The R bit (registration) shows, if a registration with this agent is required rather than
using a co-located COA at the MN.
If the agent is currently too busy to accept new 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.
Bits M and G specify the method of encapsulation used for the tunnel
M can specify minimal encapsulation
G specifies generic routing encapsulation.
The V bit specifies the use of header compression.
Page 6
Unit – III
Registration
After having received a COA, the MN has to register with the HA.
The main purpose of the registration is to inform the HA of the current location
for correct forwarding of packets.
COA is co-located
Page 7
Unit – III
UDP
For registration requests UDP packets are used.
The IP source address of the packet is set to the interface address of the MN, the
IP destination address is that of the FA or HA (depending on the location of the COA).
The UDP destination port is set to 434.
UDP is used for reasons of low overhead and better performance compared to
TCP in wireless environments.
Page 8
Unit – III
IP Encapsulation
Figure IP encapsulation
The HA takes the original packet with the MN as destination, 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.
An inner header which can be identical to the original header as this is the case for
IP-in-IP encapsulation, or the inner header can be computed during encapsulation.
IP-in-IP encapsulation
Mandatory for mobile IP is IP-in-IP encapsulation
Page 9
Unit – III
The Internet header length (IHL) denotes the length of the outer header in 32 bit words.
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 and are set according to
RFC 791.
TTL must be high enough so the packet can reach the tunnel endpoint.
IP checksum is calculated as usual.
The next fields are the tunnel entry as source address (the IP address of the HA) and the
tunnel exit point as destination address (the COA).
If no options follow the outer header, the inner header starts with the same fields
as just explained.
This header remains almost unchanged during encapsulation, thus showing the
original sender CN and the receiver MN of the packet.
The only change is TTL which is decremented by 1.
This means that the whole tunnel is considered a single hop from the original
packet's point of view.
Minimal encapsulation
Page 10
Unit – III
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.
The TTL must be decremented by 1 when the packet is decapsulated to prevent
indefinite forwarding.
The GRE header starts with several flags indicating if certain fields are present or
not.
Page 11
Unit – III
A minimal GRE header uses only 4 bytes; nevertheless, GRE is flexible enough to
include several mechanisms in its header.
The C bit indicates if the checksum field is present and contains valid
information.
If C is set, the checksum field contains a valid IP checksum of the GRE header
and the pay-load.
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.
GRE also offers a key field which may be used for authentication. If this field is
present, the K bit is set.
The sequence number bit S indicates if the sequence number field is present, if
the s bit is set, strict source routing is used.
The recursion control field (rec.) is an important field that additionally 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.
This mechanism prevents indefinite recursive encapsulation which might happen
with the other schemes if tunnels are set up improperly (e.g., several tunnels forming a
loop). The default value of this field should be 0, thus allowing only one level of
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.
Page 12
Unit – III
Optimizations
One way to optimize the route is to inform the CN of the current location of the
MN.
The CN can thus learn the location by caching it in a binding cache which is a
part of the local routing table for the CN. The appropriate entity to inform the CN of the
location is the HA.
The optimized mobile IP protocol needs four additional messages.
Binding request: Any node that wants to know the current location of an MN can send a
binding request to the HA. The HA can check if the MN has allowed dissemination of its
current location. If the HA is allowed to reveal the location it sends back a binding
update.
Binding update: This message informs about the current location of an MN. The
message contains the fixed IP address of the MN and the COA. The binding update can
request an acknowledgement.
Binding warning: Finally, if a node decapsulates a packet for an MN, but it is not the
current FA for this MN, this node sends a binding warning to the HA of the MN. The
warning contains the IP address of the MN and the address of the node that has tried to
send the packet to this MN. The HA should now send a binding update to the node that
obviously has a wrong COA for the MN.
Page 13
Unit – III
6. The MN might now change its location and register with a new foreign agent,
FAnew.
7. This registration is also forwarded to the HA to update its location database.
8. Furthermore, FAnew informs FAold about the new registration of MN. MN's
registration message contains the address of FAold for this purpose. Passing this
information is achieved via an update message, which is acknowledged by FAold.
9. In order to tell CN that it has a stale binding cache, FA old sends a warning message
to HA.
10. HA now sends an update to CN to inform it about the new location. CN
acknowledges this update.
11. Now CN can send its packets directly to FAne W, thus, again avoiding triangular
routing.
Page 14
Unit – III
Reverse tunnelling
Multicast: Reverse tunnels are needed for the MN to participate in a multicast group.
While the nodes in the home network might participate in a multicast group, an MN in a
foreign network cannot transmit multicast packets in a way that they emanate from its
home network without a reverse tunnel.
TTL: Consider an MN sending packets with a certain TTL while still in its home
network. The TTL might be low enough so that no packet is transmitted outside a certain
region. If the MN now moves to a foreign network, this TTL might be too low for the
packets to reach the same nodes as before. Mobile IP is not transparent anymore if a user
has to adjust TTL while moving.
Therefore, a reverse tunnel is needed representing only one hop, no matter
how many hops are really needed from the foreign to the home network.
All these considerations led to RFC 2344 defining reverse tunnelling as extension to
mobile IP.
This RFC; is backwards-compatible to mobile IP and defines topologically correct
reverse tunnelling as necessary to handle the problems described above.
Reverse tunnelling additionally raises several security issues which have been not
solved up to now.
Page 15
Unit – III
Page 16
DHCP is based on a client/server model.
DHCP clients send a request to a server (DHCPDISCOVER) to which the server
responds.
A client sends requests using MAC broadcasts.
A DHCP relay might be needed to forward requests to a DHCP server.
Client Initialization
Disadvantages
Security: There has been no authentication of DHCP messages specified. The mobile
node cannot trust a DHCP server, and the DHCP server cannot trust the mobile node.