GSOC2024DHCPv6FinalReport
Main Page - Roadmap - Summer Projects - Project Ideas - Developer FAQ - Tools - Related Projects
HOWTOs - Installation - Troubleshooting - User FAQ - Samples - Models - Education - Contributed Code - Papers
Back to GSoC 2024 projects
Project Overview
- Project Name: DHCPv6
- Student: Kavya Bhat
- Mentors: Tommaso Pecorella, Alberto Gallegos Ramonet, Manoj Kumar Rana
The project aimed to implement DHCP for IPv6 (DHCPv6), which is used in IPv6 networks for address configuration on devices, and allows for central management of the network. ns-3 has a model for DHCP but currently does not have an implementation for DHCPv6, and the goal is to add functionality for this protocol.
Merge Requests, Commits, and Project Details
We maintained a single branch for all the code written during GSoC, named gsoc-24.
Project Wiki Page: GSOC2024DHCPv6
Proposal: Link
No. | Name | Status | Commit |
---|---|---|---|
[1] | internet: Add TracedCallback to trace address state on DAD completion | Merged | [1] |
[2] | internet: Add TracedCallback to trace valid address after DAD | Merged | [2], [3] |
[3] | Draft: GSoC 24 - DHCPv6 | Draft | -- |
[4] | internet: Add TracedCallback for interface on receiving M flag in RA | Approved | -- |
Community Bonding Period
Plan and Action Points
During this phase, we ironed out details on how to begin working on the project:
- Scheduled a weekly video call for doubts and discussions.
- Discussed the ideas in the proposal to decide which features of DHCPv6 were to be supported, and which were not. We decided to focus on stateful DHCPv6 for the project.
- Began working on a design document for the project.
- Decided to maintain a single branch, gsoc-24, on the fork for all the work done over the entire timeline.
Prior to Coding Phase
- Read through RFC 8415 to understand the required and relevant sections to be implemented.
- Coded a rough outline of the DHCPv6 Header and Options classes to better understand edge cases and make design decisions of how to handle all the DHCPv6 options.
Phase 1
We decided to focus on implementing stateful DHCPv6 as part of the GSoC project.During this phase, we initially set up a minimal four message exchange between a DHCPv6 client and server, where only the mandatory options were included in the Solicit / Advertise / Request / Reply messages. Initially, the address lease information was stored as part of the DHCPv6 server. However, we refactored the server to use a newly created class called LeaseInfo to simplify address pool management.
During this period, we also wrote a new example for DHCPv6. Using this example, we validated that address offers, expiry and renew events occurred as expected.
RFC 8415 specifies that a client node should perform duplicate address detection before accepting any address that is offered to it. Towards this end, we added TracedCallbacks in the Icmpv6L4Protocol class, and used these callbacks in the DHCPv6 client.
Phase 2
During this phase, I worked on improving and refactoring the code as per suggestions from and discussions with the mentors. The main focus was on using a common Unique Identifier (DUID) across all interfaces on a single node, and correctly handling Identity Association Identifiers (IAIDs).
In this phase, we also worked on the documentation for DHCPv6. Along with this, we decided to start verifying if DHCPv6 would work on 6LoWPAN and LR-WPAN using an example.
MRs submitted: 1 (in review), 2
My Experience
Acknowledgements
I would like to thank all my mentors and the ns-3 developers for providing guidance and advice throughout the project, and for the opportunity to contribute to ns-3 through GSoC '24. While working on this project, I learned a lot of new concepts and got comfortable with navigating huge codebases. Weekly discussions with the mentors were insightful and exciting, and I'm glad to have extensively discussed multiple topics over the entire duration. I would also like to thank Google for this amazing opportunity.
Challenges Faced
While most of the project aspects were straightforward, there were a couple of sections where I got (highly) confused about how to design and implement features - namely, the DHCP Unique Identifier and the Identity Association Identifier classes. Reaching out to the mentors on Zulip allowed me to discuss, understand and progress easily whenever I was stuck. At times, I sought their help to debug programs and locate issues, and this helped a great deal as well.
Suggestions for Future Contributors
- The community bonding period is important!
- Reach out to your mentors early, to discuss the timeline and any prior obligations during the coding period.
- Try to identify areas that require more attention than you would expect. Also read through the codebase, and familiarize yourself with the relevant sections that you would use regularly.
- Seek help at the right time.
- If you've put in a lot of effort but are still stuck on an issue, don't delay asking for help. There's a high chance someone else has encountered the same issue and can help you solve it.
- Enjoy! Your GSoC project will help you learn and have a fun experience with the organization. While tasks may seem daunting at first, you'll have great mentors to guide you. Make the most out of the opportunity!