Figure 12-7 shows the
following steps:
|
1. |
R2 advertises the same routing information directly to
R1.
|
|
2. |
R2 advertises those same routes to R3, including subnet
150.1.3.0.
|
|
3. |
R3 turns around and advertises to R1 about those same
subnets.
|
|
4. |
R1, after learning of both ways to reach subnet 150.1.3.0,
has chosen the route through R2 and adds that route to the routing
table.
|
The key point to consider is why R1 chooses the route through
R2 instead of the route through R3. Notice that the routing updates in Figure 12-7 also include a metric for each
route or subnet listed in the update. With metrics, smaller is better. As shown
in Figure 12-7, R3 advertises a larger
metric (metric 2) than R2 does (metric 1), so R1 decides to use the route
through R2. Step 4 shows the resulting routing table entry.
Routing protocols allow routers to use the best route if it's
available, but they use less desirable routes if the best route is unavailable.
Imagine that someone turns off the power on the Ethernet switch between R1 and
R2. That route would then fail and be unavailable. The routing protocol on R1
would notice that the formerly best route had failed and remove the route from
the routing table. At the same time, R1's routing protocol would notice that
another route existsthe one through R3and add that route to the routing table.
This one example demonstrates a couple of important points
about routing protocols. First, they learn all the possible paths, or routes, to
reach each subnet. Second, they pick the best route currently available for each
subnet, reacting to changes in the network.