Configuring RIP
In keeping with the
simple nature of RIP, configuration is an easy task. There is one command to enable the RIP process and one command for each network on which RIP is to run. Beyond that, RIP has few configuration options.
Case Study: A Basic RIP Configuration
Only two steps are
necessary to configure RIP:
Enable RIP with the command
router rip.
Specify each major network on which to run RIP with the net
work command.
Figure 5.8 shows a four-router internetwork, with four major network numbers. Router Goober is attached to two subnets of network 172.17.0.0. The commands necessary to enable RIP are:
Goober(config)#router rip
Goober(config-router)#network 172.17.0.0
Similarly, Opie has two subnets of the same network and will configure with the following commands:
Opie(config)#router rip
Opie(config-router)#network 172.17.0.0
Executing any
router command puts the router into config-router mode, indicated in the prompt. The classful nature of RIP and the subnet hiding at network boundaries mean that no subnets can be specified with the network command—only major class A, B, or C network addresses. RIP can run on any interface configured with any address belonging to the network specified with the network command.
Barney is attached to two networks—10.0.0.0 and 192.168.83.0. Therefore, both networks must be specified:
Barney(config)#router rip Barney(config-router)#network 10.0.0.0 Barney(config-router)#network 192.168.83.0
Andy has one attachment to network 192.168.83.0, attachments to two subnets of 192.168.12.0, and attachments to two
subnets of 172.17.0.0. Its configuration is:
Andy(config)#router rip Andy(config-router)#network 172.17.0.0 Andy(config-router)#network 192.168.12.0 Andy(config-router)#network 192.168.83.0
In Figure 5.9, the command
debug ip rip has been turned on in Andy. Of particular interest here
is the subnet hiding that the router is performing. The subnets 192.168.12.64 and 192.168.12.192 are advertised between interfaces E0 and E2, which are both attached to network 192.168.12.0, but the network is summarized out E1, S0, and S1, which are all attached to different networks. Likewise, networks 192.168.83.0 and 172.17.0.0 are being summarized across classful boundaries. Notice also that Andy is receiving a summary route for network 10.0.0.0 from Barney. Finally, split horizon can be observed here. For example, the advertisement to
Barney out E1 contains no entries for 10.0.0.0 or 192.168.83.0.
Case Study: Passive Interfaces
The router Floyd has been added to the
internetwork (Figure 5.10). It is desired that no RIP advertisements be exchanged between Floyd and Andy. This is easy enough at Floyd:
Floyd(config)#router rip Floyd(config-router)#network 192.168.100.0
By not including a network statement for 192.168.12.0, Floyd will not advertise on interface 192.168.12.66. Andy, however, has two interfaces attached to 172.17.0.0; the
network must be included under RIP. To block RIP broadcasts on an interface connected to a subnet of a RIP-enabled network, add the
passive-interface command to the RIP process. Andy's RIP configuration is:
router rip
passive-interface Ethernet0
network 172.17.0.0
network 192.168.12.0
network 192.168.83.0
Passive-interface is not a RIP-specific command; it may be configured under any IP routing protocol. Using the passive-interface command essentially makes a router a silent host on the data link specified. Like other silent hosts, it still listens to RIP broadcasts on the link and updates its routing table accordingly. If the desired result is to prevent the router from learning
routes on the link, it must be achieved by more intricate control of routing updates, namely by filtering out updates. (Route filters are discussed in Chapter 13, "Route Filtering."
) Unlike a silent host, the router does not
respond to a RIP Request received on a passive interface.
Case Study: Configuring Unicast Updates
Next, router Bea is added to the
Ethernet link that Andy and Floyd share (Figure 5.11). The no-RIP policy between Andy and Floyd remains in place, but now Bea and Andy, as well as Bea and Floyd, must exchange RIP advertisements.
The configuration of Bea is straightforward:
router rip
network 192.168.12.0
network 192.168.200.0
The addition of a neighborcommand
under the RIP processes of Andy enables RIP to send a unicast advertisement to Bea's interface while the passive-interface command continues to prevent broadcast updates on the link.
Andy's configuration is:
router rip
passive-interface Ethernet0
network 172.17.0.0
network 192.168.12.0
network 192.168.83.0
neighbor 192.168.12.67
Because Floyd must now send advertisements to Bea, a network command for 192.168.12.0 must be added. Passive-interface is also added to prevent broadcast updates, and a neighbor command is added to enable unicast updates to Bea:
router rip
passive-interface Ethernet0
network 192.168.12.0
network 192.168.100.0
neighbor 192.168.12.67
By enabling debug ip rip events at Andy, the results of the new configuration can be verified (Figure 5.12). Andy is receiving updates from Bea, but not from Floyd, and is sending updates directly to Bea's interface, but is not broadcasting on its E0.
Although Bea has learned routes from both Andy and from Floyd, and is broadcasting updates on the shared Ethernet, the
policy still works because split horizon prevents Bea from advertising the routes learned from those two routers back onto the
Ethernet.
Case Study: Discontiguous Subnets
In Figure 5.13, another router has been
added to the internetwork with a subnet 10.33.32.0/20 on its E1 interface. The problem is that the other subnet of network 10.0.0.0, 10.33.0.0/20, is connected to Barney, and the only route between the subnets is via 192.168.83.0 and 192.168.12.0—two entirely different networks. As a result, network 10.0.0.0 is discontiguous.
Barney will consider itself a border
router between network 10.0.0.0 and network 192.168.83.0; likewise, Ernest_T will consider itself a border router between 10.0.0.0 and 192.168.12.0. Both will advertise a summary route of 10.0.0.0, and as a result Andy will be fooled into thinking that it has two equal-cost paths to the same network. Andy will load share on the links to Barney and Ernest_T, and there is now only a 50-50 chance that packets to network 10.0.0.0 will reach the correct subnet.
The solution is to configure subnets of network 10.0.0.0 on the same links on which 192.168.83.0/24 and 192.168.12.192/27 reside. This is accomplished with secondary IP
addresses, as follows:
Barney(config)#interface e0
Barney(config-if)#ip address 10.33.55.1 255.255.240.0 secondary
Andy(config)#interface e1
Andy(config-if)#ip address 10.33.55.2 255.255.240.0 secondary
Andy(config-if)#interface e2
Andy(config-if)#ip address 10.33.75.1 255.255.240.0 secondary
Andy(config-if)#router rip
Andy(config-router)#network 10.0.0.0
Ernest_T(config)#interface e0
Ernest_T(config-if)#ip address 10.33.75.2 255.255.240.0 secondary
Because Andy did not previously have
an interface on network 10.0.0.0, a network statement is added to the RIP process. The result of the configuration can be seen in Figure 5.14. The existing logical network structure remains in place, and a contiguous network 10.0.0.0 is "overlaid" onto it.
Figure 5.15 shows Ernest_T's routing table. Of interest here are the dual, equal-cost routes associated with next-hop addresses 10.33.75.1 and 192.168.12.195.
Note
The use of secondary addresses can contribute to congestion on the network.
Because the routing process sees secondary addresses as separate data links, caution should be used when planning them on RIP or IGRP networks. A separate RIP update will be broadcast on
each subnet; if the updates are large and the bandwidth of the physical link is limited (such as on serial links), the multiple updates can cause congestion. Multiple updates on a link configured with
secondary addresses can be observed in Figure 5.17, later in this chapter.
Type cautiously when entering secondary addresses. If you omit the keyword "secondary," the router will assume that the primary address is to be replaced with the new address. Making this mistake on an in-service interface will have serious
consequences.
Case Study: Manipulating RIP Metrics
A serial link, to be used as
a backup, has been added between Ernest_T and Barney (Figure 5.16). This link should be used only if the route via Andy fails. The problem is that the path
between Barney's 10.33.0.0 subnet and Ernest_T's 10.33.32.0 subnet is 1 hop via the serial link and 2 hops via the preferred Ethernet links. Under normal circumstances, RIP will choose the serial link.
The route metrics can be manipulated with the
offset-list command. The command specifies a number to add to the metric of a route entry and references an access list to
determine which route entries to modify. The syntax of the command is:
offset-list
{access-list-number | name} {in| out} offset [type number]
The configuration of Ernest_T is:
Ernest_T(config)#access-list 1 permit 10.33.0.0 0.0.0.0 Ernest_T(config)#router rip Ernest_T(config-router)#network 192.168.12.0 Ernest_T(config-router)#network 10.0.0.0 Ernest_T(config-router)#offset-list 1 in 2 Serial0
An access list is written
that identifies the route to subnet 10.33.0.0. The syntax of the offset list says, "Examine RIP advertisements incoming from interface S0. For route entries matching the addresses specified in access list 1, add 2 hops to the metric."
After Barney is configured, it will have the following entries in its configuration file:
router rip
offset-list 5 in 2 Serial0
network 10.0.0.0
network 192.168.83.0
!
access-list 5 permit 10.33.32.0 0.0.0.0
Figure 5.17 shows the results of the configuration at Ernest_T.
Alternatively, instead of having the two routers modify incoming routes, the routers can be configured to modify their outgoing routes. The following configurations will
have the same effects as the previous configurations:
ERNEST_T:
router rip
offset-list 3 out 2 Serial0
network 192.168.12.0
network 10.0.0.0
!
access-list 3 permit 10.33.32.0 0.0.0.0
BARNEY
:
router rip
offset-list 7 out 2 Serial0
network 10.0.0.0
network 192.168.83.0
!
access-list 7 permit 10.33.0.0 0.0.0.0
Several other options are
available for configuring
offset lists. If no interface is identified, the list will modify all incoming or outgoing updates specified by the access list on any interface. If no access list is called (by using a zero as the access list number), the offset list will modify all incoming or outgoing updates.
Note
Offset lists; incoming versus outgoing
Caution should be applied when choosing whether to use offset lists on incoming or outgoing advertisements. If more than two routers are attached to a broadcast network, consideration must be given to whether a single router should broadcast a modified advertisement to all its neighbors or whether a single router should modify a received advertisement.
Care must also be exercised when implementing offset lists on routes that are in use. When an offset list causes a next-hop router to advertise a higher metric than it had been advertising, the route will be marked unreachable until the holddown timer
expires.
|