You are on page 1of 4

Simulation of Wireless Networks with Mobile IP Using NS-2

Sajal Saha1, Subhasree Choudhury1, Asish K Mukhopadhyay2


1
Lecturer, Dept. of CA, Narula Institute of Technology, Kolkata 700109
2
Professor & Head, Dept. of ECE, Dr.B.C.Roy Engg. College, Durgapur-713206
e-mail:{ sajalkrsaha, subho_only,asishkm55}@rediffmail.com

Abstract: This paper presents the procedural steps for and tunnels it to the MN using encapsulation. From
creating network architecture for implementation of the next onwards packets are forwarded directly to the
Mobile IP protocol in NS2 simulator. Performance MN’s current CoA (Care Of Address).In this way
analysis with simulation using NS-2 shows that the MIPv6 avoids triangular routing problem using route
architecture and protocol keeps the delay and handoff optimization. Several mechanisms have been
within the accepted level without any call drop.
proposed to reduce the MIPv6 hand-off latency &
packet loss. Among them HMIPv6 (Hierarchical
Keywords: Mobile IP, Micromobility, Macromobility MobileIPv6) & Fast handover Mobile IPv6
, CoA (FHMIPv6), Simultaneous binding supports
macromobilty. All these work dealt with horizontal
1. Introduction hand-off. MosquitoNet is the first project to integrate
different wireless network technology to support
Now-a-days varieties of networks with varieties of vertical hand-off or Global mobility. HAWAII, DMA,
objectives are coexisting under the heterogeneous TR45.6 supports both Macromobilty and Global
environment. It is essential from the user point of mobility. MIP & MIPv6 supports global mobility
view to have ubiquitous mode of network only. A comparative study of these mobile IP
accessibility and globally transparent to all the users. protocols are discussed in detail in [1].
At the same time, new application demands more Mobile IP together with AAA combines personal and
bandwidth and lower costs. Therefore a lot of interest terminal mobility with roaming services. Personal
has been generated amongst the researcher during past mobility which enables the mobile user to reach
few years providing a transparent ubiquitous services and be reachable for incoming service
communication between dissimilar networks under requests by holding a stable identity. Terminal
heterogeneous environment. Our aim is to study such mobility on the other hand enables the mobile user to
efforts of integration using the network layer protocol move while maintaining the connections to services
Mobile IP. We use network simulator NS-2 for always connected, always reachable, utilizing an IETF
simulation. NS suffers from a number of standard based solution [2]. Mobile IP suffers from
incompatibilities and shortcomings, which limit its several well-known weaknesses that have led to the
usage and development of protocols for new scenarios definition of the macro/micro mobility architecture.
in wired, wireless, mobile and related to future Some of the weaknesses are latency and control
heterogeneous networks. Our aim in this paper is to traffic, address space and quality of service [3].
present a clear and generalized procedure for Three main issues that affect Mobile IP’s handoff
implementing mobile-IP protocol in NS-2.30. performance, mobility detection, re-registration,
Creation of a network topology and implementation interaction with higher layer protocols are discussed
of mobile IP protocol in this network architecture is in [4]. Two schemes are proposed first one using link
done here. Simulation results show that handoff identifier to accelerate the course of MH's mobility
latency is within the accepted level and this is the detection, and other schemes to improve TCP
main contribution of this paper. performance when MH acts as the TCP sender or
Rest of the paper is organized in the following: receiver respectively.
Chapter 2 highlights the background and related work.
Chapter 3 discusses the mobility support with Mobile
3. Mobility Support with Mobile IP
IP. Chapter 4 discusses implementation of Mobile IP
protocol in NS-2 simulator followed by the simulation
Mobile IP version 4 defined in RFC 3344 [5], or
results and their analysis. The conclusion is drawn in
MIPv4, is a routing protocol standardized by the IETF
Chapter 5.
(Internet Engineering Task Force) to offer Internet
mobility for the mobile hosts. It is applicable on top
1. Background and Related Work of current IPv4 wired network without any need of
modification in the existing fixed hosts and routers. A
When a MN leaves its home location HA keeps track mobile host needs to be allowed to change its access
of its current binding. MN sends BU (Binding location under mobile conditions while retaining its IP
Update) both to the HA and CN.A packet destined to addresses associated with the fixed network whereas,
MN comes to the HA first , HA intercepts the packet a higher layer connection does not allow changes of
either the source or destination IP address. Other home network is considered as foreign network. The
important issues such as security, Internet mobility HA is a router on an MN’s home network that
management and QoS are also of great concern in forwards datagram to the MN when it is away from
designing the protocol. The following are the salient home,
features of MIPv4 protocol:
1. A mobile host is able to continue its (Figure 1)
communications with other Internet nodes even
when its access network changes, retaining its
original IP address all through.

Figure 3: Tunneling (IP-within-IP)


