Difference between revisions of "GSOC2022PerfectArp"

From Nsnam
Jump to: navigation, search
(create GSOC 2022 perfect ARP page)
 
(Weekly Reports)
(20 intermediate revisions by the same user not shown)
Line 9: Line 9:
 
* '''Mentors:''' Tommaso Pecorella, Ameya Deshpande, Manoj Kumar Rana  
 
* '''Mentors:''' Tommaso Pecorella, Ameya Deshpande, Manoj Kumar Rana  
 
* '''Google page:''' https://summerofcode.withgoogle.com/programs/2022/projects/DdUT09pZ
 
* '''Google page:''' https://summerofcode.withgoogle.com/programs/2022/projects/DdUT09pZ
* '''Project Goals:'''  
+
* '''Project Goals:''' The project aims to implement a “Perfect” version of ARP and NDP which produce caches that contain all needed IP address–MAC address mapping. ARP and NDP are sometimes intrusive in high level testing, it will introduce unexpected noise to the simulation (unwanted delays, packet drops, etc.). Perfect ARP/NDP can ensure every ARP/NDP look-up hits the cache so that no ARP messages or Neighbor discovery messages will be generated.
* '''Repository:'''  
+
* '''Repository:''' https://gitlab.com/ZhiHengD/ns-3-dev
* '''About Me:'''  
+
* '''About Me:''' I’m a first-year computer science graduate student from University of Southern California, US. I got my bachelor’s degree in computer science from University of Wisconsin- Madison, US. I began my graduate study in August 2021. I’m interested in computer networks and have good code experience in C and C++, I also did projects with Python, Java and JavaScript.
 +
