CCNA online course

RIP Routing Information Protocol Overview

Learn RIP distance-vector routing, hop-count metrics, RIPv1, RIPv2, RIPng, Cisco IOS configuration, verification, timers, and troubleshooting for CCNA.

Routing Information Protocol (RIP) is an IPv4 and IPv6 interior gateway routing protocol that helps routers learn paths to networks that are not directly connected. This lesson covers RIP operation, route selection, protocol versions, Cisco IOS configuration, verification, and limitations.

Why Dynamic Routing Is Needed

A router can forward a packet directly only when it knows a route to the destination network. It automatically knows its directly connected networks, but it needs additional routing information for remote networks reached through other routers.

With static routing, an administrator manually enters each route. Static routes provide control and have little protocol overhead, but they must be changed manually when the topology changes. With dynamic routing, routers exchange information and calculate routes automatically. Dynamic routing is more useful when a network has multiple routers, alternate paths, or frequent changes.

RIP is an interior gateway protocol (IGP), meaning it is designed for routing inside one autonomous system. It is a distance-vector routing protocol: routers exchange a destination's distance and direction with directly connected neighbors rather than maintaining a complete map of the network.

RIP Metric and Route Selection

RIP uses hop count as its metric. A hop is a router transition on the path to a destination. A lower hop count is preferred.

  • A network advertised by a directly connected RIP router has a metric of 1 to its neighbor.
  • A router receiving that advertisement adds 1 before advertising the route onward.
  • The maximum usable RIP metric is 15.
  • A metric of 16 represents infinity, meaning the destination is unreachable.

For example, R1 can learn a LAN behind R3 through R2 with a metric of 2: R1 reaches R2 in one hop, and R2 reaches the destination LAN through R3 in the next hop. The hop-count limit makes RIP unsuitable for large or deeply layered networks.

RIP's metric is different from administrative distance. Administrative distance is a local trust value used when comparing routes learned from different sources. Cisco IOS assigns RIP a default administrative distance of 120. The RIP metric compares routes within RIP; administrative distance compares RIP with sources such as connected, static, OSPF, or EIGRP.

How Distance-Vector RIP Operates

  1. RIP runs on selected router interfaces and forms an information exchange with directly connected neighbors.
  2. Each router sends routing updates periodically. The typical default update interval is 30 seconds.
  3. A receiving router adds one to the advertised metric.
  4. It compares the resulting route with its existing route and other available routes.
  5. The router installs or updates the preferred route, then advertises its knowledge to neighboring routers.

Because every router passes learned information to its neighbors, route knowledge propagates across multiple routers. RIP normally sends the complete routing table in periodic updates, which is simple but consumes more bandwidth and can slow convergence compared with modern protocols.

RIP Timers and Route Lifecycle

TimerTypical DefaultPurpose
Update30 secondsInterval between periodic routing updates.
Invalid180 secondsTime without a valid update before a route is considered invalid.
Hold-down180 secondsPeriod during which suspicious replacement information is restricted.
Flush240 secondsTime after which an invalid route is removed from the routing table.

If updates for a learned route stop arriving, the invalid timer eventually marks that route unusable. The router may place it in hold-down, reject potentially stale alternatives, and advertise it as unreachable. After the flush timer expires, the route is removed. Exact behavior can depend on the topology and IOS implementation, but these timers explain why RIP can take longer to converge than OSPF or EIGRP.

Loop Prevention and Convergence

A routing loop occurs when routers repeatedly forward traffic around a cycle because they have incorrect or stale information. In a distance-vector protocol, this can create the count-to-infinity problem: routers keep increasing a route's metric while believing that another router still has a path.

MechanismHow It WorksProblem It Addresses
Split horizonA router does not advertise a learned route back through the interface on which it learned it.Prevents a router from immediately sending a route back toward its source.
Route poisoningA failed route is advertised with metric 16.Quickly marks the destination unreachable.
Poisoned reverseA route is advertised back to the neighbor it came from with metric 16.Makes the reverse path explicitly unreachable.
Hold-down timerTemporarily limits acceptance of updates for a route reported as unavailable.Reduces acceptance of stale or incorrect information.
Triggered updateAn update is sent immediately after a significant topology change instead of waiting for the next 30-second cycle.Speeds notification of failures.

These mechanisms reduce loops and improve convergence, but they do not remove RIP's fundamental scalability and timer limitations.

RIPv1, RIPv2, and RIPng

