Originating a Default Route with RIP

It's easy, sometimes dangerously easy, to eonfigure a router to originate a default route with RIP. All you need to do is configure the default route itself and RIP takes care of the rest. RIP automatically advertises the default out all RIP-enabled interfaces. Consider the example network depicted in Figure 3-11.

Figure 3-11 RIP and Default Routing

Figure 3-11 RIP and Default Routing

Router F S1

Router F S1

Gateway of last resort (192.168.202.1)

In the network in Figure 3-11, Router F has a default route to the Internet. The following is Router F's RIP configuration:

router rip network 172.18.0.0

The command ip route 0.0.0.0 0.0.0.0 192.168.202.1 configures a default route in the router. It's a static route with a special network number 0.0.0.0 and mask 0.0.0.0, The router with address 192.168.202.1 is called the gateway of last resort. The gateway of last resort is the target for all destinations Router F does not know how to reach (to which it does not have a route).

To verify that the default route is in effect, issue the show ip route command and take note of the following lines highlighted in boldface:

RTF#sh ip ro

Codes: C • connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX • EIGRP external, 0 • 0SPF, IA - 0SPF inter area E1 OSPF external type 1, E2 OSPF external type 2, E - EGP i - IS-IS, L1 • IS-IS level-1, L2 - IS-IS level-2, * - candidate default

Gateway of last resort is 192.168.202.1 to network 0.0.0.0

C 192.168.202.0 is directly connected, Seriall

172.18.0.0 255.255.255.0 is subnetted, 5 subnets C 172.18.10.0 is directly connected, Ethernet©

R 172.18.11.0 [120/2] via 172.18.10.1, 00:00:17, Ethernet®

R 172.18.12.0 [120/1J via 172.18.10.1, 00:00:17, Ethernet©

C 172.18.44.0 is directly connected, Serial0

R 172.18.1.0 [120/3] via 172.18.44.1, 00:00:02, Serial© S* 0.0.0.0 0.0.0.0 [1/0] via 192.168.202.1

The line beginning with Gateway of last resort confirms that the default route is active and consistent with the configuration.

The last line of the output displays the default route itself. It has a code of S*, meaning it is a static route and a default route (the asterisk signifies a default route).

immediately after you configure the default route, RIP starts advertising it to other routers, as shown in the following debug output:

RTF#deb ip rip

RIP protocol debugging is on

RIP: sending update to 255.255.255.255 via Serial0 (172.18.44.2) subnet 172.18.10.0, metric 1 subnet 172.18.11.0, metric 3 subnet 172.18.12.0, metric 2 default 0.0.0.0, metric 1

The boldfacc line in the preceding output shows that Router F is advertising the default route out its SerialO interface. The result is a bit surprising because a default route is inherently a static route and you usually have to redistribute statics into RIP before they are advertised (see the use of the redistribute static command in "Resolving Issues with VLSM and Classful Routing Protocols" earlier in this chapter). But in this case, 0.0.0.0 is the exception: It is advertised by RIP even if redistribute static is missing.

NOTE Because originating a default route with RIP is so easy, care must be taken to avoid the accidental propagation of default routes. Someone might configure a default route on a RIP router, thinking that the default is for that router only and not realizing that his or her router is sending 0.0.0.0 to the rest of the network. When routers hear multiple default routes, the wrong one might be trusted (if it has a lower hop count). This leads to reachability problems.

Was this article helpful?

0 0

Post a comment