Chapter 5 R.I.P. (Routing Information Protocol)

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 21

Chapter 5 R.I.P.

(Routing Information Protocol )

Over the years, routing protocols have evolved to meet the increasing demands of complex networks. The first protocol
used was Routing Information Protocol (RIP). RIP still enjoys popularity because of its simplicity and widespread support.

Understanding RIP is important to your networking studies for two reasons. First, RIP is still in use today. You may
encounter a network implementation that is large enough to need a routing protocol, yet simple enough to use RIP
effectively. Second, familiarity with many of the fundamental concepts of RIP will help you to compare RIP with other
protocols. Understanding how RIP operates and its implementation will make learning other routing protocols easier.

This chapter covers the details of the first version of RIP, including a bit of history, RIPv1 characteristics, operation,
configuration, verification, and troubleshooting. Throughout the chapter, you can use Packet Tracer activities to practice
what you learn. At the end of the chapter, three hands-on labs and a Packet Tracer Skills Integration Challenge activity
are provided to help you integrate RIPv1 into your growing set of networking knowledge and skills.

RIP Historical Impact

RIP is the oldest of the distance vector routing protocols. Although RIP lacks the sophistication of more advanced routing
protocols, its simplicity and continued widespread use is a testament to its longevity. RIP is not a protocol "on the way
out." In fact, an IPv6 form of RIP called RIPng (next generation) is now available.

RIP evolved from an earlier protocol developed at Xerox, called Gateway Information Protocol (GWINFO). With the
development of Xerox Network System (XNS), GWINFO evolved into RIP. It later gained popularity because it was
implemented in the Berkeley Software Distribution (BSD) as a daemon named routed (pronounced "route-dee", not
"rout-ed"). Various other vendors made their own, slightly different implementations of RIP. Recognizing the need for
standardization of the protocol, Charles Hedrick wrote RFC 1058 in 1988, in which he documented the existing protocol
and specified some improvements. Since then, RIP has been improved with RIPv2 in 1994 and with RIPng in 1997.

Note: The first version of RIP is often called RIPv1 to distinguish it from RIPv2. However, both versions share many of the
same features. When discussing features common to both versions, we will refer to RIP. When discussing features
unique to each version, we will use RIPv1 and RIPv2. RIPv2 is discussed in a later chapter.

1
RIP Characteristics

As discussed in Chapter 4, "Distance Vector Routing Protocols," RIP has the following key characteristics:
 RIP is a distance vector routing protocol.
 RIP uses hop count as its only metric for path selection.
 Advertised routes with hop counts greater than 15 are unreachable.
 Messages are broadcast every 30 seconds.

The data portion of a RIP message is encapsulated into a UDP segment, with both source and destination port numbers
set to 520. The IP header and data link headers add broadcast destination addresses before the message is sent out to
all RIP configured interfaces.

RIP Message Format: RIP Header

Three fields are specified in the four byte header portion shown in orange in the figure. The Command field specifies the
message type, discussed in more detail in the next section. The Version field is set to 1 for RIP version 1. The third field is
labeled Must be zero. "Must be zero" fields provide room for future expansion of the protocol.

RIP Message Format: Route Entry

The route entry portion of the message includes three fields with content: Address family identifier (set to 2 for IP unless
a router is requesting a full routing table, in which case the field is set to zero), IP address, and Metric. This route entry
portion represents one destination route with its associated metric. One RIP update can contain up to 25 route entries.
The maximum datagram size is 504 bytes, not including the IP or UDP headers.

Why are there so many fields set to zero?

RIP was developed before IP and was used for other network protocols (like XNS). BSD also had its influence. Initially, the
extra space was added with the intention of supporting larger address spaces in the future. As we will see in Chapter 7,
RIPv2 has now used most of these empty fields

2
RIP Request/Response Process

