From Nsnam
Jump to: navigation, search

Main Page - Current Development - Developer FAQ - Tools - Related Projects - Project Ideas - Summer Projects

Installation - Troubleshooting - User FAQ - HOWTOs - Samples - Models - Education - Contributed Code - Papers

Return to GSoC 2017 Accepted Projects page.

Project overview

  • Project name: Mobile IPv6 Implementation with LTE support
  • Abstract: The goal of the project is to implement a novel MIPv6 simulation model which can be integrated into ns-3. The project idea aims at testing the code in different network scenarios, containing different link layer technologies such as Wi-Fi, WiMAX and LTE. The current implementation of LTE does not have support of IPv6 in ns-3. So, the idea of testing MIPv6 code into LTE would follow IPv6 support implementation in LTE first and then the MIPv6 support. Thus, implementation of MIPv6 in ns-3 as the base mobility management solution and providing LTE support within it could help the current network researchers working on ns-3.
  • Documentation:
  1. Detail Description about the Implementation:
  2. Phase1 Documentation:
  3. Phase2 Documentation:

Technical Approach

  1. Code refactoring: reorganizing internetstack, helper and header components of the MIPv6 module through modifying the internal functions, attributes and the callback variables.
  2. Code analysis: both static and dynamic analysis could be performed. The waf tool for code run, PyViz for visualization and tcpdump for pcap tracing could be used.
  3. Functional tests: The functional test would be performed in three phase: handoff performance testing, data packet transmission testing and both. Use cases like multiple mobile nodes, multiple correspondent node, different mobility model for the mobile node as well as heterogeneous link layer technologies (Wi-Fi and WiMAX) could be used.
  4. The code will be sent for the code review to the ns-3 team.
  • Second, IPV6 support for LTE would be ensured as LTE currently, only supports IPv4. The changes would possibly be done within the LTE module files (both .cc and .h) like point-topoint-helper, emu-epc-helper, lte-ue-net-device, epc-sgw-pgw-application, epc-enb-application, lte-enb-net-device etc. Then, the code analysis will be performed as done previously for MIPv6 code. The functional tests would follow bidirectional IPv6 packet transmission between remote host and the UE. The modification/rewriting code will create a patch that could enable IPv6 forwarding in the LTE data plane, enabling the UE to receive and use a /64 prefix, as stated in the standard. It is worth noticing that IP packets are tunnelled in the `core' network (i.e., all the EPC part), and their actual IP address is not used for UE identification in the core. As a consequence, IPv6 use in the `core' network, using ULAs or link-local addresses, could be planned if the previous development is faster than foreseen. This modification could also be simpler than expected, as it is not important to keep a dual stack communication in the core network, and using only IPv6 brings some direct benefits (like simplifying the use of multiple EPCs in a single script).
  • Third, To ensure the code quality, the following testing approach could be used: Test MIPv6 handoff performance with the mixed link layer technologies (combination of Wi-Fi, WiMAX and LTE) case, multiple mobile node case, and multiple correspondent node case.

Deliverables and Plan


-a basic MIPv6 module, aligned with RFC 6275 following ns-3 coding styles;

-a reviewed patch, fixing the IPv6 support issue in LTE;

-proper documentation and tests for the above-mentioned components.


May 4 – May 29 (Before the official coding time):

-Familiarize myself completely with MIPv6, LTE (the IPv4 part), and the respective interactions.

-Study of the customized files of ns-3 lte and internet modules

-Familiarize myself with the ns-3 coding styles

During this period I will remain in constant touch with my mentor and the ns-3 community. I will remain active on IRC and Mailing lists to discuss and finalize on the modifications (if any) that needs to be on existing models and design of new module (if needed to fit cleanly with ns-3)

Thus with the help of my mentor I will become absolutely clear about my future goals, the final MIPv6 implementation that need to be done as well as the approach that I will follow to support IPv6 in lte model.

May 30 – June 26 (Official coding period starts):

-Refactor previous MIPv6 headers to RFC compliance header files

-Refactor all the classes to implement the corresponding header file functions

