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 (

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

The command ip route configures a default route in the router. It's a static route with a special network number and mask, The router with address 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 to network

C is directly connected, Seriall is subnetted, 5 subnets C is directly connected, Ethernet©

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

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

C is directly connected, Serial0

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

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 via Serial0 ( subnet, metric 1 subnet, metric 3 subnet, metric 2 default, 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, 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 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