RIP uses two message types specified in the Command field: Request message and Response message.
Each RIP-configured interface sends out a request message on startup, requesting that all RIP neighbors send their
complete routing tables. A response message is sent back by RIP-enabled neighbors. When the requesting router
receives the responses, it evaluates each route entry. If a route entry is new, the receiving router installs the route in the
routing table. If the route is already in the table, the existing entry is replaced if the new entry has a better hop count.
The startup router then sends a triggered update out all RIP-enabled interfaces containing its own routing table so that
RIP neighbors can be informed of any new routes

IP Address Classes and Classful Routing

You may recall from previous studies that IP addresses assigned to hosts were initially divided into 3 classes: class A,
class B, and class C. Each class was assigned a default subnet mask, as shown in the figure. Knowing the default subnet
mask for each class is important to understanding how RIP operates.

RIP is a classful routing protocol. As you may have realized from the previous message format discussion, RIPv1 does not
send subnet mask information in the update. Therefore, a router either uses the subnet mask configured on a local
interface, or applies the default subnet mask based on the address class. Due to this limitation, RIPv1 networks cannot
be discontiguous nor can they implement VLSM.

IP Addressing is discussed further in Chapter 6, "VLSM and CIDR." You can also visit the links below for a review of the
classes

3
Administrative Distance

As you know from Chapter 3, "Introduction to Dynamic Routing Protocols," administrative distance (AD) is the
trustworthiness (or preference) of the route source. RIP has a default administrative distance of 120. When compared to
other interior gateway protocols, RIP is the least-preferred routing protocol. IS-IS, OSPF, IGRP, and EIGRP all have lower
default AD values. Remember, you can check the administrative distance using the show ip route or show ip protocols
command.

Enabling RIP: Router RIP Command

To enable a dynamic routing protocol, enter the global configuration mode and use the router command. As shown in
the figure, if you type a space followed by a question mark, a list of all the available routing protocols supported by the
IOS displays.

To enter the router configuration mode for RIP, enter router rip at the global configuration prompt. Notice that the
prompt changes from a global configuration prompt to the following:

R1(config-router)#router RIP

This command does not directly start the RIP process. Instead, it provides access to configure routing protocol settings.
No routing updates are sent.

If you need to completely remove the RIP routing process from a device, negate the command with no router rip. This
command stops the RIP process and erases all existing RIP configurations.

Specifying Networks:

By entering the RIP router configuration mode, the router is instructed to run RIP. But the router still needs to know
which local interfaces it should use for communication with other routers, as well as which locally connected networks it
should advertise to those routers. To enable RIP routing for a network, use the network command in the router
configuration mode and enter the classful network address for each directly connected network.

Router(config-router)#network directly-connected-classful-network-address

The network command:


Enables RIP on all interfaces that belong to a specific network. Associated interfaces will now both send and receive RIP
updates.
Advertises the specified network in RIP routing updates sent to other routers every 30 seconds.

Note: If you enter a subnet address, the IOS automatically converts it to a classful network address. For example, if you
enter the command network 192.168.1.32, the router will convert it to network 192.168.1.0.

4
In the figure, the network command is configured on all three routers for the directly connected networks. Notice that
only classful networks were entered.

What happens if you enter a subnet address or interface IP address instead of the classful network address when using
the network command for RIP configurations?

R3(config)#router rip
R3(config-router)#network 192.168.4.0
R3(config-router)#network 192.168.5.1

In this example, we entered an interface IP address instead of the classful network address. Notice that the IOS does not
give an error message. Instead, the IOS corrects the input and enters the classful network address. This is proven with
the verification below.

R3#show running-config
!
router rip
network 192.168.4.0
network 192.168.5.0
!

Verifying RIP : Powerful Troubleshooting Commands

To verify and troubleshoot routing, first use show ip route and show ip protocols. If you cannot isolate the problem
using these two commands, then use debug ip rip to see exactly what is happening. These three commands are
discussed in a suggested order that you might use to verify and troubleshoot a routing protocol configuration.
Remember, before you configure any routing - whether static or dynamic - make sure all necessary interfaces are "up"
and "up" with the show ip interface brief command.