-Compiling and running the module and fixes the errors/bugs

-Testing the overall working of the newly implemented MIPv6 module in various testing scenarios. The testing will be done with the systems having Wi-Fi and WiMAX link layer technology

-Sending the code for code review to the ns-3 team

After this stage, the standard ns-3 code revision can be started for the MIPv6 code part. Any change requested by the reviewers will be carried out in parallel with the following activities.

June 27 – July 24:

-Define new or, modify existing header files and cc files in LTE module in such a way that LTE module remains backward compatible with IPv4

-Compiling and running the module and fixes the errors/bugs

-Testing the overall working of the LTE module

-Sending the code for code review to the ns-3 team

This will help in testing of the LTE module with IPv6 support for possible merge into the project main tree.

July 25 – August 21:

-Making further changes in the LTE module to support MIPv6 into it. Changes may be required in the other modules of ns-3 also.

-Testing the overall working in the testing scenarios having the combination of Wi-Fi and LTE

-Most of the time will be consumed for rigorous testing and bug fixes.

-Sending the code for code review to the ns-3 team

-Documentation updates.

Weekly Reports

May 30 - June 6

1. Restructuring the MIPv6 code.

2. Testing the code in the multiple Mobile Node case

3. Changing the Home Agent functionality a little bit

4. Arise Tunnel Implementation Issue [how mobile node would use its home address for all of its data communication]

June 7 - June 13

1. Resolved the issue of home address assignment to mobile node for all of its data communication. So, I have made some tricky callbacks in the L4 protocol a little bit. Now, traffic can be directed in both direction i.e. Mobile node to a web server and a web server to a mobile node

2. Also delete a lot of unnecessary files as well as lines in the code.

3. Tests have been done changing the location of different mobility entities. Almost all are successful. Those are included in "" in scratch of

June 14 - June 20

1. Done more tests

2. Add some more features such as defending home address and performing NS handling at HA as described in RFC 6275

3. Find an issue on RFC 6275 i.e. how to defend the mobile node's home address by home agent when it returns to its home network. Try to do something on the basis of ns-3 ipv6 implementation to resolve the issue.

June 21 - June 27

1. Documentation on how my implementation differs from RFC 6275 as well as

2. Resolve the above issue

3. Sending the code for review.

June 28 - July 04

1. Starting LTE IPv6 implementation part: understanding the end-to-end IPv4 part between UE and remote host, decoding it and discuss with my mentor for changing

2. Start writing code, at least one class modification

3. Test the change whether it is right.

July 05 - July 11

1. Complete the modification in the lte module classes and also develop a small IPv6 dealing program to test

2. An issue arise i.e. Address Collision occurs at file: file=../src/internet/model/, line=484". I am trying to resolve it.

3. Runs the previous IPv4 sample programs, which runs fine.

July 12 - July 18

1. Resolve the IPv6 address collision issue in the LTE IPv6 support part.

2. I face another issue on handling multicast packets between UE sets and pgw i.e. those multicast packets are not passed between them as in the middle there is an enb.

3. Add the Sphinx documentation in the mipv6 module.

4. The Attributes and TraceSources are uploaded in mipv6 git.

July 19 - July 25

1. Making some examples for the main mipv6 repo.

2. Add two tests in the main mipv6 repo.

3. mipv6 doc file further update.

4. Add and change tracesources and some functionalities in mipv6 model.

July 26 - August 1

Finalize the MIPv6 code for review. I have added two nice tests replacing the previous tests, further update the mipv6 doc, trace sources, attributes, examples. The codes are documented highly. Now the /doc/models/build/html dir contains the model documentation and the /doc/html creates doxygen for the mipv6 module.

August 2 - August 15

1. Sent the MIPv6 code for review.

2. Solved LTE IPv6 packet sending issues.

3. Complete LTE IPv6 part, i.e. IPv6 packets are received and sent correctly.

4. Discuss with my mentor (Tommaso) elaborately about the next steps such that this implementation could be rebased in the main ns-3 dev quickly.

August 16 - August 22

