‚ < ‚ Free Open Study ‚ > ‚ |
RIP follows certain rules when it sends and receives updates. This section covers the rules for sending and receiving updates. RIP Rules for Sending UpdatesWhen RIP sends an update, it performs several checks. In Figure 2-3, two routers are running RIP together. Router 1 is connected to two majornets, 131.108.0.0/16 and 137.99.0.0/16. Figure 2-3. Example of RIP Behavior The majornet 131.108.0.0 is further divided into two subnets: 131.108.5.0/24 and 131.108.2.0/24, which is actually connected to Router 2. Before Router 1 sends a RIP update to Router 2, it performs the check as shown in Figure 2-4. Figure 2-4. Flowchart That Explains RIP Rules When Sending Updates When RIP sends the update, it checks to see whether the advertised network or subnet is on the same major network as the interface that is sourcing the RIP packet. If the advertised network or subnet is on a different major network from the interface sourcing the RIP packet, the net-work is autosummarized. In other words, RIP sends only the majornet information in its routing update. For example, in Figure 2-3, when Router 1 sends the RIP update to Router 2, it auto-summarizes the subnet 137.99.88.0 into 137.99.0.0. If the advertised network or subnet is on the same major network as the router's interface sourcing the RIP packet, RIP determines whether the advertised subnet has the same mask as the interface that is sourcing the RIP update. If it has the same mask, RIP advertises that network; otherwise , RIP drops that network. RIP Rules for Receiving UpdatesWhen the receiving side gets an update from RIP, the update can contain either a subnet number, a host address, a network number, or all 0s (indicating the default route):
Figure 2-5 illustrates the checks performed by RIP on the receiving side. Figure 2-5. Flowchart That Explains RIP Rules When Receiving Updates When RIP receives the update, it determines whether the subnet received in the update belongs to the same major network as the receiving interface. If so, Router 2 applies the mask of the receiving interface. If the host bits are set in the host portion of the RIP update, the receiving router applies the host mask. If that subnet belongs to a different major network, RIP checks whether any subnets of this major network already exist in the routing table and determines whether they are known from interfaces other than the one that received the update. Note that the network in this update should be a major network. If the answer is "yes," Router 2 ignores the update. If the answer is "no," Router 2 applies a classful mask. If the update came across an unnumbered link, it might contain subnet information (bits in the subnet portion of the network address are set). Router 2 then applies a host mask. If the update carries subnet broadcast ‚ for example, 131.108.5.127/25 or Class D or E ‚ the RIP update must be ignored. Example of Sending UpdatesThis section shows an example explaining RIP behavior when it sends an update. In Figure 2-6, two routers are running RIP. The link between Router 1 and Router 2 is in 131.108.0.0. The Ethernet interface on Router 1 is in 131.108.0.0 as well. Router 1 is also connected to another major network, which is 137.99.0.0. Figure 2-6. An Example of RIP Behavior When Sending and Receiving Updates In Figure 2-6, when Router 1 sends an update to Router 2, it performs these checks:
This process results in Router 1 including 131.108.5.0 and 137.99.0.0 in its update to Router 2. You can see this in the output displayed using the debug ip rip command on Router 1, as demonstrated in Example 2-1. Example 2-1 debug ip rip Command Output Reveals RIP Update Information Sent Router1# debug ip rip RIP: sending v1 update to 255.255.255.255 via Serial0 (131.108.2.2) subnet 131.108.5.0, metric 1 network 137.99.0.0, metric 1 Example of Receiving UpdatesExample 2-2 provides output from the debug ip rip command to display the routing update received on Router 2 from Router 1. Example 2-2 debug ip rip Command Output Reveals RIP Update Information Received Router2# debug ip rip RIP: received v1 update from 131.108.2.2 on Serial0 131.108.5.0 in 1 hops 137.99.0.0 in 1 hops Router 2 in Figure 2-6 performs the following checks to determine what mask to apply on a received network:
This process results in the networks and masks in Router 2's routing table, displayed using the show ip route command (see Example 2-3). Example 2-3 show ip route Command Output Reveals the Networks and Masks in Router 2's Routing Table Router2# show ip route R 137.99.0.0/16 [120/1] via 131.108.2.2, 00:00:07, Serial0 131.108.0.0/24 is subnetted, 3 subnets R 131.108.5.0 [120/1] via 131.108.2.2, 00:00:08, Serial0 C 131.108.2.0 is directly connected, Serial0 C 131.108.3.0 is directly connected, Ethernet0 |
‚ < ‚ Free Open Study ‚ > ‚ |