* '''Project Plan:''' [https://docs.google.com/document/d/1IT4FAJAOd91bzogkWMh3ybJxaswk8jOOtv_w_lIXZjo/edit?usp=sharing link]
  
 
= Milestones and Deliverables =
 
= Milestones and Deliverables =
 +
'''Phase 1'''
 +
 +
Duration: Week 1 to Week 3
 +
 +
* Enable ipv4 static perfect Arp
 +
* Enable ipv6 static perfect Ndp
 +
* Prepare examples and tests for them
 +
 +
'''Phase 2'''
 +
 +
Duration: Week 4 to Week 7
 +
 +
* Enable ipv4 dynamical perfect Arp
 +
* Enable ipv6 dynamical perfect Ndp
 +
* Prepare examples and tests for them
 +
 +
'''Phase 3'''
 +
 +
Duration: Week 8 to Week 10
 +
 +
* Handle DAD
 +
* Enable ipv6 dynamical perfect Ndp
 +
* Update documentation
 +
 +
= Weekly Reports =
 +
 +
'''Week1'''
 +
 +
Duration: June 13 - June 19
 +
 +
* Start working on IPv4 perfect Arp.
 +
* Implemented an approach of creating subclass of ArpL3Protocol and ArpCache to dynamically create shared perfect cache.
 +
* Handled interface up/down event in that approach.
 +
* Tested IP neighbor cache flushing behavior about permanent entries in Linux.
 +
* Determined to implement perfect cache in a more concise way, which is create static perfect cache first after discussing with mentors.
 +
 +
'''Week2'''
 +
 +
Duration: June 20 - June 26
 +
 +
* Implemented static perfect cache on both IPv4 and IPv6 by new helper class.
 +
* Start adding tests and examples for perfect ARP/NDP
 +
* Tested DAD behavior when interface disable ARP/NDP  in Linux.
 +
 +
'''Week3'''
 +
 +
Duration: June 27 - July 3
 +
 +
* Implemented a subclass of Icmpv6L4Protocol for disable DAD
 +
* Create two example for perfect ARP/NDP, the one is simple csma, another is double wifi. Meet problems when creating global routing in double wifi example, fix by using nix-vector routing instead.
 +
* Draft Merge Request of static perfect cache with two examples. [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/1012# link]
 +
 +
'''Week4'''
 +
 +
Duration: July 4 - July 10
 +
 +
* Add test for perfect ARP/NDP.
 +
* Add user-level API for updating perfect cache after IP address changes.
 +
* Update MR based on comments. Fix mistakes and improve iteration logic. [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/1012# link]
 +
* Continue and refine the work on the dynamical perfect cache. Perfect cache updating will base on IP addresses added/removed instead of link up/down.
 +
 +
'''Week5'''
 +
 +
Duration: July 11 - July 17
 +
 +
* Update MR based on comments.
 +
* Implement dynamical perfect ARP on locally shared cache per network.
 +
* Add new perfect-arp-cache and perfect-arp-l3-protocol.
 +
* Add addAddressCallback and removeAddressCallback to make it perfect caches updated dynamically by IP addresses change.
 +
* Use a new data structure for perfect cache, ''std::unordered_map<Ipv4Address, Cache *, Ipv4AddressHash> PerfectCache;'' The key is network address and the value is the pointer to the unorder_map of normal caches. This new structure is used to differentiate a case that when an interface has multiple IP addresses from different networks, its perfect cache would contain entries from different networks.
 +
* Overwite ''ArpCache::Lookup'',''ArpCache::Add'',''ArpCache::Remove'' for the new data structure of perfect ARP cache.
 +
 +
'''Week6'''
 +
 +
Duration: July 18 - July 24
 +
 +
* Update the ARP/NDISC cache to make them ordered.
 +
* modify examples to show populate cache with interfaceContainer.
 +
* replace the word perfect from the code with more technical words.
 +
 +
'''Week7'''
 +
 +
Duration: July 25 - July 31
 +
 +
* Refactor Icmpv6L4Protocol::ReceiveLLA and Icmpv6L4Protocol::HandleNA, change the nesting of if statement to switch case of NUD_STATE
 +
* Add new NUD_STATE: STATIC_AUTOGENERATED. The entries generated by perfect ARP/NDP will use the new state
 +
* Update printout in test and example, because of the new state and ARP/NDISC cache reorder.

Revision as of 05:57, 2 August 2022

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

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

Back to GSoC 2022 projects

Project Overview

  • Project Name: Perfect ARP and NDP
  • Student: Zhiheng Dong
  • Mentors: Tommaso Pecorella, Ameya Deshpande, Manoj Kumar Rana
  • Google page: https://summerofcode.withgoogle.com/programs/2022/projects/DdUT09pZ
  • Project Goals: The project aims to implement a “Perfect” version of ARP and NDP which produce caches that contain all needed IP address–MAC address mapping. ARP and NDP are sometimes intrusive in high level testing, it will introduce unexpected noise to the simulation (unwanted delays, packet drops, etc.). Perfect ARP/NDP can ensure every ARP/NDP look-up hits the cache so that no ARP messages or Neighbor discovery messages will be generated.
  • Repository: https://gitlab.com/ZhiHengD/ns-3-dev
  • About Me: I’m a first-year computer science graduate student from University of Southern California, US. I got my bachelor’s degree in computer science from University of Wisconsin- Madison, US. I began my graduate study in August 2021. I’m interested in computer networks and have good code experience in C and C++, I also did projects with Python, Java and JavaScript.
  • Project Plan: link

Milestones and Deliverables

Phase 1

Duration: Week 1 to Week 3

  • Enable ipv4 static perfect Arp
  • Enable ipv6 static perfect Ndp
  • Prepare examples and tests for them

Phase 2

Duration: Week 4 to Week 7

  • Enable ipv4 dynamical perfect Arp
  • Enable ipv6 dynamical perfect Ndp
  • Prepare examples and tests for them

Phase 3

Duration: Week 8 to Week 10

  • Handle DAD
  • Enable ipv6 dynamical perfect Ndp
  • Update documentation

Weekly Reports

Week1

Duration: June 13 - June 19

  • Start working on IPv4 perfect Arp.
  • Implemented an approach of creating subclass of ArpL3Protocol and ArpCache to dynamically create shared perfect cache.
  • Handled interface up/down event in that approach.
  • Tested IP neighbor cache flushing behavior about permanent entries in Linux.
  • Determined to implement perfect cache in a more concise way, which is create static perfect cache first after discussing with mentors.

Week2

Duration: June 20 - June 26

  • Implemented static perfect cache on both IPv4 and IPv6 by new helper class.
  • Start adding tests and examples for perfect ARP/NDP
  • Tested DAD behavior when interface disable ARP/NDP in Linux.

Week3

Duration: June 27 - July 3

  • Implemented a subclass of Icmpv6L4Protocol for disable DAD
  • Create two example for perfect ARP/NDP, the one is simple csma, another is double wifi. Meet problems when creating global routing in double wifi example, fix by using nix-vector routing instead.
  • Draft Merge Request of static perfect cache with two examples. link

Week4

Duration: July 4 - July 10

  • Add test for perfect ARP/NDP.
  • Add user-level API for updating perfect cache after IP address changes.
  • Update MR based on comments. Fix mistakes and improve iteration logic. link
  • Continue and refine the work on the dynamical perfect cache. Perfect cache updating will base on IP addresses added/removed instead of link up/down.

Week5

Duration: July 11 - July 17

  • Update MR based on comments.
  • Implement dynamical perfect ARP on locally shared cache per network.
  • Add new perfect-arp-cache and perfect-arp-l3-protocol.
  • Add addAddressCallback and removeAddressCallback to make it perfect caches updated dynamically by IP addresses change.
  • Use a new data structure for perfect cache, std::unordered_map<Ipv4Address, Cache *, Ipv4AddressHash> PerfectCache; The key is network address and the value is the pointer to the unorder_map of normal caches. This new structure is used to differentiate a case that when an interface has multiple IP addresses from different networks, its perfect cache would contain entries from different networks.
  • Overwite ArpCache::Lookup,ArpCache::Add,ArpCache::Remove for the new data structure of perfect ARP cache.

Week6

Duration: July 18 - July 24

  • Update the ARP/NDISC cache to make them ordered.
  • modify examples to show populate cache with interfaceContainer.
  • replace the word perfect from the code with more technical words.

Week7

Duration: July 25 - July 31

  • Refactor Icmpv6L4Protocol::ReceiveLLA and Icmpv6L4Protocol::HandleNA, change the nesting of if statement to switch case of NUD_STATE
  • Add new NUD_STATE: STATIC_AUTOGENERATED. The entries generated by perfect ARP/NDP will use the new state
  • Update printout in test and example, because of the new state and ARP/NDISC cache reorder.