
My network worked great. That is, until a link went down.
Each router could talk to its neighbors. But they couldn’t talk through their neighbors. I needed a way for each router to learn how to reach other destinations. And I had an algorithm in mind.
Each router sends “hello” packets to each other to discover neighbors. Then the routers run Dijkstra’s shortest-path first algorithm to create routes to each known connection1. Using OSPF (Open Shortest Path First), my nodes learned to talk with a single setup.
But there was a problem — each one had two IP addresses. I connected each router with a point-to-point link, and the ends of those links have IPs. I started to lose track of these addresses; I wrote them on sticky notes. The solution was something I’d already studied but hadn’t needed.
Loopbacks. They give a single IP identity and hide the plumbing. In Networking 101, I learned they sent packets to themselves. But back then, I wasn’t the plumber. Now I trace packets through routing tables and interfaces — and experience the issue loopbacks solve. After all, Experience beats observation.
I wanted to simulate a realistic environment, and added three linux hosts to the network. One per router. I tried to ping the connected routers; no dice. This was feeling familiar. But I learned my lesson: L3 doesn’t come pre-packaged. Each host needed an IP and network interface. Despite that setup, I still couldn’t ping other routers.
Because the hosts couldn’t forward packets. They would see my 10.0.0.x loopback addresses and question: what do I do with this? Apparently loopbacks are not a silver wrench. As far as the host knows, the single link it knows about is a point-to-point 192.168.0.x/31. They needed routes. “Packets addressed to 10.0.0.x get sent via 192.168.0.x”2. The next hop is all they need.
Now that I can plumb a triangle, it’s time to build something that can grow.
Footnotes
-
https://www.geeksforgeeks.org/dsa/dijkstras-shortest-path-algorithm-greedy-algo-7/ ↩
-
And over some device like
eth1↩