RIPv1 is classful. Its updates do not include subnet mask information, so routers infer classful network boundaries. Consequently, RIPv1 cannot properly support VLSM or discontiguous networks. It uses broadcast updates and performs automatic classful summarization at major network boundaries.

RIPv2 is classless. It includes the subnet mask in route updates, allowing VLSM, CIDR, and discontiguous networks when automatic summarization is disabled where appropriate. RIPv2 sends updates to multicast address 224.0.0.9, supports next-hop information, and supports route authentication. It is generally preferred over RIPv1 in IPv4 networks.

RIPng is the RIP variant for IPv6. It remains a distance-vector protocol and uses hop count, with 16 representing unreachable. RIPng uses UDP port 521 and multicast address FF02::9. Unlike IPv4 RIP configuration, RIPng is enabled per IPv6 interface.

AttributeRIPv1RIPv2RIPng
Address familyIPv4IPv4IPv6
Routing typeDistance-vectorDistance-vectorDistance-vector
MetricHop countHop countHop count
Maximum usable hop count151515
Subnet mask or prefix informationNot includedIncludedIPv6 prefix included
Update destinationBroadcast224.0.0.9 multicastFF02::9 multicast
UDP port520520521
VLSM and CIDR supportNoYesIPv6 prefix-based routing
Authentication supportLimited and not suitable for modern designsYesUses IPv6 security mechanisms rather than IPv4 RIPv2 authentication
Typical configuration modelIPv4 process and network statementsIPv4 process and network statementsIPv6 process enabled per interface

Three-Router RIPv2 Example

Use this linear topology in a lab:

  • R1 LAN: 192.168.10.0/24
  • R1-R2 transit: 10.0.12.0/30
  • R2-R3 transit: 10.0.23.0/30
  • R3 LAN: 192.168.30.0/24

Configure each router with network statements matching its connected IPv4 interfaces. The following is an illustrative R1 configuration; use the appropriate networks on R2 and R3.

router rip
 version 2
 network 192.168.10.0
 network 10.0.0.0
 no auto-summary

The router rip command enters the RIP routing-process configuration mode. version 2 selects RIPv2. A network statement enables RIP on interfaces whose IPv4 addresses match the statement and causes those connected networks to be advertised. On Cisco IOS, RIP network statements use classful network values even when the interfaces themselves use subnetted addresses. no auto-summary preserves specific subnet routes for VLSM and discontiguous designs.

After configuration, R1 should learn 192.168.30.0/24 through R2 with a RIP metric of 2. Hosts on the two LANs should then be able to communicate if their default gateways and interface addressing are correct.

Passive Interfaces, Summaries, and Authentication

A passive interface does not send RIP updates on that interface, while the connected network can still be advertised to RIP neighbors through other interfaces. This is useful on an end-user LAN, where hosts do not need routing updates.

router rip
 version 2
 network 192.168.10.0
 network 10.0.0.0
 no auto-summary
 passive-interface GigabitEthernet0/0

A default passive policy is useful when only selected router-to-router links should exchange updates:

router rip
 passive-interface default
 no passive-interface Serial0/0/0

RIPv2 also supports manual route summarization at an interface. A summary should be chosen carefully: an overly broad summary can hide more-specific routes or create reachability problems. Authentication is another advanced RIPv2 capability and helps prevent unauthorized routers from participating in the routing process. The exact authentication syntax varies by IOS platform and should be matched on neighboring interfaces.

RIPng Configuration Overview

ipv6 unicast-routing
ipv6 router rip RIPNG
interface GigabitEthernet0/0
 ipv6 rip RIPNG enable

RIPng uses an IPv6 routing process name and is enabled directly on each participating interface. It does not use IPv4-style network statements.

Verifying RIP

show ip route
show ip route rip
show ip protocols
show ip rip database
show running-config | section router rip
ping <destination-ip>
traceroute <destination-ip>

Use show ip route to inspect the IPv4 routing table. RIP-learned routes have the code R. A typical entry resembles:

R    192.168.30.0/24 [120/2] via 10.0.12.2, 00:00:18, Serial0/0/0
Route Table FieldExample Meaning
Route source code RThe route was learned through RIP.
Administrative distance120, RIP's default Cisco IOS distance.
Hop-count metric2, the RIP distance to the destination.
Next-hop address10.0.12.2, the neighboring router to which traffic is sent.
Route age00:00:18, time since the route was refreshed or learned.
Outgoing interfaceThe interface used to reach the next hop.

