Play n Tools

Free tools & games for everyone

Free · No sign-up · No accounts

Network simulator

Build a network of routers: see link-state routing tables, watch distance-vector routing count to infinity, and time packet, message and circuit switching.

How to use

  1. Type the links of your network, one per line: two router names and a cost (for example A B 4). Pick a router.
  2. Link state: the router knows the whole map and works out the cheapest path to every other router (Dijkstra). The red links are the paths it will use; the table is its routing table.
  3. Distance vector: routers only tell their neighbours their own tables, once per round. Press Run to see how many rounds the network needs, step through the rounds, then type a link to cut (such as C D) and run again, with and without split horizon.
  4. Packet timing: compare sending a message as packets (they follow each other down the line), as one whole message stored at every router, or over a circuit set up first.

Keyboard and touch

TabMove between tabs, boxes and buttons
EnterIn a box: work it out

Tips

  • On the chain A-B-C-D, cut C-D without split horizon: A, B and C keep offering each other old routes to D and the costs climb round by round until they hit 16, which means unreachable.
  • Split horizon (do not advertise a route back where it came from) fixes that chain, though loops of three or more routers can still count to infinity.
  • Smaller packets reach the end sooner because routers forward earlier, but every packet carries its own header.
  • Circuits win for long steady streams once set up; packets win for short bursts and share the links.

About this tool

Link-state routing (as in OSPF) gives every router the full map and runs Dijkstra's algorithm. Distance-vector routing (as in RIP) is the Bellman-Ford algorithm run by many routers at once; RIP treats 16 hops as infinity. Each round here, every router updates from its neighbours' tables of the round before, at the same time.

Timing assumes equal links: a packet of b bytes takes b x 8 / speed to send, then the delay to cross the link, and a router sends one packet at a time (store and forward). With n packets over k links the last arrives after the n packets on the first link, plus k - 1 more sends and k delays. Nothing on this page uses the network. Everything runs in your browser.

See you tomorrow!

A fresh daily puzzle every morning, and new tools added every month.

Browse every product