Ewance
← All challenges Software Engineer

Implement a Distance-Vector Routing Algorithm

Duration
3 weeks
Level
Intermediate
Type
Code
Team
1 to 5 people

The situation

The course's current implementation is a Java applet from 2008 that nobody can run anymore — the new version is a free-standing Python tool with web-friendly visualizations.

Your task

Implement distance-vector routing with split-horizon + poisoned-reverse and demonstrate convergence on 3 topologies including a link-failure recovery case.

The brief

What you do

  1. Implement distance-vector routing in Python: each simulated router maintains a distance vector, exchanges vectors with neighbors every 1 second of simulated time, and updates its routing table on receipt.
  2. Include split-horizon and poisoned-reverse to mitigate count-to-infinity.
  3. Demonstrate on 3 topologies: 5-node mesh (initial convergence), 12-node hierarchical (convergence under random link cost changes), 28-node with a planned link failure at t=30s (recovery).
  4. Visualize routing-table evolution with a small animation.

You deliver

Source, the 3 topology configurations, animation outputs, and an 8-page teaching guide.

What you will practice

  • Implement Bellman-Ford-based distance-vector routing
  • Apply split-horizon and poisoned-reverse against count-to-infinity
  • Visualize distributed-algorithm state over time
  • Communicate networking concepts in teaching-grade material

A suggested way in

  1. Split-horizon alone fixes most count-to-infinity cases; poisoned-reverse is the belt-and-suspenders addition
  2. Simulated time is enough; don't use real wall-clock time or convergence varies with the host's CPU load
  3. Routing-table evolution animations are massively more useful as MP4 than as 30 frame-by-frame screenshots

Skills you will practice

Routing, Distance vector, Network simulation, Python, Data visualization, Algorithms

How it is assessed

  • Algorithm correctness30%

    Routing tables converge to optimal on all 3 topologies including post-failure.

  • Anti-loop strategies20%

    Split-horizon and poisoned-reverse implemented and demonstrably effective.

  • Visualization quality25%

    Animations make routing-table evolution obvious to a student.

  • Teaching-guide quality25%

    Guide is paired with the code at each algorithmic step.

Resources

  • PythonTool

    Teaching-friendly language with strong simulation ecosystem.

  • MatplotlibTool

    Generate routing-table evolution plots and animations.

  • pytestTool

    Validate convergence behavior with deterministic tests.

  • GitTool

    Version implementation alongside teaching guide.

  • NotionTool

    Author the 8-page teaching guide.

  • FigmaTool

    Diagram the 3 topologies for the guide.

Sample Ewance certificate of completion, verified by LearnCoin
Sample certificate
Your proof

Finish it. Earn this.

A verified certificate with your name. Anyone can check it.

Time to practice.

Solve this challenge
Related challenges

More like this.