and maintains current location information for the
MN. The FA is a router on an MN’s foreign network
that provides routing services to the registered MN. In
addition, either an HA or an FA can be called a
Figure 1: Mobile IP topology Mobility Agent (MA). MIPv4 combines three major
functions: agent discovery, registration, and tunneling.
2. It is fully compatible with IPv4 and both may co-
exist in a network without any conflict. 4. Mobile IP in NS-2
3. It introduces new and more security features to
the existing IPv4 since the physical link to which We describe the implementation of mobile IP in NS-2
a mobile host directly connects is wireless which in the following steps.
is more vulnerable to attacks (Figure 2) by STEP 1: Defining the type of each of the network
malicious hosts and interference. components like channel, radio propagation model,
4. Minimum numbers of signaling messages with interface queue, MAC layer, Link layer, antenna,
minimum packet size are sent over the wireless network interface, topological hierarchy and also the
links due to the substantially lower bandwidth of routing protocol, number of MNs, number of BS
wireless link compared to that of wired links. nodes, number of WNs, X and Y dimensions of the
5. It takes care of handoff latency during mobility so topography, and simulation time. TCP connection
that communication is not lost. and movement of the MN is also defined in the script.
STEP 2: Structuring the address type of ns instance
into hierarchical format. Set the number of domains,
number of clusters in each domain and number of
nodes in each cluster.
STEP 3: Set up ns trace and nam files for wireless-
MIPv4.
STEP 4: Creation of the WNs in domain 0 and 4
(although any domain can be chosen). For all nodes
created, hierarchical addresses of the nodes need to be
defined in the respective modules. Two WNs may
reside in the same domain (0.0.0) [8] [9] but in two
different clusters (0.0.0) & (0.1.0). The first domain
Figure 2: Mobile IP operation (domain 1) contains HA and 11 wireless MN. All MN
(Mobile node is connected to foreign network) reside in the same cluster. For the second wireless
MIPv4 introduces two new network nodes called domain (domain 2) a FA is configured with an
Home Agent (HA) and Foreign Agent (FA) address of 2.0.0. Invoke MIP by turning MOBILE IP
corresponding to home network and foreign network flag ON. Create MN by turning wired routing OFF.
respectively. It also defines two types of IP address Based on the registration/beacons exchanged between
called home address and care-of address (CoA). HA the MN and the base-station node (of the domain the
assigned to a Mobile Node (MN) remains unchanged MN is currently in), the base-station's address is
while the MN is moving. CoA refers to the IP address assigned as the MNs CoA. Thus in this simulation,
of the FA in the foreign network where the MN has address of HA is assigned initially as the CoA of MN.
moved. The network with a network prefix matching As MN moves in to the domain of FA, its CoA
that of an MN’s home address is considered as the changes to that of the FA.
MN’s home network, while any network other than its STEP 5: Initiation of the movement of the MN from
the home network towards the foreign network with Table 1: Some important parameters taken
pre-assigned mobility. Its return time to the home Queue Type DropTail/PriQueue
network is also assigned. Interface Queue length 2000
STEP 6: Creation of the link between WN and the BS MAC MAC/802_11
(acting as HA/FA). Setup TCP and FTP connections Adhoc Routing DSDV
between a WN (acting as CN) and the MN through TCP packet size in byte 200
the HA.
STEP 7: Specifying the stop time indicates the end 5. Conclusion
of simulation run. The MN is then reset to its initial
position. The main contribution of this work is to deduce and
provide a clear methodology for implementing Mobile
4.1 Simulation and Analysis of Mobile IP IP in NS-2.30 for terminal mobility with roaming
services. It has also analyzed the performance of the
For the simulation & analysis of Mobile IP protocol protocol with varying packet size and is found to be
[6] we use software simulation tool network simulator satisfactory to avoid call drop.
(NS2) distribution. As discussed in [7], the
incompatibilities and difficulties of NS-2 need to be References
resolved for analyzing new scenarios in wired,
wireless, mobile and heterogeneous networks. [1]Saha, D.; Mukherjee, A.; Misra, Iti.S.; Chakraborty, M.;
Subhash, N.”Mobility support in IP: a survey of related protocols”,
IEEE Network Magazine,Volume 18, Issue 6, pp. 34 – 40,Nov.-
Dec. 2004
[2] IP Unplugged “Mobility and Mobile IP, Introduction, white
paper” Doc Number: IPU -2001:0002, Rev C
[3] Pierre Reinbold and Olivier Bonaventure, “A comparison of IP
mobility protocols”.
[4] LIU Yu, YE Min-hua, ZHANG Hui-min, “The Handoff
Schemes in Mobile IP”, Vehicular Technology Conference, VTC
2003-Spring, p 485- 489 vol.1, 22-25 April 2003
[5] C. Perkins, “IP Encapsulation within IP”, RFC 2003, October
1996.
[6]Sibram Khara, ”The Methods to Implement a New Application
Protocol Using Network Simulator”, IEEE WieNSET-2007, 29-30
June, 2007.
[7] Nino Kubinidze, Ivan Ganchev, Mairtfn O'Droma, ”Network
Figure 4. Variation of Handoff latency with packet size Simulator NS2: Shortcomings Potential Development and
Enhancement Strategies”.
Scenario 1: Network topology as shown in Figure 5 [8]The VINT Project, "The NS Manual",
http://www.isi.edu/nsnam/NS/NS-documentation.html, 2007.
and figure 6, there are two HA and FA of the two [9]Marc Greis' Tutorial for the UCB/LBNL/VINT Network
networks represented in red and blue color. One CN, Simulator "ns", http://www.isi.edu/nsnam/ns/tutorial/
one WN and eleven MN (represented in black color)
reside in the network diagram.
Scenario 2: At time t1, MN6 is in the home network.
CN1 sends packets to HA .HA then delivers the
packets to MN6 as shown in Figure 6.
Scenario 3:At time t2 when MN6 moves towards the
foreign network, then FA of that network drops
packets as shown in Figure 7.
Scenario 4:At time t3 as shown Figure 8 when MN6
is in the foreign network, HA of the previous network
encapsulates packets and delivers to FA. FA sends the
packets to WN and WN delivers them to MN6.
The simulation scenario described above is done with
packet size 200 byte and other parameters specified in
Table 1. We measured the handoff latency with
varying packet size as shown in Figure 4. It is seen
that increase of handoff latency is not uniform.
Figure 5: Network Topology to implement mobile IP

Figure 6: MN6 receives packets from HA

Figure 7: MN6 moves towards foreign network and FA of foreign network drop packets

Figure 8: MN6 receives packets through foreign agent

You might also like