Routing decides which way a packet goes when its destination is on another network, and a routing protocol is the method by which routers learn those directions. A settlement network laid out as a chain or a star can run on routes written by hand, a network with a loop benefits from a dynamic protocol that finds a new path when a link fails, and the border protocol of the old internet has no use for a network that is not one of many independent operators. Choose the simplest method that still works when one link is cut.
Part of Networking
The ways routers learn where to send packets, and a guide to choosing between hand-written routes and automatic protocols for a settlement network.
Choose The Method By Whether A Failed Link Can Be Bypassed
Routing Basics explains what a router does: it looks up a packet’s destination in a table, uses the most specific matching entry, and falls back to a default route. It also gives the core contrast. Static routes are simple and predictable but do not adapt to a failure, and dynamic protocols recompute paths automatically. This article is the guide to which to use, and the five articles after it are the detail.
The deciding question is not the size of the network but its shape. If every site has exactly one path to every other, a failed link cuts those sites off whatever protocol you run, and hand-written routes are as good as any. If there is more than one path, only a dynamic protocol will switch over by itself.
| Layout | Paths between sites | Method | Article |
|---|---|---|---|
| One central site, others each linked to it (star) | one | Static, with a default route on each outer site | Static Routing |
| Sites in a line (chain) | one | Static | Static Routing |
| Sites in a loop (ring) or with spare links | two or more | Dynamic | Dynamic Routing |
| Many independent operators with their own policies | many | A border protocol | BGP Basics |
What You Need
- A map of the sites and the links between them, drawn on paper
- A router at each site — any Linux computer with forwarding turned on works (Routing Basics)
- The address plan with a separate subnet for every link (CIDR Notation)
- The reading of the routing table (Routing Tables)
Method: Pick And Check
Step 1: Draw the sites as dots and the links as lines Mark each link with its speed and how reliable it is.
Step 2: Look for loops Count the lines and the dots. Joining n sites into a tree takes n - 1 links; any link beyond that creates a loop (Network Topologies shows the mesh count n(n-1)/2 for the other extreme).
Step 3: Pick No loop: static. A loop you want to rely on: dynamic.
Step 4: Write the choice and the reason on the map.
Worked Example: Three Layouts
Four sites, one linked to the three others (a star). Links: 3, which is 4 - 1, so it is a tree and has no loops. Cut any link and one site is isolated, under any protocol. Use static routes: each outer site needs a default route toward the centre, and the centre needs one route per outer site.
Four sites in a line. Links: 3, a tree. Static routes work; the middle sites need a route in each direction.
Four sites in a ring. Links: 4, which is one more than 4 - 1 = 3, so there is exactly one loop. Cut any one link and the other three still connect all four sites. Static routes would keep sending traffic into the cut link until someone edited them. A dynamic protocol will notice and recompute. A ring is therefore the cheapest layout that earns a dynamic protocol.
Common Mistakes
- Running a complicated protocol on a tree — it adds nothing, because a cut link cannot be bypassed
- Building a ring and keeping static routes — the redundancy is wasted
- Copying the internet’s structure — the border protocol and autonomous system numbers exist for independent operators, which a settlement network is not (BGP Basics)
What’s Next
- Learn next: Static Routing — writing the routes by hand
- Combine with: Dynamic Routing — the automatic alternative once the network contains a loop