1. Update the LTE UE and PGW address assignment process in such a way that all IP addresses assigned by an EPC are derived from a base prefix (8 for IPv4 and 32 for IPv6) and each EPC holds a unique 16 bit IPv4 and 48 bit IPv6 subnet prefix to assign addresses to PGW and UEs. This address assignment process is made by keeping in mind the issues stated in and!topic/ns-3-users/Tc3IKky1OKo. So, now address duplication would not happen in case of more than one EPC as well as any time we could assign addresses without initializing the address helper. Also, user is given the flexibility to reassign the base 8 or, 32 bit address prefix at any time.

2. The LTE module is updated by IPv6 tests, documentation and examples. So, now the sample program is running and users can use them.

August 23 - August 29

1. Submit the Google Work Product.

2. Send the LTE Code for review.

3. Try to resolve the reviewer's comment.

Final Report for Google

It has been an outstanding experience for me, spending this summer for GSoC project. I gave my full effort to make a very successful GSoC project and so, involved myself almost entirely. The huge interest from the current ns-3 users about my project speeds up the work process, which I have enjoyed most. I have learned a lot of things during this summer. Working for a community like ns-3 polishes my coding networking and communication skills a lot.

This final report contains all the links to all the works done over the summer. There have been almost 11,000 lines with 126 commits contributed in my github repo this summer.

Work Product Link

This is the complete work product link with full ns-3.25 software:

My contribution:

As I have extended one of my project work (Mobile IPv6) in GSoC, I have divided my contribution into two parts:

The full contribution for this project is in the following link.

Contribution during GSoC time period is in the following link (the last 126 commits by me).

Installation and Running the Work Product

1. Depending on your OS, install the ns-3 Prerequisites from this link:

2. Download the code from this repository: (It is full) or, (It requires other ns-3 components to be installed separately to add some extra features e.g. Visualizer) and extract it.

3. Make sure that you have installed all the perquisites to install ns-3.25.

4. Run the following commands in your cmd prompt to install it:

  $ cd The_Project_Folder

  $ cd ns-3.25
  $ ./waf -d debug --enable-examples --enable-tests configure
  $ ./waf

5. Running MIPv6 sample

Hold on the same directory (i.e. /ns-3.25). There are three samples for running MIPv6:, and You could simply run one of the sample just by typing the following:

  $ ./waf --run mipv6-multiple --vis

This will open a visualizer to see the output and the packet transmission in the background cmd prompt.

6. Running LTE IPv6 sample

Hold on the same directory (i.e. /ns-3.25). There are three samples for running LTE IPv6:, and You could simply run one of the sample just by typing the following:

  $ ./waf --run lena-ipv6-ue-ue --vis

This will open a visualizer to see the output and the packet transmission in the background cmd prompt.

Note: If you have not downloaded from the first link, do not use --vis option at the time of running samples.


Either, you follow the prepared documentation,

For MIPv6,


For LTE IPv6,


or, you could follow the manual for Creating Documentation here: I have added the appropriate documentations within the code of the above repo of my implementation.

Work Flow

The following link will describe the weekly update of this project.

The flow of commits in the code could be found in the following link.

Other Issues Resolved

I have resolved several other issues in ns-3 during this period as a part of my main implementation. Briefly, these are as follows.

1. Lack of IPv6 support for WiMAX module.

2. Duplicate IPv4 address collision problem in LTE module (!topic/ns-3-users/Tc3IKky1OKo).

Future Enhancement for this Project

1. Creating some LTE samples which can run multiple LTE networks in single user's simulation script. It requires cooperation with the existing LTE maintainers in ns-3.

2. Add more options for mobility management. The actual code always switches to the "newest" network. More sophisticated approaches can be tested, like QoS measures and make-before-break.

3. Above all, the beauty of this project is that it is the implementation of the base IP mobility management protocol (MIPv6) in ns-3. The ns-3 users now can easily extend this feature to implement other such protocols, such as NEMO (RFC 3963), PMIPv6 (RFC 5213) etc. and also some upcoming schemes in 5G.