show ip protocols confirms the RIP version, configured networks, timers, passive interfaces, update behavior, and automatic summarization status. show ip rip database shows RIP's learned and advertised route information. show running-config validates the actual process configuration. Use ping for reachability and traceroute to inspect the path and identify where forwarding fails.

In a controlled lab, debug ip rip displays sent and received updates, including metrics. Stop debugging with undebug all. Debug commands can consume CPU and terminal resources and should not be left enabled in production.

RIPv1 Versus RIPv2 with VLSM

Suppose an addressing plan uses /24 LANs and /30 point-to-point links within one major network range. RIPv1 cannot carry the /24 and /30 masks, so a receiving router cannot reliably distinguish those prefixes. RIPv2 carries the masks and can preserve the variable-length routes.

Discontiguous networks provide another warning. For example, 172.16.1.0/24 and 172.16.2.0/24 may be separated by a 10.0.0.0/30 transit path. RIPv2 should use no auto-summary so the specific subnet routes are exchanged instead of being summarized automatically as 172.16.0.0/16.

Failure, Poisoning, and Convergence Lab

In a triangle or other redundant topology, shut down a transit interface and observe how the routers react. A router may send a triggered update and advertise the failed route with metric 16. Neighboring routers apply split horizon, poisoned reverse, and hold-down behavior to reduce the chance of a loop. If an alternate path exists, the route may remain installed through that path; otherwise, timer processing eventually removes it.

Troubleshooting RIP

No RIP routes appear

  • Check that RIP is configured on every required router.
  • Use show ip protocols to verify process settings and networks.
  • Use show ip interface brief to confirm that interfaces are up and have valid IPv4 addresses.
  • Check that each network statement matches the intended interface address.
  • Verify compatible RIP versions and use debug ip rip only in a lab.

RIPv2 routers do not exchange routes

  • Confirm that both routers use RIPv2 and check for interface-level version settings that override process defaults.
  • Where filtering is relevant, confirm that UDP port 520 and RIPv2 multicast traffic to 224.0.0.9 are permitted.
  • Check ACLs, firewalls, and intermediary devices.

VLSM routes are missing or summarized

  • Confirm version 2.
  • Confirm no auto-summary.
  • Inspect show ip route and show ip rip database.
  • Review any interface summary configuration for an excessively broad manual summary.

Users receive routing updates

Configure passive-interface on the LAN-facing interface and confirm the setting with show ip protocols. The LAN prefix should still be advertised through the router's active RIP interfaces.

A route remains after failure

Inspect the route age, next hop, interface status, timers, and alternate paths. RIP may be processing timer-based convergence, or the route may still be valid through another path. A failure that does not produce an interface-down event may not generate an immediate triggered update.

The router chooses an unexpected path

Compare the administrative distance and metric in show ip route. A lower RIP hop count is preferred among RIP routes, but a route from another protocol with a lower administrative distance may win. Also check for equal-cost paths and the effects of summarization.

Appropriate Uses and Limitations

RIP is suitable for small, simple, low-change networks and instructional labs. Its straightforward metric and periodic neighbor updates make it valuable for learning routing fundamentals.

  • The maximum usable metric is only 15 hops.
  • Periodic full-table updates consume bandwidth.
  • Timer-based convergence can be slow.
  • RIP scales poorly as the number of routers and routes grows.
  • Its hop-count metric does not consider bandwidth, delay, or link quality.

OSPF is a scalable link-state protocol that builds a topology database and calculates paths using cost. EIGRP provides richer distance-vector behavior and additional route information. RIP is therefore uncommon in modern enterprise networks, but its concepts remain important for understanding metrics, route advertisements, loops, convergence, route summarization, and Cisco IOS troubleshooting.

CCNA Exam Notes

  • RIP is an IGP and a distance-vector protocol.
  • Its metric is hop count; lower is better.
  • 15 is the highest usable metric; 16 means unreachable.
  • RIPv1 is classful, broadcasts updates, and does not carry subnet masks.
  • RIPv2 is classless, includes masks, uses multicast 224.0.0.9, and supports authentication.
  • RIPng is for IPv6, uses UDP 521 and FF02::9, and is enabled per interface.
  • Cisco IOS gives RIP an administrative distance of 120.
  • Remember the common timers: update 30 seconds, invalid 180 seconds, hold-down 180 seconds, and flush 240 seconds.
  • no auto-summary is important for RIPv2 VLSM and discontiguous addressing designs.

For related routing concepts, compare RIP with OSPF configuration, study link-state advertisements, and review route summarization.