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.
| Device | Interface or LAN | IPv4 address/network | RIP participation | Purpose |
|---|---|---|---|---|
| R1 | Interface toward R2 | 192.168.0.1/24 | 192.168.0.0 major network | Transit connection |
| R2 | Interface toward R1 | 192.168.0.2/24 | 192.168.0.0 major network | Transit connection |
| R2 | LAN interface | 10.0.0.1/24 | 10.0.0.0 major network | Directly connected remote LAN |
| Host | Ethernet LAN | 10.0.0.10/24 | Not a RIP router | Uses 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:
- On each router, identify the interface connected to the shared transit network.
- Enable RIP on that transit network on both routers. Without this, the routers cannot exchange RIP updates over the link.
- On R2, identify the additional LAN interface that connects to
10.0.0.0/24. - Enable RIP for R2's LAN so R2 advertises that directly connected network to R1.
- 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
| Router | Configuration goal | Required RIP network statements | Expected advertised networks |
|---|---|---|---|
| R1 | Exchange updates over the transit link | network 192.168.0.0 | Its connected transit network; it learns R2's LAN |
| R2 | Exchange updates and advertise its LAN | network 192.168.0.0network 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.
| Field | Example value | Meaning |
|---|---|---|
| Route code | R | The route was learned by RIP. |
| Destination and prefix | 10.0.0.0/24 | The remote IPv4 network and its prefix length. |
| Administrative distance | 120 | RIP's default administrative distance, used to compare route sources. |
| Metric | 1 | The RIP hop-count metric. R1 reaches the network through one RIP router, R2. |
| Next hop | 192.168.0.2 | The neighboring router to which R1 forwards traffic. |
| Age and exit interface | 00:00:18, GigabitEthernet0/0 | Update 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
| Symptom | Likely cause | Verification command | Corrective action |
|---|---|---|---|
| R1 has no RIP route to R2's LAN | The transit network is missing from one router, or R2 did not advertise its LAN. | show ip protocolsshow 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 interface | The wrong classful major network was entered, or the interface has no valid IPv4 address. | show ip interface briefshow 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 updates | An interface is administratively down, physically down, or incorrectly addressed. | show ip interface briefping 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 immediately | RIP updates have not yet been exchanged or the path is unavailable. | show ip routeshow ip protocolsping 192.168.0.2 | Allow convergence, then check Layer 1 through Layer 3 connectivity and RIP participation. |
| A route exists but traffic fails | The return route is missing, a host has the wrong default gateway, or an interface is filtering or dropping traffic. | show ip routepingtraceroute | 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 ripfrom 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 protocolsand the running configuration to verify the process and statements. - Use
show ip routeorshow ip route ripto confirm learned routes. - Interpret
Ras 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.