|
RIP Route Determination Algorithm and Metric
(Page 2 of 3)
RIP Route Determination and Information Propagation Example
Let's take a specific example to
help us understand better how routes are determined using RIP. Consider
a relatively simple internetwork with four individual networks, connected
as follows:
- Router A (RA) connects Network 1 (N1) to Network
2 (N2).
- Routers B (RB) and C (RC) connect Network 2 to
Network 3 (N3).
- Router D (RD) connects Network 3 to Network 4
(N4).
This example autonomous system is
illustrated in Figure 172.
Figure 172: Example RIP Autonomous System This is an example of a simple autonomous system that contains four physical networks and four routers.
|
Now, let's suppose that
we just turned on router RA. It sees that it is directly connected
to N1 and N2, so it will have an entry in its routing
table indicating that it can reach N1 at a cost of 1, which we
can represent as {N1,1}. Information about Network 1 will propagate
from Router RA across the internetwork in the following sequence
of steps (which you can observe graphically in Figure 173):
- Router A sends out an RIP message
containing the entry {N1,1} on each of the networks to which it is connected.
There are no other routers on N1, so nothing happens there. But
RB and RC are on N2 so they receive the information.
- RB and RC will look in
their routing tables to see if they already have entries for N1.
Assuming neither does, they will each create a routing table entry {N1,2}
for Router A. This means I can reach Network 1 at
a cost of 2 hops by sending to Router A.
- RB and RC will each send
their own routing tables out over the networks to which they are connected:
N2 and N3. This will contain the entry {N1,2}. RA
will receive that message on N2 but will ignore it, since it
knows it can reach N1 directly (cost of 1, which is less than
2). But Router D will receive the message on N3.
- RD will examine its routing
table, and seeing no entry for N1 will add the entry {N1,3} for
RB or RC. Of course, either one will work, so which is
chosen depends entirely on whether RD received information about
N1 first from RB or RC.
- RD will send the entry {N1,3}
on Network 4, but of course there are no other routers there
to hear it.
Figure 173: Propagation of Network Routing Information Using RIP This composite diagram illustrates the five steps in propagating route information about network N1 from RA to the rest of the autonomous system. In Step #1 the information is sent from RA to both of its connected networks. In Step #2 it reaches routers RB and RC, which then know they can reach N1 through RA at a cost of one additional hop. In Step #3 these two routers send this information on their networks, and in Step #4 it reaches RD. In Step #5 RD sends out the information, but no other routers are around to receive it.
|
RIP is designed so that a routing
entry is only replaced if information is received about a shorter
route; ties go to the incumbent, if you will. This means that once RD
creates an entry for N1 with a cost of 3 going through RB,
if it receives information that it can reach N1 at the same cost
of 3 through RC, it will ignore it. Similarly, if it gets RC's
info first, it will ignore the information from RB.
Naturally, this same propagation
scheme will occur for all the other networks as well; I have just shown
only how information about N1 moves from router to router. For
example, Router A will eventually install an entry for N4
saying that it is reachable at a cost of 3 going through either RB
or RC: this will be either {N4,RB,3} or {N4,RC,3}.
This propagation of network routing
information occurs on a regular basis, and also when the structure of
the network changes (due to either intentional changes in topography
or failure of links or routers). When this happens the change information
will move through the internetwork so that all routers are eventually
updated. For example, suppose a connection were added from Router C
to Network 1. If Router D previously had the entry {N1,RB,3},
it would eventually change this to {N1,RC,2}, since it could now reach
N1 more quickly by going through Router C.
If you find The TCP/IP Guide useful, please consider making a small Paypal donation to help the site, using one of the buttons below. You can also donate a custom amount using the far right button (not less than $1 please, or PayPal gets most/all of your money!) In lieu of a larger donation, you may wish to consider purchasing a download license of The TCP/IP Guide. Thanks for your support! |
|
|
Home -
Table Of Contents - Contact Us
The TCP/IP Guide (http://www.TCPIPGuide.com)
Version 3.0 - Version Date: September 20, 2005
© Copyright 2001-2005 Charles M. Kozierok. All Rights Reserved.
Not responsible for any loss resulting from the use of this site.
|