• No results found

Propagating Network Information with Distance Vector

In document Mastering Network Security pdf (Page 69-73)

Figure 3.7 shows how propagation of network information works with distance vector.

FIGURE 3.7 A routed network about to build its routing tables dynamically

Router A has just come online. Because the two attached networks (1 and 2) have been programmed into it, Router A immediately adds these to its routing table, assigning a hop value of 1 to each. The hop value is 1 instead of 0 because this information is relative to other attached networks, not the router. For example, if the router is advertising the route to Network 1 on Network 2, then one hop is appropriate because any system sending information to Network 1 from Network 2 would have to travel one hop (the router itself) to get there. A router usually does not advertise routing information about a directly attached network on that network itself. This means that the router should not

transmit a RIP frame stating, “I can reach Network 1 in one hop,” on Network 1 itself.

So Router A sends out two RIP packets, one on each network, to let any other devices know about the connectivity it can provide. When Routers B and C receive these packets, they reply with RIP packets of their own. Remember that the network was already up and running. This means that all the other routers have already had an opportunity to build their tables. From these other RIP packets, Router A collects the information shown in Table 3.2.

TABLE 3.2 Routing Information Received by Router A

Router Network Hops to Get There

B 3 1 B 5 2 B 6 3 B 4 4 B 2 5 C 4 1 C 6 2 C 5 3 C 3 4 C 1 5

build its own routing table. Routes that require a larger hop count are not discarded but are retained in case an alternate route is required due to link failure. These higher hop values are simply ignored during the normal operation of the router. Once complete, the table appears similar to Table 3.3.

TABLE 3.3 Router A’s Routing Table

Network Hops to Get There Next Router

1 1 Direct connection 2 1 Direct connection 3 2 B 4 2 C 5 3 B 6 3 C

Previous Table of Contents Next

Previous Table of Contents Next

All we’ve done is to pick the lowest hop count to each network and added 1 to the advertised value. Once the table is complete, Router A will again broadcast two RIP packets, incorporating this new information.

Now that Routers B and C have noted that there is a new router on the network, they must reevaluate their routing tables, as well. Before Router A came online, the table for Router B would have looked like Table 3.4.

TABLE 3.4 Router B’s Routing Table before Router A Initializes

Network Hops to Get There Next Router

1 1 Direct connection 2 5 D 3 1 Direct connection 4 4 D 5 2 D 6 3 D

Now that Router A is online, Router B will modify its table to reflect the information shown in Table 3.5.

TABLE 3.5 Router B’s Routing Table after Router A Initializes

Network Hops to Get There Next Router

1 1 Direct connection

2 2 A

3 1 Direct connection

4 3 A

5 2 D

It takes us two RIPs on the same logical network to get to this point. The first time Router A sent a RIP to Router B it only knew about Network 2, as you could see in Figure 3.7. It was not until Router C sent a reply RIP that Router A had to send a second RIP frame to Router B, incorporating this new

information. Table 3.5 would be broadcast with only the direct common network information being removed (Network 1). This means that while Router A was updating Router B with the information it had learned from Router C, it was also relaying back the route information originally sent to it by that router (Router B). The only difference is that Router A has increased by 1 each hop count reported by Router B. Because the hop value is larger than what Router B currently has in its tables, Router B would simply ignore this information.

Router C would go through a similar process, adjusting its table according to the information it receives from Router A. Again, it will require two RIP frames on the same logical network to yield a complete view of our entire network so that Router C can complete the changes to its tables.

These changes would then begin to propagate down through our network. Router B would update Router D when A first comes online and then again when it completes its tables. This activity would continue until all the routers have an accurate view of our new network layout. The amount of time that is required for all our routers to complete their table changes is known as the time to

convergence. The convergence time is important, because our routing table is in a state of flux until

all our routers become stabilized with their new tables.

Keep in mind that in a large network, convergence time can be quite long, as RIP updates are only sent once or twice per minute.

In document Mastering Network Security pdf (Page 69-73)