Dynamically Learning and Changing Routing Tables
In most cities, there are multiple ways to drive to some other
part of town. During rush hour, you might listen to the radio for traffic
updates or watch for electronic signs by the road that show the latest
information about road congestion. For instance, a reporter might be flying over
roadways in a helicopter or observing traffic through cameras installed beside
the major roadways. The reporter passes the information on to a radio announcer
or to someone who types in a warning to appear on an electronic sign by the
road. Then you might pass the sign or hear on the radio that the road you're on
is closed 8 miles ahead due to an accident, and you decide to try an alternate
road.
A similar (but not identical) concept happens in networking.
The most typical way a router learns all the rest of the routes in an
internetwork, beyond just its directly connected routes, is by using a routing
protocol. Routing protocols define messages
by which routers can exchange route information with other routers. A router can
tell other routers about the routes that it knows, and that same router can
listen for messages from neighboring routers about the routes that they know. If
all the routers participate, all routers should have routes for all subnets or
networks in an IP internetwork.
In Figure
12-2, R1 and R2 knew about their directly connected subnets, but no others.
The example shown in Figure 12-4 begins
like Figure 12-2, but in
this case, R1 uses a routing protocol to tell R2 about its routes.