The show ip route command verifies that routes received by RIP neighbors are installed in a routing table. An R in the
output indicates RIP routes. Because this command displays the entire routing table, including directly connected and
static routes, it is normally the first command used to check for convergence. Routes may not immediately appear when
you execute the command because networks take some time to converge. However, once routing is correctly configured
on all routers, the show ip route command will reflect that each router has a full routing table, with a route to each
network in the topology.

As you can see in the figure, there are five networks in the topology. Each router lists five networks in the routing table;
therefore, we can say that all three routers are converged because each router has a route to every network shown in
the topology

5
Interpreting show ip route Output

Using the information in the figure, let's focus on one RIP route learned by R1 and interpret the output shown in the
routing table.

R 192.168.5.0/24 [120/2] via 192.168.2.2, 00:00:23, Serial0/0/0

The listing of routes with an R code is a quick way to verify that RIP is actually running on this router. If RIP is not at least
partially configured, you will not see any RIP routes.

Next, the remote network address and subnet mask are listed (192.168.5.0/24).

The AD value (120 for RIP) and the distance to the network (2 hops) is shown in brackets.

The next-hop IP address of the advertising router is listed (R2 at 192.168.2.2) and how many seconds have passed since
the last update (00:00:23, in this case).

Finally, the exit interface that this router will use for traffic destined for the remote network is listed (Serial 0/0/0).

Unnecessary RIP Updates Impact Network

As you saw in the previous example, R2 is sending updates out FastEthernet0/0 even though no RIP device exists on that
LAN. R2 has no way of knowing this and, as a result, sends an update every 30 seconds. Sending out unneeded updates
on a LAN impacts the network in three ways:

1. Bandwidth is wasted transporting unnecessary updates. Because RIP updates are broadcast, switches will forward the
updates out all ports.

2. All devices on the LAN must process the update up to the Transport layers, where the receiving device will discard the
update.

3. Advertising updates on a broadcast network is a security risk. RIP updates can be intercepted with packet sniffing
software. Routing updates can be modified and sent back to the router, corrupting the routing table with false metrics
that misdirect traffic.

6
Stopping Unnecessary RIP Updates

You might think you could stop the updates by removing the 192.168.3.0 network from the configuration using the no
network 192.168.3.0 command, but then R2 would not advertise this LAN as a route in updates sent to R1 and R3. The
correct solution is to use the passive-interface command, which prevents the transmission of routing updates through a
router interface but still allows that network to be advertised to other routers. Enter the passive-interface command in
router configuration mode.

Router(config-router)#passive-interface interface-type interface-number

This command stops routing updates out the specified interface. However, the network that the specified interface
belongs to will still be advertised in routing updates that are sent out other interfaces.

In the figure, R2 is first configured with the passive-interface command to prevent routing updates on FastEthernet0/0
because no RIP neighbors exist on the LAN. The show ip protocols command is then used to verify the passive interface.
Notice that the interface is no longer listed under Interface, but under a new section called Passive Interface(s). Also
notice that the network 192.168.3.0 is still listed under Routing for Networks, which means that this network is still
included as a route entry in RIP updates that are sent to R1 and R3.

All routing protocols support the passive-interface command. You will be expected to use the passive-interface
command when appropriate as part of your normal routing configuration.

7
Modified Topology Scenario B

To aid the discussion of automatic summarization, the RIP topology shown in the figure has been modified with the
following changes:
Three classful networks are used:
 172.30.0.0/16
 192.168.4.0/24
 192.168.5.0/24
The 172.30.0.0/16 network is subnetted into three subnets:
 172.30.1.0/24
 172.30.2.0/24
 172.30.3.0/24
The following devices are part of the 172.30.0.0/16 classful network address:
 All interfaces on R1
 S0/0/0 and Fa0/0 on R2
