RIP Protocol

Routing Information Protocol (RIP) is one of the oldest distance-vector routing protocols essential for networking fundamentals and a key component of the CCNP ENARSI certification. It uses hop count as its metric to determine the best path to a destination, with a maximum allowable hop count of 15. This guide provides detailed explanations of RIP fundamentals, configurations, and troubleshooting, enriched with practical examples and Cisco commands to deepen your understanding.

Table of Contents

RIP Basics

RIP operates as a distance-vector protocol that exchanges routing information with neighboring routers. Its simplicity makes it ideal for smaller networks where ease of configuration takes precedence over advanced features.

Key Features and Characteristics

Distance-Vector vs. Link-State Protocols

Unlike link-state protocols (e.g., OSPF), which build a complete topology map, RIP routers only know their immediate neighbors and the routes those neighbors advertise. This "routing by rumor" approach is simpler but less efficient in larger networks.

Example: If Router A learns about network 192.168.5.0/24 from Router B with a metric of 2, Router A will add this route to its table with a metric of 3 (B's metric + 1), without knowing the actual topology beyond Router B.

RIP Versions

RIP has evolved through two main versions, each offering different capabilities:

RIPv1

RIPv2

Example: RIPv1 would treat 192.168.1.0/24 and 192.168.2.0/24 as part of the classful network 192.168.0.0/16, while RIPv2 correctly advertises each with its specific subnet mask.

RIP Operation

RIP follows a structured process to build and maintain routing tables:

  1. Initialization: When a RIP router boots, it adds directly connected networks to its routing table.
  2. Initial Exchange: The router sends requests to neighbors for their routing tables.
  3. Regular Updates: Every 30 seconds, each router broadcasts its entire routing table.
  4. Route Processing: Upon receiving updates, routers:
    • Add new routes not in their table
    • Update existing routes if a better metric is received
    • Ignore routes with higher metrics than current entries
    • Mark routes as invalid if not refreshed within timeout period
  5. Triggered Updates: When route status changes, a router immediately sends an update rather than waiting for the regular interval.

Example: If Router A loses connectivity to network 10.0.0.0/8, it immediately sends a triggered update marking that route as unreachable (metric 16) rather than waiting for the next 30-second update.

RIP Configuration

Configuring RIP is straightforward, with minimal commands required for basic operation:

Basic RIPv2 Configuration

Router> enable
Router# configure terminal
Router(config)# router rip
Router(config-router)# version 2
Router(config-router)# network 192.168.1.0
Router(config-router)# network 10.0.0.0
Router(config-router)# no auto-summary
Router(config-router)# exit

In this configuration:

Passive Interfaces

Control RIP updates on specific interfaces:

Router(config)# router rip
Router(config-router)# passive-interface GigabitEthernet0/1

This prevents RIP updates from being sent out the specified interface while still allowing it to receive updates.

Default Route Advertisement

Propagate a default route through RIP:

Router(config)# ip route 0.0.0.0 0.0.0.0 192.168.1.1
Router(config)# router rip
Router(config-router)# default-information originate

Example: A branch router uses this configuration to advertise a default route to internal devices, directing all external traffic toward headquarters.

RIP Authentication

RIPv2 supports authentication to ensure updates come from trusted sources:

Plain Text Authentication

Router(config)# interface GigabitEthernet0/0
Router(config-if)# ip rip authentication mode text
Router(config-if)# ip rip authentication key CISCO123
Router(config-if)# exit

This configuration enables simple password authentication, but the password is visible in packet captures.

MD5 Authentication

Router(config)# key chain RIP_KEYS
Router(config-keychain)# key 1
Router(config-keychain-key)# key-string SECRETKEY
Router(config-keychain-key)# exit
Router(config)# interface GigabitEthernet0/0
Router(config-if)# ip rip authentication mode md5
Router(config-if)# ip rip authentication key-chain RIP_KEYS
Router(config-if)# exit

MD5 offers stronger security by encrypting the authentication information.

Example: Two border routers use MD5 authentication to verify the authenticity of routing updates, preventing a rogue device from injecting false routes.

RIP Timers

RIP uses several timers to control its operation and convergence:

Modifying Timers

Router(config)# router rip
Router(config-router)# timers basic 15 90 90 120

Parameters correspond to update, invalid, hold-down, and flush timers respectively.

Example: In a small campus network, administrators reduce the update timer to 15 seconds to achieve faster convergence, accepting the tradeoff of increased network traffic.

Loop Prevention Mechanisms

RIP implements several mechanisms to prevent routing loops in distance-vector environments:

Split Horizon

Prevents a router from advertising routes back through the interface they were learned from.

Router(config)# interface Serial0/0/0
Router(config-if)# no ip split-horizon

Split horizon is enabled by default; this example shows how to disable it when needed (e.g., on NBMA networks).

Route Poisoning

When a route fails, the router advertises it with an infinite metric (16 hops) to explicitly indicate unreachability.

Poison Reverse

Overrides split horizon by explicitly advertising failed routes back to their source with an infinite metric.

Triggered Updates

Immediately propagates route changes instead of waiting for the next update interval.

Example: When Router A loses connectivity to network 172.16.0.0/16, it immediately sends an update with metric 16 (poison), and its neighbors propagate this information through poison reverse, preventing loops.

RIP Limitations and Solutions

RIP has inherent limitations that require careful design considerations:

Hop Count Limitation

RIP's 15-hop maximum can be addressed through careful network design or route summarization.

Router(config)# router rip
Router(config-router)# offset-list 10 in 1 Serial0/0/0

This adds 1 to the metric of all routes matching access-list 10 received on Serial0/0/0, allowing some control over path selection.

Slow Convergence

RIP's convergence can be improved through timer adjustments and triggered updates.

Bandwidth Usage

Mitigate bandwidth consumption with summarization and passive interfaces:

Router(config)# router rip
Router(config-router)# passive-interface default
Router(config-router)# no passive-interface GigabitEthernet0/0

This configures all interfaces as passive by default, then selectively enables updates only on GigabitEthernet0/0.

Example: A company with 50 subnets uses summarization at distribution layer routers to advertise a single aggregate route to the core, reducing update size and processing requirements.

RIP Troubleshooting

Common RIP issues can be diagnosed with these commands:

Common Problems:

Example: Using debug ip rip might reveal that Router A is sending RIPv1 updates while Router B expects RIPv2, explaining why subnet masks aren't being properly recognized.

Advantages and Disadvantages

Advantages

Disadvantages

Example: RIP works well in a small branch office with a simple hub-and-spoke topology, but would be inappropriate for a large enterprise campus with multiple redundant paths and varying link speeds.