These classnotes are depreciated. As of 2005, I no longer teach the classes. Notes will remain online for legacy purposes

UNIX02/Routed And Gated

Classnotes | UNIX02 | RecentChanges | Preferences

For very simple networks, creating static routings using what we have learned thus far will be sufficient. However, as you can well see from commands like route this becomes prohibitively difficult to maintain for moderate to large networks. Instead of having to explicity tell every computer on every network how to reach every other computer and network, it would be nice if the computers could just put their heads together and figure it all out. This is the job of the routing protocols and daemons that implement them.

Routing protocols have a major advantage over static routing systems in that they can react and adapt to changing network conditions. If a link goes down, the routing daemons can quickly discover and propagate alternative routes to the networks that link served (if any exist).

There are two types of routing protocols in common use today (these are discussed more fully in pages 309-310):

Distance-vector protocols
These are based on a very general idea, "If router X is five hops away from network Y, and I'm adjacent to router X, then I must be six hops away from network Y." This is called a "gossipy" protocol because you announce how far you think you are from the networks you know about. Then, if your neighbors don't know a better way to the network, they well assume you are the best gateway to that network.
Link-state protocols
The idea here is that "Router X is adjacent to router Y, and the link between them is up". They key advantage this approach has is that link-state protocols allow quickly repairing failed routing links between two hosts. The disadvantage is that the routing daemon must maintain a "map" of the network at each node which requires significantly more memory and CPU power. Additionally, link-state systems are often more difficult to setup due to extra complexity inherent in the protocol.

A full discussion of the protocols in each of these families can be found in pages 311 to 314 of the book.


The classic UNIX routing daemon (which is still the default choice on many Linux and UNIX systems today) is routed. routed only speaks one of the distance-vector protocols (RIP), and has quite limitted protocol diversity. routed adds its discovered routes to the kernel's routing table, and continuously scans the routes it knows of verifying they are still present.

routed is perhaps the easiest routing daemon to use, as it will generally discover routing information dynamically and does not require extra configuration.


gated is a more generic routing framework that allows many different routing protocols to be used simultaneously. It can share routes among several different protocols, which can make it a "one-stop shop" for routing information on inhomogenous networks.

By far the biggest problem with gated is that it is no longer an open-source project, and in order to use it today, you will have to purchase it. Since Linux has had some pretty intensive networking internals changes since the time this section of the book was written, I would personally recommend avoiding gated in spite of how glowing the book is on the subject.

Classnotes | UNIX02 | RecentChanges | Preferences
This page is read-only | View other revisions
Last edited August 15, 2003 10:28 pm (diff)
(C) Copyright 2003 Samuel Hart
Creative Commons License
This work is licensed under a Creative Commons License.