The 192.168.4.0/24 network is subnetted as a single subnet 192.168.4.8/30

Click R1, R2, and R3 to view the configuration details for each router.

Notice that the no shutdown and clock rate commands are not needed because these commands are still configured
from Scenario A. However, because new networks were added, the RIP routing process was completely removed with
the no router rip command before enabling it again.

In the output for R1, notice that both subnets were configured with the network command. This configuration is
technically incorrect since RIPv1 sends the classful network address in its updates and not the subnet. Therefore, the IOS
changed the configuration to reflect the correct, classful configuration, as can be seen with the show run output.

In the output for R2, notice that the subnet 192.168.4.8 was configured with the network command. Again, this
configuration is technically incorrect and the IOS changed it to 192.168.4.0 in the running configuration.

The routing configuration for R3 is correct. The running configuration matches what was entered in router configuration
mode.

Note: On assessment and certification exams, entering a subnet address instead of the classful network address in a
network command is considered an incorrect answer.
8
R1 R2 R3

5.4.2 Boundary Routers and Auto summarization

As you know, RIP is a classful routing protocol that automatically summarizes classful networks across major network
boundaries. In the figure, you can see that R2 has interfaces in more than one major classful network. This makes R2 a
boundary router in RIP. Serial 0/0/0 and FastEthernet 0/0 interfaces on R2 are both inside the 172.30.0.0 boundary. The
Serial 0/0/1 interface is inside the 192.168.4.0 boundary.

Because boundary routers summarize RIP subnets from one major network to the other, updates for the 172.30.1.0,
172.30.2.0 and 172.30.3.0 networks will automatically be summarized into 172.30.0.0 when sent out R2's Serial 0/0/1
interface. We will see in the next two sections how boundary routers perform this summarization.

5.4.3 Rules for Processing RIPv1 Updates

The following two rules govern RIPv1 updates:


If a routing update and the interface on which it is received belong to the same major network, the subnet mask of the
interface is applied to the network in the routing update.
If a routing update and the interface on which it is received belong to different major networks, the classful subnet mask
of the network is applied to the network in the routing update.

Example of RIPv1 Processing Updates

In the figure, R2 receives an update from R1 and enters the network in the routing table. How does R2 know that this
subnet has a /24 (255.255.255.0) subnet mask? It knows because:

9
R2 received this information on an interface that belongs to the same classful network (172.30.0.0) as that of the
incoming 172.30.1.0 update.
The IP address for which R2 received the "172.30.1.0 in 1 hops" message was on Serial 0/0/0 with an IP address of
172.30.2.2 and a subnet mask of 255.255.255.0 (/24).
R2 uses its own subnet mask on this interface and applies it to this and all other 172.30.0.0 subnets that it receives on
this interface - in this case, 172.30.1.0.
The 172.30.1.0 /24 subnet was added to the routing table.

Routers running RIPv1 are limited to using the same subnet mask for all subnets with the same classful network.

As you will learn in later chapters, classless routing protocols like RIPv2 allow the same major (classful) network to use
different subnet masks on different subnets, better known as Variable Length Subnet Masking (VLSM).

Using Debug to View Automatic Summarization

When sending an update, boundary router R2 will include the network address and associated metric. If the route entry
is for an update sent out a different major network, then the network address in the route entry is summarized to the
classful or major network address. This is exactly what R2 does for 192.168.4.0 and 192.168.5.0. It sends these classful
networks to R1.

R2 also has routes for the 172.30.1.0/24, 172.30.2.0/24 and 172.30.3.0/24 subnets. In R2's routing update to R3 on
Serial0/0/1, R2 only sends a summary of the classful network address of 172.30.0.0.

If the route entry is for an update sent within a major network, the subnet mask of the outbound interface is used to
determine the network address to advertise. R2 sends the 172.30.3.0 subnet to R1 using the subnet mask on Serial0/0/0
to determine the subnet address to advertise.

R1 receives the 172.30.3.0 update on Serial0/0/0 interface, which has an interface address of 172.30.2.1/24. Since the
routing update and interface both belong to the same major network, R1 applies its /24 mask to the 172.30.3.0 route.

Notice that R1 has three routes for the 172.30.0.0 major network, which has been subnetted to /24 or 255.255.255.0. R3
has only one route to the 172.30.0.0 network, and the network has not been subnetted. R3 has the major network in its
routing table. However, it would be a mistake to assume that R3 does not have full connectivity. R3 will send any
packets destined for the 172.30.1.0/24, 172.30.2.0/24, and 172.30.3.0/24 networks to R2 because all three of those
networks belong to 172.30.0.0/16 and are reachable through R2.

10
R2

R1

R3

Advantages of Automatic Summarization

As we saw with R2 in the previous figure, RIP automatically summarizes updates between classful networks. Because the
172.30.0.0 update is sent out an interface (Serial 0/0/1) on a different classful network (192.168.4.0), RIP sends out only
a single update for the entire classful network instead of one for each of the different subnets. This process is similar to
what we did when summarized several static routes into a single static route. Why is automatic summarization an
advantage?
Smaller routing updates sent and received, which uses less bandwidth for routing updates between R2 and R3.
R3 has a single route for the 172.30.0.0/16 network, regardless of how many subnets there are or how it is subnetted.
Using a single route results in a faster lookup process in the routing table for R3.

Disadvantage of Automatic Summarization

As you can see in the figure, the addressing scheme has been changed. This topology will be used to show a main
disadvantage with classful routing protocols like RIPv1 - their lack of support for discontiguous networks.

Classful routing protocols do not include the subnet mask in routing updates. Networks are automatically summarized
across major network boundaries since the receiving router in unable to determine the mask of the route. This is
because the receiving interface may have a different mask than the subnetted routes.

Notice that R1 and R3 both have subnets from the 172.30.0.0/16 major network, whereas R2 does not. Essentially, R1
and R3 are boundary routers for 172.30.0.0/16 because they are separated by another major network,
11
209.165.200.0/24. This separation creates a discontiguous network, as two groups of 172.30.0.0/24 subnets are
separated by at least one other major network. 172.30.0.0/16 is a discontiguous network.

Discontiguous Topologies do not Converge with RIPv1

The figure shows the RIP configuration for each router based on the topology. The RIPv1 configuration is correct, but it is
unable to determine all of the networks in this discontiguous topology. To understand why, remember that a router will
only advertise major network addresses out interfaces that do not belong to the advertised route. As a result, R1 will not
advertise 172.30.1.0 or 172.30.2.0 to R2 across the 209.165.200.0 network. R3 will not advertise 172.30.100.0 or
172.30.200.0 to R2 across the 209.165.200.0 network. Both routers R1 and R3, however, will advertise the 172.30.0.0
major network address.

What is the result? Without the inclusion of the subnet mask in the routing update, RIPv1 cannot advertise specific
routing information that will allow routers to correctly route for the 172.30.0.0/24 subnets.

Click the show ip route buttons for R1, R2, and R3 in the figure and review the routes.
R1 does not have any routes to the LANs attached to R3.
R3 does not have any routes to the LANs attached to R1.
R2 has two equal-cost paths to the 172.30.0.0 network.
R2 will load balance traffic destined for any subnet of 172.30.0.0. This means that R1 will get half of the traffic and R3
will get the other half of the traffic whether or not the destination of the traffic is for one of their LANs.

12
5.5.1 Adding Internet Access to the Topology

RIP was the first dynamic routing protocol and was used extensively in early implementations between customers and
ISPs, as well as between different ISPs. But in today's networks, customers do not necessarily have to exchange routing
updates with their ISP. Customer routers that connect to an ISP do not need a listing for every route on the Internet.
Instead, these routers have a default route that sends all traffic to the ISP router when the customer router does not
have a route to a destination. The ISP configures a static route pointing to the customer router for addresses inside the
customer's network. In scenario C, R3 is the service provider with access to the Internet, as signified by the cloud. R3 and
R2 do not exchange RIP updates. Instead, R2 uses a default route to reach the R3 LAN and all other destinations that are
not listed in its routing table. R3 uses a summary static route to reach the subnets 172.30.1.0, 172.30.2.0, and
172.30.3.0. To prepare the topology, we can leave the addressing in place; it is the same as was used in Scenario B.
However, we also need to complete the following steps:
Click RIP configuration in the figure.

1. Disable RIP routing for network 192.168.4.0 on R2.

2. Configure R2 with a static default route to send default traffic to R3.

3. Completely disable RIP routing on R3.

4. Configure R3 with a static route to the 172.30.0.0 subnets.

Scenario “C”

13
RIP
Configuration

R1

R2

R3

5.5.2 Propagating the default route in RipV1

To provide Internet connectivity to all other networks in the RIP routing domain, the default static route needs to be
advertised to all other routers that use the dynamic routing protocol. You could configure a static default route on R1

14
pointing to R2, but this technique is not scalable. With every router added to the RIP routing domain, you would have to
configure another static default route. Why not let the routing protocol do the work for you?

In many routing protocols, including RIP, you can use the default-information originate command in router configuration
mode to specify that this router is to originate default information, by propagating the static default route in RIP
updates. In the figure, R2 has been configured with the default-information originate command. Notice from the debug
ip rip output that it is now sending a "quad-zero" static default route to R1.

In the routing table for R1, you can see that there is a candidate default route, as denoted by the R* code. The static
default route on R2 has been propagated to R1 in a RIP update. R1 has connectivity to the LAN on R3 and any
destination on the Internet.

5.7.1 Summary

RIP (version 1) is a classful, distance vector routing protocol. RIPv1 was one of the first routing protocols developed for
routing IP packets. RIP uses hop count for its metric, with a metric of 16 hops meaning that route is unreachable. As a
result, RIP can only be used in networks where there are no more than fifteen routers between any two networks.

RIP messages are encapsulated in a UDP segment, with source and destination ports of 520. RIP routers send their
complete routing tables to their neighbors every 30 seconds except for those routes which are covered by the split
horizon rule.

RIP is enabled by using the router rip command at the global configuration prompt. The network command is used to
specify which interfaces on the router will be enabled for RIP along with the classful network address for each directly
connected network. The network command enables the interface to send and receive RIP updates and also advertises
that network in RIP updates to other routers.

The debug ip rip command can be used to view the RIP updates that are sent and received by the router. To prevent RIP
updates from being sent out an interface, such on a LAN where there are no other routers, the passive-interface
command is used.

RIP entries are displayed in the routing table with the source code of R and have an administrative distance of 120.
Default routes are propagated in RIP by configuring a static default route and using the default-information originate
command in RIP.

RIPv1 automatically summarizes subnets to their classful address when sending an update out an interface that is on a
different major network than the subnetted address of the route. Because RIPv1 is a classful routing protocol, the
subnet mask is not included in the routing update. When a router receives a RIPv1 routing update, RIP must determine
the subnet mask of that route. If the route belongs to the same major classful network as the update, RIPv1 applies the
subnet mask of the receiving interface. If the route belongs to a different major classful network than the receiving
interface, RIPv1 applies the default classful mask.
15
The show ip protocols command can be used to display information for any routing protocol enabled on the router.
Regarding RIP, this command displays timer information, status of automatic summarization, which networks are
enabled on this router for RIP, and other information.

Because RIPv1 is a classful routing protocol, it does not support discontiguous networks or VLSM. Both of these topics
are discussed in Chapter 7, "RIPv2".

Review

16
17
18
Chapter 5 Quiz

19
20
21

You might also like