Skip to content

About

IPv4 routing simulation with Dijkstra shortest paths, binary prefix tries, longest-prefix matching, and network visualizations.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

9 Commits

Folders and files

Repository files navigation

Network Routing with Tries & Dijkstra

A routing simulation combining shortest paths with longest-prefix IP lookup.

Python · Tries · Dijkstra · NetworkX · Graphviz

Documentation checks

Overview · Getting started · Repository guide · Reproducibility

Network Routing with Tries & Dijkstra: project preview

Open full-size visual

Original five-router topology saved in Project.ipynb.

Project at a glance

Detail Project information
Focus IP routing with graph algorithms and prefix data structures
Start here Project.ipynb
Run mode Local Jupyter notebook; Graphviz executable for trie diagrams
Explore Routing tables, packet-forwarding paths, and topology/trie images

Overview

A notebook implementation of a small IP routing simulation. Dijkstra's algorithm computes routes through a weighted router graph, while binary prefix tries choose next hops by longest-prefix match during packet forwarding.

What this project includes

  • Router and network abstractions with a predefined five-router topology.
  • Heap-based Dijkstra shortest-path calculation.
  • IPv4 prefix insertion and longest-prefix lookup using binary tries.
  • Routing-table output, topology/trie visualizations, and forwarding with loop detection.

Workflow

Project workflow

Open full-size visual

Explanatory diagram. Detailed implementation and availability notes follow below.

Getting started

Install Python, Jupyter, and the visualization packages:

python -m pip install jupyter networkx matplotlib graphviz

Trie-image rendering also needs the Graphviz system executable dot on PATH; the Python graphviz package alone does not provide it.

Open Project.ipynb and run its code cell. The notebook defines the topology, computes tables, renders diagrams, and forwards a sample packet.

Required inputs and current constraints

The topology is defined in code and needs no external dataset. The sample 192.168.5.10 address belongs to RouterD's /24 network; an adjacent comment incorrectly labels it as RouterE. The implementation does not record a /0 default route as an initial match, so treat it as a limited demonstration rather than a complete router.

Repository guide

File Purpose
Project.ipynb Complete routing simulation and saved topology output.
A8(final).pdf Project documentation.
Digital_DSA.pdf Supporting write-up.
chdsa.docx Additional written material.

Results and project status

The topology preview above is an original saved notebook output. The simulation illustrates data structures and routing decisions; it is not a measured throughput or real-network deployment benchmark. Running the notebook also generates per-router trie PNGs.

Next steps

  • Correct the sample-destination comment and cover default-route behavior.
  • Add focused algorithm checks for overlapping prefixes, disconnected routers, and forwarding loops.

Documentation maintenance

Run documentation checks and maintain visuals

Local documentation links and image headers are checked on pull requests and relevant pushes by the documentation workflow. Run the same check locally:

python tools/check_docs.py

See the reproducibility guide for evidence, missing artifacts, and visual-source notes. The check validates documentation files; it does not train models or certify application behavior.

Explore related projects


More projects by kedharkota

About

IPv4 routing simulation with Dijkstra shortest paths, binary prefix tries, longest-prefix matching, and network visualizations.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages