Skip to content

HasanYldz/ahc_dsr

Repository files navigation

DSR Algorithm on AHCv2

This is an implementation of DSR algorithm on AHCv2 as a network layer component. Main implementation is built upon DSR implementation from AHCv1 but there are some key changes:

  • It now works with generic link layer component but for its route maintenance feature it requires a link layer with broken link reporting.
  • Parts of algorithm that were implemented on node component got reimplemented on DSR component.
  • Added some optimizations to algorithm like intermediate hops caching routes.
  • Improved doc strings and types.
  • Simplifications to algorithm without losing features.

These are the some of the assumptions made in this implementation:

  • Every link is symmetric.
  • Link layer passes link error messages to network layer.

DSR (Dynamic Source Routing) Algorithm

DSR is a source routing algorithm that forms a route on-demand when a transmitting node requests one. However, it uses source routing (sender specifies the route) instead of relying on the routing table at each intermediate device.

When a node wants to transmit a package it first checks its route cache, if a route to destination node doesn't exist, it broadcasts a route request message to the network. Every node that sees that request for the first time rebroadcasts the message if it is not the destination. When destination receives the request it sends a route reply with the accumulated route back to the source. When source receives the route reply it caches that route and uses that route for subsequent transmissions.

There is also a route maintenance feature by sending back maintenance messages when a node fails to deliver.

Install AHCv2

pip3 install adhoccomputing

or alternatively,

git clone https://github.com/cengwins/ahc.git
cd ahc
pip3 install .

or alternatively, you can checkout this project and run make ahc.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages