VMware ESXi and vSphere Cluster Management

RIP Version 2 Configuration on Cisco Routers

Learn to configure RIPv2 on Cisco IOS routers, advertise IPv4 networks, verify RIP routes, and troubleshoot common small-network configuration errors.

Routing Information Protocol (RIP) is a dynamic, distance-vector routing protocol for IPv4. Routers running RIP exchange route updates and use hop count to select paths to remote networks.

RIP is useful in small, simple lab networks because its configuration is easy to understand. It has important limitations: it converges more slowly than modern protocols, uses hop count as a simple metric, and supports a maximum usable path of 15 hops. A path with a metric of 16 is considered unreachable. Larger production networks commonly use protocols such as OSPF or EIGRP instead.

This lesson focuses on RIP version 2 (RIPv2) on Cisco IOS routers. The examples use IPv4 subnetting and a two-router topology.

RIPv1 and RIPv2

RIPv1 is an older classful protocol. It does not include the subnet mask in its route updates, which makes it unsuitable for many modern subnetted networks. RIPv2 is classless: its updates include subnet-mask information, so it can advertise networks such as 10.0.0.0/24 correctly.

RIPv2 is selected inside RIP router configuration mode with the version 2 command. The word classless describes the information carried in updates; it does not change the special syntax of the Cisco IOS RIP network command.

Example two-router topology

R1 and R2 share a transit network. A transit network is a network used to connect routers so that routing updates and data can pass between them. R2 also connects to a LAN containing a host. R1 must learn the LAN behind R2 dynamically.

DeviceInterface or LANIPv4 address/networkRIP participationPurpose
R1Interface toward R2192.168.0.1/24192.168.0.0 major networkTransit connection
R2Interface toward R1192.168.0.2/24192.168.0.0 major networkTransit connection
R2LAN interface10.0.0.1/2410.0.0.0 major networkDirectly connected remote LAN
HostEthernet LAN10.0.0.10/24Not a RIP routerUses R2 as its default gateway

Both routers must have their interfaces configured with valid IPv4 addresses and subnet masks. The interfaces must also be operational before RIP can exchange routes.

Entering RIP configuration mode

Cisco IOS uses configuration modes. From privileged EXEC mode, enter global configuration mode with configure terminal. The router rip command creates or enters the RIP routing-process configuration mode.

Router# configure terminal
Router(config)# router rip
Router(config-router)#

The prompt changes to (config-router)#. Commands entered here configure the RIP process.

The essential RIPv2 commands

The version 2 command

Enter version 2 under router rip to select RIPv2:

Router(config-router)# version 2

This tells the RIP process to use RIPv2 updates, including subnet-mask information for classless IPv4 routing.

The network command

A RIP network NETWORK_ID statement has two related effects:

  • It enables RIP processing on local interfaces whose addresses match the specified network.
  • It causes the connected network associated with those interfaces to be advertised in RIP updates.

For Cisco IOS RIP, the value supplied to network is a classful major network number. For example, an interface addressed as 192.168.0.1/24 is activated with:

Router(config-router)# network 192.168.0.0

Likewise, an interface addressed as 10.0.0.1/24 is activated with:

Router(config-router)# network 10.0.0.0

Although RIPv2 supports subnet masks in route updates, the IOS RIP network statement traditionally uses the applicable classful major network. Identify the IPv4 address on each local interface, determine its major network, and add the required statements.

Determine which interfaces participate

Start with the topology, then list the local interfaces that need RIP:

  1. On each router, identify the interface connected to the shared transit network.
  2. Enable RIP on that transit network on both routers. Without this, the routers cannot exchange RIP updates over the link.
  3. On R2, identify the additional LAN interface that connects to 10.0.0.0/24.
  4. Enable RIP for R2's LAN so R2 advertises that directly connected network to R1.
  5. Do not configure a network statement for a remote network merely because you want to learn it. R1 learns the remote LAN from R2's update.

Configure R1

R1 needs RIPv2 enabled and must participate in the shared 192.168.0.0 major network. In this example, R1 does not directly connect to the 10.0.0.0/24 LAN, so it does not configure a network 10.0.0.0 statement.

R1# configure terminal
R1(config)# router rip
R1(config-router)# version 2
R1(config-router)# network 192.168.0.0
R1(config-router)# end

R1 can now send and receive RIP updates through its transit-facing interface. After receiving R2's advertisement, R1 should install a route to the remote LAN.

Configure R2

R2 needs RIPv2 enabled on both the shared transit network and its directly connected LAN. The second network statement causes R2 to advertise 10.0.0.0/24.

R2# configure terminal
R2(config)# router rip
R2(config-router)# version 2
R2(config-router)# network 192.168.0.0
R2(config-router)# network 10.0.0.0
R2(config-router)# end
RouterConfiguration goalRequired RIP network statementsExpected advertised networks
R1Exchange updates over the transit linknetwork 192.168.0.0Its connected transit network; it learns R2's LAN
R2Exchange updates and advertise its LANnetwork 192.168.0.0
network 10.0.0.0
Transit network and 10.0.0.0/24

Verify the routing table

Use show ip route to inspect the IPv4 routing table:

R1# show ip route

A simplified result on R1 may include:

R    10.0.0.0/24 [120/1] via 192.168.0.2, 00:00:18, GigabitEthernet0/0

The leading R is the route code for a route learned through RIP. This distinguishes it from a directly connected route, commonly marked C, or a local interface route, commonly marked L.

FieldExample valueMeaning
Route codeRThe route was learned by RIP.
Destination and prefix10.0.0.0/24The remote IPv4 network and its prefix length.
Administrative distance120RIP's default administrative distance, used to compare route sources.
Metric1The RIP hop-count metric. R1 reaches the network through one RIP router, R2.
Next hop192.168.0.2The neighboring router to which R1 forwards traffic.
Age and exit interface00:00:18, GigabitEthernet0/0Update timing information and the local forwarding interface.

The notation [120/1] therefore means administrative distance 120 and a metric of one hop. A RIP route appears only after R2 sends an update across the enabled common transit network and R1 processes it. Route learning is not necessarily instantaneous; allow time for exchange and convergence.

You can limit the routing-table output to RIP routes with:

R1# show ip route rip

Verify the RIP process and network statements

Use show ip protocols to review the active routing process, selected RIP version, configured networks, and related protocol information:

R1# show ip protocols

Use the running configuration to see the exact RIP commands:

R1# show running-config | section router rip

Also verify interface status and addressing:

R1# show ip interface brief
R2# show ip interface brief

Interfaces should have the expected IPv4 addresses and show an operational status. A configuration command alone cannot make RIP work if the interface is down, lacks an address, or is connected to the wrong subnet.

Common configuration problems

SymptomLikely causeVerification commandCorrective action
R1 has no RIP route to R2's LANThe transit network is missing from one router, or R2 did not advertise its LAN.show ip protocols
show running-config | section router rip
Configure network 192.168.0.0 on both routers and network 10.0.0.0 on R2.
A network statement does not affect the intended interfaceThe wrong classful major network was entered, or the interface has no valid IPv4 address.show ip interface brief
show ip protocols
Match the statement to the interface's applicable major network and correct the interface address if necessary.
The transit link does not exchange updatesAn interface is administratively down, physically down, or incorrectly addressed.show ip interface brief
ping 192.168.0.2
Bring the interfaces up, correct addressing, and confirm both ends are in the same transit subnet.
The route does not appear immediatelyRIP updates have not yet been exchanged or the path is unavailable.show ip route
show ip protocols
ping 192.168.0.2
Allow convergence, then check Layer 1 through Layer 3 connectivity and RIP participation.
A route exists but traffic failsThe return route is missing, a host has the wrong default gateway, or an interface is filtering or dropping traffic.show ip route
ping
traceroute
Verify bidirectional routes, host gateways, interface state, and any traffic filters.

RIP route advertisements and split horizon

RIP is a distance-vector protocol: a router tells neighboring routers which destinations it can reach and the hop-count distance to those destinations. Routers periodically exchange route updates and revise their routing tables when better information arrives.

Split horizon is a RIP loop-prevention behavior. A router normally does not advertise a route back out the same interface through which it learned that route. This reduces the chance that two routers will incorrectly teach each other that a failed destination is still reachable.

Split horizon is one part of RIP loop prevention. Broader RIP topics include periodic route updates, hop-count limits, administrative distance, RIPv1 versus RIPv2, classless routing support, route poisoning, poison reverse, timers, passive interfaces, default-route advertisement, and authentication.

Configuration checklist

  • Configure IPv4 addresses and subnet masks on the participating interfaces.
  • Confirm the interfaces are up with show ip interface brief.
  • Enter router rip from global configuration mode.
  • Select RIPv2 with version 2.
  • Add the classful major network of the shared transit network on both routers.
  • Add the major network of each local LAN that should be advertised.
  • Use show ip protocols and the running configuration to verify the process and statements.
  • Use show ip route or show ip route rip to confirm learned routes.
  • Interpret R as RIP and [120/1] as administrative distance 120 with a one-hop metric.

For a broader review, continue with RIP configuration and related routing concepts.