Difference between revisions of "GSOC2022PerfectArp"

From Nsnam
Jump to: navigation, search
(Weekly Reports)
(Weekly Reports)
Line 84: Line 84:
 
* Add new perfect-arp-cache and perfect-arp-l3-protocol.
 
* 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.
 
* 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 network.
+
* 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`
+
* Overwite ''ArpCache::Lookup'',''ArpCache::Add'',''ArpCache::Remove'' for the new data structure of perfect ARP cache.

Revision as of 20:56, 18 July 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 - July3

  • 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: July4 - July10

  • 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.

Week4

Duration: July11 - July17

  • 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.