Picking the Best Road (Route)


I travel a lot to teach classes. Occasionally, I ask for directions about how to go somewhere when class is over, and invariably, I get three different answers from three different students. Everyone has a favorite shortcut or back road that will get you there a little quicker.

Routing protocols not only help routers learn routes, but they also help routers learn the best routes to a destination when there is more than one way to get there. Routers learn about all the possible routes and then have to decide which is best. For instance, in Figure 12-6, the internetwork has been expanded with three routers. R1 can still reach the subnet where the web server resides (150.1.3.0) through R2, but it can also reach that same subnet through R3.

Figure 12-6. Multiple Ways to Get to the Same Place


You can see by looking at the figure that R1 could send packets to subnet 150.1.3.0 through R2 or through R3. However, it seems like the direct route through R2 makes more sense. Routing protocols solve this problem by using an objective tool called a metric. A metric is a number that's associated with each route in a routing update. That number represents how good or how bad that route is. When a router receives multiple routing updates, it might learn of multiple ways to reach a network or subnet. By looking at the metrics associated with each route in each update, the router can pick the best route.

First, you need to see how R1 can learn about two routes to subnet 150.1.3.0. (Refer to Figure 12-7.) Then, it will be easier to see how the metric works.

Figure 12-7. Choices, Choices: Using the Metric to Pick the Best Route


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.




Computer Networking first-step
Computer Networking First-Step
ISBN: 1587201011
EAN: 2147483647
Year: 2004
Pages: 173
Authors: Wendell Odom

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net