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.

Figure 12-4. R2 Learning Routes from R1


Figure 12-4 shows several steps that occur over time, as follows:

1.

Each router knows only its respective, directly connected routes, as shown by the routing tables at the top of the figure.

2.

R1 sends a routing update to R2. The term routing update refers to a routing protocol message that contains information about IP networks and subnets. Notice that R1's routing update simply lists the subnets that R1 has in its routing table.

3.

Each router still has a routing table, with R2's now larger because it learned some routes. R2 decided to add a route to subnet 150.1.1.0the subnet where Hannah resides. R2 didn't have a route to subnet 150.1.1.0 before, but after R2 learned about that subnet from the routing update that R1 sent, it now knows about this additional subnet.

Also notice the outgoing interface and next-hop router of this new route. R2 uses its own Ethernet1 interface as the outgoing interface. From Figure 12-4, it seems that R2 would use its interface E1 to forward packets to subnet 150.1.1.0, but R2 chooses to put that interface into the route because that's the interface in which it received the routing update. R2 also puts R1's IP address of 150.1.2.1 as the next-hop router because that's the IP address of the router that sent the routing update. From Figure 12-4, you can see that this route's next-hop router IP address should be R1's IP address 150.1.2.1.

Notice that although R2 learned a route based on getting the routing update from R1, R1 has not learned any routes yet. Routers learn routes with routing protocols when they receive routing updates from other routers; routers send routing updates so that other routers can learn from them. For R1 to learn routes, another router needs to tell it about other routes with a routing update. Figure 12-5 shows R2 advertising its routes, with R1 learning a route to subnet 150.1.3.0.

Figure 12-5. R1 Learning by Listening for Routing Updates


Figure 12-5 shows several steps that occur over time, with R1 learning routes from R2, as follows:

1.

Each router knows only its respective, directly connected routes, as shown by the routing tables at the top of the figure.

2.

R2 sends a routing update to R1.

3.

R1's routing table now holds a route to subnet 150.1.3.0. Also, notice that R1's outgoing interface for that route is Ethernet2, which is the interface in which the routing update was received. The next-hop router is 150.1.2.2, which is R2's IP address.

Now both R1 and R2 have routes to all three subnets in the figure, with both routers learning the rest of the routes by receiving and processing incoming routing updates.




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