What RIP is (and isn’t)
- Type: Distance-vector IGP using the Bellman-Ford algorithm.
- Metric: Hop count (each router = +1). Best path = fewest hops.
- Infinity: 16 hops (so any route with metric 16 is considered unreachable).
- Transport: UDP port 520 for IPv4 (RIPv1/v2), UDP port 521 for IPv6 (RIPng).
- Use cases: Small/legacy networks, labs, or simple hub-and-spoke. It’s simple, but not scalable.
Major flavors
- RIPv1 (legacy)
- Classful (no subnet mask in updates) → no VLSM/CIDR; problems with discontiguous networks.
- Broadcast updates to 255.255.255.255.
- No authentication.
- RIPv2 (modern IPv4)
- Classless (carries prefix length), supports VLSM/CIDR and route tags.
- Multicast updates to 224.0.0.9 (TTL 1).
- Authentication (plain text or MD5).
- Next-hop field lets a router point neighbors to a better next hop on the same LAN.
- RIPng (IPv6)
- Multicast ff02::9 (link-local scope).
- Runs per interface with a process name.
- No built-in auth; rely on IPsec if needed.
Timers (Cisco defaults)

- Update: every 30 s (sends the whole table, split horizon rules applied).
- Invalid (Timeout): 180 s (if not refreshed, route becomes invalid).
- Holddown: 180 s (suppresses inferior updates for a route thought to be failing).
- Flush (Garbage): 240 s (remove route from RIB if no good news arrives).
- Note: Triggered updates fire immediately on significant change (don’t wait 30 s).
Loop prevention & stability tricks
- Split Horizon: Don’t advertise a route back out the interface it was learned on.
- Poison Reverse: Do advertise it back—but with metric 16—to kill loops on multi-access.
- Route Poisoning: When a route fails, immediately set metric to 16 and advertise.
- Holddown: After a failure, ignore worse metrics for a period to let bad news propagate.
- Triggered updates: Faster convergence by pushing immediate deltas.
Packet anatomy (RIPv2 highlights)
- Command: 1=Request, 2=Response (update).
- Version: 2 for RIPv2.
- Entries: up to 25 routes per message. Each entry includes:
- Address Family ID, IP, Subnet Mask, Next Hop, Metric (1–16), and Route Tag.
Administrative behavior (Cisco)
- Administrative distance (AD): 120 (worse than OSPF 110/EIGRP 90/110; better than external BGP 20?Note: eBGP AD is 20 which is better than RIP).
- ECMP: Load-balances across equal-cost RIP paths (typically up to 4 by default).
- Summarization: RIPv2 supports manual/auto; beware auto-summary on discontiguous networks (disable it).
Configuration examples
Cisco IOS – RIPv2 (IPv4)
conf t
router rip
version 2
no auto-summary ! critical for discontiguous networks
network 10.0.0.0
network 192.168.1.0
passive-interface GigabitEthernet0/2 ! don’t send updates on access VLANs
timers basic 30 180 180 240 ! (optional) explicit timers
!
! Authentication (per-interface)
interface GigabitEthernet0/1
ip rip authentication mode md5
ip rip authentication key-chain RIP-KEYS
key chain RIP-KEYS
key 1
key-string Str0ngKey
Default route options (pick one):
- Inject a static default into RIP:
ip route 0.0.0.0 0.0.0.0 <next-hop> router rip redistribute static
- Or advertise a default explicitly:
router rip default-information originate
Filtering examples:
! Inbound filter: only accept certain prefixes
access-list 10 permit 10.0.0.0 0.255.255.255
router rip
distribute-list 10 in GigabitEthernet0/1
! Version control on a per-interface basis
interface GigabitEthernet0/1
ip rip receive version 2
ip rip send version 2
Cisco IOS – RIPng (IPv6)
conf t
ipv6 unicast-routing
ipv6 router rip LAB6 ! create RIPng process (name is local only)
!
interface GigabitEthernet0/1
ipv6 address 2001:db8:1::1/64
ipv6 rip LAB6 enable ! RIPng runs per interface
!
interface GigabitEthernet0/2
ipv6 address 2001:db8:2::1/64
ipv6 rip LAB6 enable
FRRouting/Quagga (Linux) – RIPv2 quick sketch
router rip
version 2
network 10.0.0.0/8
network 192.168.1.0/24
no auto-summary
redistribute static
!
interface eth0
ip rip send v2
ip rip receive v2
Operational tips & troubleshooting
- See what RIP is doing
show ip protocols
– timers, networks, neighbors heard from, filters.show ip rip database
– RIP’s view of learned prefixes (with next hops/metrics).show ip route rip
– what made it into the RIB.debug ip rip
– live updates (use carefully in production).
- Common pitfalls
- Auto-summary causing wrong masks → use
no auto-summary
. - No adjacency concept in RIP; it’s stateless gossip. If you don’t see routes:
- Are updates arriving on the interface (ACLs/firewall/UDP 520 allowed)?
- Are you sending/receiving the right version (v1 vs v2)?
- Passive interface inadvertently set?
- Authentication mismatches (key/key-string/MD5 vs plain text)?
- Discontiguous networks with classful assumptions (RIPv1 or auto-summary).
- Convergence delay under failure—RIP can be slow and prone to count-to-infinity.
- Auto-summary causing wrong masks → use
Design guidance—when (not) to use RIP
- Use RIP if:
- The network is tiny and static (≤ a few hops), you need simplicity, and devices are old.
- You’re in a lab/classroom learning fundamentals.
- Prefer OSPF/EIGRP/IS-IS if:
- You need fast, deterministic convergence, scalable areas, richer metrics, or robust loop-avoidance.
- You expect more than ~15 hops, complex summarization, or traffic engineering.
Security considerations
- Limit update exposure (layer-2 boundaries, VRFs).
- Use MD5 authentication on RIPv2; set passive-interface on untrusted edges.
- Filter routes with distribute-lists/prefix-lists.
- Remember RIPv2 multicasts with TTL=1, but an L2 leak can still cause mischief.
Quick mental checklist
- version 2 and no auto-summary
- Networks under
router rip
match connected interfaces - Passive-interface access-side
- Auth (MD5) on shared segments
- Filters if mixing with static/redistributed routes
- Watch timers and consider triggered updates behavior
- Distance Vector Routing Protocol: RIP is a distance vector routing protocol that uses hop count as its metric to determine the best path.
- Simplicity and Efficiency: Due to its simplicity, RIP requires less CPU and memory, making it suitable for low-end routers.
- Limitations: RIP only considers hop count and not link speeds, which can lead to suboptimal path selection. Additionally, it has a maximum hop count limit of 15, making it unsuitable for large networks.
- Route Updates: RIP routers share route information through periodic updates, using broadcast in RIP version 1 and multicast in RIP version 2.