show ip rip database
Verify RIP is learning and advertising routes correctly, and diagnose why RIP routes are not appearing in the routing table.
Definition: show ip rip database is a Cisco IOS privileged exec command. Displays the RIP routing database showing all routes learned via RIP, their metrics (hop count), next-hop addresses, and when the route was last updated.
Overview
The 'show ip rip database' command is a vital diagnostic tool for network engineers working with Routing Information Protocol (RIP) in Cisco IOS environments. RIP is a distance-vector routing protocol that uses hop count as its metric, with a maximum of 15 hops to prevent routing loops. This command displays the RIP routing database, which contains all routes learned via RIP updates from neighboring routers, along with their associated metrics, timers, and administrative distance.
Unlike the routing table (shown by 'show ip route'), the RIP database includes all routes received, even if they are not installed in the routing table due to higher administrative distance or other reasons. This makes it indispensable for troubleshooting RIP-specific issues such as missing routes, incorrect metrics, or routing loops. The command is typically used in privileged EXEC mode (enable) and does not affect the running configuration.
It is particularly useful when verifying RIP updates after configuration changes, checking for route flapping, or correlating with debug output. The output is buffered and may be truncated if the database is large; using 'terminal length 0' can help display all entries. Understanding the RIP database is crucial for CCNA and CCNP candidates as it provides insight into how RIP processes and selects routes, and it helps in distinguishing between routes that are active, passive, or suppressed due to split horizon or poison reverse.
Compared to 'show ip route rip', which only shows installed routes, 'show ip rip database' reveals the full set of learned routes, including those that may be suppressed or not preferred. This command is also useful for verifying redistribution into RIP, as redistributed routes appear in the database with a metric of 1 by default unless changed. In summary, 'show ip rip database' is a foundational command for any engineer working with RIP, offering a granular view of the protocol's internal state and enabling effective troubleshooting and verification of RIP configurations.
show ip rip database [ip-address [mask]]When to Use This Command
- Confirm RIP neighbours are exchanging routes by checking the database
- Verify route metrics are incrementing correctly (each hop adds 1)
- Troubleshoot a route with metric 16 (infinity) which RIP has marked as unreachable
- Check route timers to see if a route is about to expire
Parameters
| Parameter | Syntax | Description |
|---|---|---|
| No parameters | N/A | The command 'show ip rip database' has no optional or required parameters. It simply displays the entire RIP routing database. There are no common mistakes as there are no parameters to misuse. |
Command Examples
RIP database output
Router# show ip rip database
0.0.0.0/0 auto-summary
0.0.0.0/0 redistributed
[1] via 0.0.0.0, 00:00:00, Null0
10.0.0.0/8 auto-summary
192.168.1.0/24 directly connected, GigabitEthernet0/0
192.168.2.0/24
[1] via 192.168.1.2, 00:00:24, GigabitEthernet0/0Understanding the Output
Format: network/prefix, then for each path: [metric] via next-hop, time-since-update, interface. Metric 1 = one hop away. Metric 16 = infinity (route is being flushed).
Directly connected routes show as 'directly connected'. Auto-summary routes appear when RIP auto-summarisation is enabled (default in RIPv1, optional in RIPv2).
Configuration Scenarios
Verify RIP routes learned from a neighbor
After configuring RIP on two routers, you need to confirm that routes are being exchanged correctly. This scenario verifies that R2 learns the loopback network 192.168.1.0/24 from R1.
Topology
R1(Gi0/0)---10.0.12.0/30---(Gi0/0)R2Steps
- 1.Step 1: Enter privileged EXEC mode on R2: Router> enable
- 2.Step 2: Display the RIP database: Router# show ip rip database
- 3.Step 3: Look for the network 192.168.1.0/24 in the output. It should appear with a metric of 1 (directly connected on R1) or 2 (if learned via R1).
- 4.Step 4: Verify the next hop is 10.0.12.1 (R1's interface IP).
! R1 configuration interface GigabitEthernet0/0 ip address 10.0.12.1 255.255.255.252 ! interface Loopback0 ip address 192.168.1.1 255.255.255.0 ! router rip version 2 network 10.0.0.0 network 192.168.1.0 ! ! R2 configuration interface GigabitEthernet0/0 ip address 10.0.12.2 255.255.255.252 ! router rip version 2 network 10.0.0.0
Verify: On R2: show ip rip database Expected output includes: 192.168.1.0/24 auto-summary 192.168.1.0/24 directly connected, Loopback0 [1] via 10.0.12.1, 00:00:15, GigabitEthernet0/0
Watch out: Ensure RIP version 2 is used to support VLSM; version 1 is classful and may not advertise subnets correctly. Also, verify that the network statements include the correct major networks.
Troubleshoot missing RIP route due to passive interface
A router is configured with a passive interface on the link to a neighbor, preventing RIP updates from being sent. This scenario shows how to identify the issue using the RIP database.
Topology
R1(Gi0/0)---10.0.12.0/30---(Gi0/0)R2
R1(Gi0/1)---192.168.1.0/24---(Gi0/0)R3Steps
- 1.Step 1: On R1, configure GigabitEthernet0/1 as passive under RIP: Router(config-router)# passive-interface GigabitEthernet0/1
- 2.Step 2: On R3, check the RIP database: Router# show ip rip database
- 3.Step 3: Observe that no routes from R1's other networks (e.g., 10.0.12.0/30) appear in R3's database.
- 4.Step 4: On R1, verify the passive interface configuration: Router# show ip protocols | include Passive
! R1 configuration interface GigabitEthernet0/0 ip address 10.0.12.1 255.255.255.252 ! interface GigabitEthernet0/1 ip address 192.168.1.1 255.255.255.0 ! router rip version 2 network 10.0.0.0 network 192.168.1.0 passive-interface GigabitEthernet0/1 ! ! R3 configuration interface GigabitEthernet0/0 ip address 192.168.1.2 255.255.255.0 ! router rip version 2 network 192.168.1.0
Verify: On R3: show ip rip database Expected output shows only directly connected networks (e.g., 192.168.1.0/24) and no routes from R1's 10.0.12.0/30 network.
Watch out: A common mistake is to set a passive interface on the link between RIP neighbors, which stops both sending and receiving updates. The passive-interface command only prevents sending updates; to prevent receiving, use 'neighbor' command or distribute-lists.
Troubleshooting with This Command
When troubleshooting RIP issues, 'show ip rip database' is your first stop after verifying basic connectivity. A healthy RIP database shows all learned routes with their metrics, timers, and next-hop information. Each route entry includes the network prefix, metric in brackets (e.g., [1]), next-hop IP, time since last update (in seconds), and outgoing interface.
Routes that are directly connected appear with 'directly connected' and the interface name. Problem indicators include missing routes, high metrics (approaching 16, which means unreachable), or routes with 'possibly down' timers. For example, if a route shows a metric of 16, it indicates the route is considered unreachable (poison reverse).
If routes are missing entirely, check that RIP is enabled on the correct interfaces and that network statements are correct. Also verify that the neighbor router is sending updates by using 'debug ip rip' on the neighbor. Another common issue is route suppression due to split horizon; if a route learned on an interface is not being advertised back out the same interface, that is normal behavior.
However, if you expect a route to be present and it is not, check for passive interfaces, distribute-lists, or route filtering. The RIP database also shows auto-summary routes (e.g., 10.0.0.0/8) if auto-summary is enabled; this can cause suboptimal routing in discontiguous networks. To correlate with other commands, use 'show ip route rip' to see which routes are actually installed in the routing table.
If a route is in the RIP database but not in the routing table, it may be because of a higher administrative distance from another routing protocol (e.g., OSPF with AD 110 vs RIP AD 120) or because the route is a candidate for load balancing but the routing table already has a better path. Also, 'show ip protocols' provides RIP timers and neighbor information. A step-by-step diagnostic flow: 1) Check 'show ip rip database' for the expected routes. 2) If missing, verify 'show ip interface brief' to ensure interfaces are up. 3) Check 'show ip protocols' to confirm RIP is running and network statements are correct. 4) Use 'debug ip rip' to see incoming and outgoing updates. 5) Check for passive interfaces or distribute-lists. 6) Verify neighbor reachability with ping.
By systematically using these tools, you can quickly isolate RIP routing problems.
CCNA Exam Tips
CCNA exam: RIP maximum hop count is 15
Metric 16 = unreachable (infinity)
RIPv1 does not support VLSM/CIDR (classful routing)
RIPv2 supports VLSM and sends subnet masks in updates
Use debug ip rip to see RIP updates in real time
RIP uses UDP port 520
Split horizon prevents routing loops by not advertising a route back out the interface it was learned from
Common Mistakes
Confusing show ip rip database (RIP-specific route database) with show ip route (active routing table)
Expecting to see all routes in the routing table — RIP installs routes only if they have better AD than other sources
Not enabling RIPv2 (version 2) and leaving auto-summary on — causes black-holing in discontiguous networks
show ip rip database vs show ip route
These commands are often confused because both display routing information, but they serve different purposes. 'show ip rip database' shows only routes learned via RIP, while 'show ip route' displays the complete routing table from all sources.
| Aspect | show ip rip database | show ip route |
|---|---|---|
| Scope | Only RIP-learned routes | All routes (all protocols) |
| Information Provided | Metric (hop count), next-hop, last update time | Protocol code, AD, metric, next-hop, outgoing interface, age |
| Protocol Specificity | RIP only | All routing protocols |
| Routing Source | Implicitly RIP | Explicitly indicated (R, O, C, S, etc.) |
| Metrics Displayed | Hop count | Protocol-specific metric (e.g., cost, hop count) |
Use show ip rip database when you need to verify RIP-specific route details such as hop count and update timers.
Use show ip route when you want a comprehensive view of all routing information, including route sources and administrative distances.
Platform Notes
In IOS-XE (e.g., Catalyst 9000 switches), the 'show ip rip database' command syntax and output are identical to classic IOS. However, on some IOS-XE platforms, RIP is not supported by default and may require a specific license or feature set. On NX-OS (Cisco Nexus switches), RIP is not supported; the equivalent command for distance-vector protocols is 'show ip eigrp topology' for EIGRP, but there is no direct RIP equivalent.
For ASA firewalls, RIP is not supported; instead, use 'show route' for routing information. In IOS-XR, RIP is not supported; the routing protocol equivalent is OSPF or IS-IS. Between IOS versions (12.x, 15.x, 16.x), the output format remains consistent, but newer versions may include additional fields such as 'Uptime' or 'Tag' if route tagging is configured.
In IOS 15.x and later, the command also supports the '| begin' and '| include' output modifiers for filtering. There are no significant behavioral differences across versions. Always ensure you are in privileged EXEC mode (enable) to execute this command; user EXEC mode will return '% Invalid input detected'.
Related Commands
show ip interface brief
Displays a one-line summary of all interfaces showing the IP address assigned, operational status (up/down), and line protocol status. The fastest way to get a device health overview.
show ip route
Displays the IP routing table showing all known routes, their source protocols, administrative distances, metrics, next-hops, and outgoing interfaces.
Practice for the CCNA 200-301
Test your knowledge with practice questions covering all CCNA 200-301 exam domains.
Practice CCNA 200-301 Questions