Contents
- Implementing and Monitoring RIB on Cisco IOS XR Software
- Prerequisites for Implementing RIB
- Information About RIB Configuration
- Overview of RIB
- RIB Data Structures in BGP and Other Protocols
- RIB Administrative Distance
- RIB Support for IPv4 and IPv6
- RIB Statistics
- IPv6 Provider Edge IPv6 and IPv6 VPN Provider Edge Transport over MPLS
- RIB Quarantining
- How to Deploy and Monitor RIB
- Verifying RIB Configuration Using the Routing Table
- Verifying Networking and Routing Problems
- Disabling RIB Next-hop Dampening
- Configuration Examples for RIB Monitoring
- Output of show route Command: Example
- Output of show route backup Command: Example
- Output of show route best-local Command: Example
- Output of show route connected Command: Example
- Output of show route local Command: Example
- Output of show route longer-prefixes Command: Example
- Output of show route next-hop Command: Example
- Where to Go Next
- Additional References
Implementing and Monitoring RIB on Cisco IOS XR Software
Routing Information Base (RIB) is a distributed collection of information about routing connectivity among all nodes of a network. Each router maintains a RIB containing the routing information for that router. RIB stores the best routes from all routing protocols that are running on the system.
This module describes how to implement and monitor RIB on Cisco IOS XR network.
Note
For more information about RIB on the Cisco IOS XR software and complete descriptions of RIB commands listed in this module, see the Additional References section of this module. To locate documentation for other commands that might appear during the execution of a configuration task, search online in the Cisco IOS XR Commands Master List for the Cisco XR 12000 Series Router.
- Prerequisites for Implementing RIB
- Information About RIB Configuration
- How to Deploy and Monitor RIB
- Configuration Examples for RIB Monitoring
- Where to Go Next
- Additional References
Prerequisites for Implementing RIB
You must be in a user group associated with a task group that includes the proper task IDs. The command reference guides include the task IDs required for each command. If you suspect user group assignment is preventing you from using a command, contact your AAA administrator for assistance.
- RIB is distributed with the base Cisco IOS XR software; as such, it does not have any special requirements for installation. The following are the requirements for base software installation:
Information About RIB Configuration
To implement the Cisco RIB feature, you must understand the following concepts:
- Overview of RIB
- RIB Data Structures in BGP and Other Protocols
- RIB Administrative Distance
- RIB Support for IPv4 and IPv6
- RIB Statistics
- IPv6 Provider Edge IPv6 and IPv6 VPN Provider Edge Transport over MPLS
- RIB Quarantining
Overview of RIB
Each routing protocol selects its own set of best routes and installs those routes and their attributes in RIB. RIB stores these routes and selects the best ones from among all routing protocols. Those routes are downloaded to the line cards for use in forwarding packets. The acronym RIB is used both to refer to RIB processes and the collection of route data contained within RIB.
Within a protocol, routes are selected based on the metrics in use by that protocol. A protocol downloads its best routes (lowest or tied metric) to RIB. RIB selects the best overall route by comparing the administrative distance of the associated protocol.
RIB Data Structures in BGP and Other Protocols
RIB uses processes and maintains data structures distinct from other routing applications, such as Border Gateway Protocol (BGP) and other unicast routing protocols, or multicast protocols, such as Protocol Independent Multicast (PIM) or Multicast Source Discovery Protocol (MSDP). However, these routing protocols use internal data structures similar to what RIB uses, and may internally refer to the data structures as a RIB. For example, BGP routes are stored in the BGP RIB (BRIB), and multicast routes, computed by multicast routing protocols such as PIM and MSDP, are stored in the Multicast RIB (MRIB). RIB processes are not responsible for the BRIB and MRIB, which are handled by BGP and multicast processes, respectively.
The table used by the line cards and RP to forward packets is called the Forwarding Information Base (FIB). RIB processes do not build the FIBs. Instead, RIB downloads the set of selected best routes to the FIB processes, by the Bulk Content Downloader (BCDL) process, onto each line card. FIBs are then constructed.
RIB Administrative Distance
Forwarding is done based on the longest prefix match. If you are forwarding a packet destined to 10.0.2.1, you prefer 10.0.2.0/24 over 10.0.0.0/16 because the mask /24 is longer (and more specific) than a /16.
Routes from different protocols that have the same prefix and length are chosen based on administrative distance. For instance, the Open Shortest Path First (OSPF) protocol has an administrative distance of 110, and the Intermediate System-to-Intermediate System (IS-IS) protocol has an administrative distance of 115. If IS-IS and OSPF both download 10.0.1.0/24 to RIB, RIB would prefer the OSPF route because OSPF has a lower administrative distance. Administrative distance is used only to choose between multiple routes of the same length.
This table lists default administrative distances for the common protocols.
Table 1 Default Administrative DistancesProtocol
Administrative Distance Default
Connected or local routes
0
Static routes
1
External BGP routes
20
OSPF routes
110
IS-IS routes
115
Internal BGP routes
200
The administrative distance for some routing protocols (for instance IS-IS, OSPF, and BGP) can be changed. See the protocol-specific documentation for the proper method to change the administrative distance of that protocol.
Note
Changing the administrative distance of a protocol on some but not all routers can lead to routing loops and other undesirable behavior. Doing so is not recommended.
RIB Support for IPv4 and IPv6
In Cisco IOS XR software, RIB tables support multicast and unicast routing.
The default routing tables for Cisco IOS XR software RIB are the unicast and the multicast-unicast RIB tables for IPv4 and IPv6 routing, respectively. For multicast routing, routing protocols insert unicast routes into the multicast-unicast RIB table. Multicast protocols then use the information to build multicast routes (which in turn are stored in the MRIB). See the multicast documentation for more information on using and configuring multicast.
RIB processes ipv4_rib and ipv6_rib run on the RP card. If process placement functionality is available and supported by multiple RPs in the router, RIB processes can be placed on any available node.
RIB Statistics
RIB supports statistics for messages (requests) flowing between the RIB and its clients. Protocol clients send messages to the RIB (for example, route add, route delete, and next-hop register, and so on). RIB also sends messages (for example, redistribute routes, advertisements, next-hop notifications, and so on). These statistics are used to gather information about what messages have been sent and the number of messages that have been sent. These statistics provide counters for the various messages that flow between the RIB server and its clients. The statistics are displayed using the show rib statistics command.
RIB maintains counters for all requests sent from a client including:
Route operations
Table registrations
Next-hop registrations
Redistribution registrations
Attribute registrations
Synchronization completion
RIB also maintains counters for all requests sent by the RIB. The configuration will disable the RIB next-hop dampening feature. As a result, RIB notifies client immediately when a next hop that client registered for is resolved or unresolved.
RIB also maintains the results of the requests.
IPv6 Provider Edge IPv6 and IPv6 VPN Provider Edge Transport over MPLS
IPv6 Provider Edge (6PE) and IPv6 VPN Provider Edge (6VPE) leverages the existing Multiprotocol Label Switching (MPLS) IPv4 core infrastructure for IPv6 transport. 6PE and 6VPE enables IPv6 sites to communicate with each other over an MPLS IPv4 core network using MPLS label switched paths (LSPs).
RIB supports 6PE and 6VPE by providing 6VPE next hops. The next-hop information is stored in an opaque database in RIB, which is populated by protocol clients with data to be sent to the Forwarding Information Base (FIB).
For detailed information about configuring 6PE and 6VPE over MPLS, see Cisco IOS XR MPLS Configuration Guide for the Cisco XR 12000 Series Router.
RIB Quarantining
RIB quarantining solves the problem in the interaction between routing protocols and the RIB. The problem is a persistent oscillation between the RIB and routing protocols that occurs when a route is continuously inserted and then withdrawn from the RIB, resulting in a spike in CPU use until the problem is resolved. If there is no damping on the oscillation, then both the protocol process and the RIB process have high CPU use, affecting the rest of the system as well as blocking out other protocol and RIB operations. This problem occurs when a particular combination of routes is received and installed in the RIB. This problem typically happens as a result of a network misconfiguration. However, because the misconfiguration is across the network, it is not possible to detect the problem at configuration time on any single router.
The quarantining mechanism detects mutually recursive routes and quarantines the last route that completes the mutual recursion. The quarantined route is periodically evaluated to see if the mutual recursion has gone away. If the recursion still exists, the route remains quarantined. If the recursion has gone away, the route is released from its quarantine.
The following steps are used to quarantine a route:
RIB detects when a particular problematic path is installed.
RIB sends a notification to the protocol that installed the path.
When the protocol receives the quarantine notification about the problem route, it marks the route as being “quarantined.” If it is a BGP route, BGP does not advertise reachability for the route to its neighbors.
Periodically, RIB tests all its quarantined paths to see if they can now safely be installed (moved from quarantined to "Ok to use" state). A notification is sent to the protocol to indicate that the path is now safe to use.
How to Deploy and Monitor RIB
To deploy and monitor RIB, you must understand the following concepts:
- Verifying RIB Configuration Using the Routing Table
- Verifying Networking and Routing Problems
- Disabling RIB Next-hop Dampening
Verifying RIB Configuration Using the Routing Table
SUMMARY STEPSPerform this task to verify the RIB configuration to ensure that RIB is running on the RP and functioning properly by checking the routing table summary and details.
1. show route [ vrf { vrf-name | all }] [ afi-all | ipv4 | ipv6 ] [ unicast | multicast | safi-all ] summary [ detail ] [ standby ]
2. show route [ vrf { vrf-name | all }] [ afi-all | ipv4 | ipv6 ] [ unicast | multicast | safi-all ] [ protocol [ instance ] | ip-address mask ] [ standby ] [ detail ]
DETAILED STEPS
Command or Action Purpose Step 1 show route [ vrf { vrf-name | all }] [ afi-all | ipv4 | ipv6 ] [ unicast | multicast | safi-all ] summary [ detail ] [ standby ]
Example:RP/0/0/CPU0:router# show route summaryDisplays route summary information about the specified routing table.
Step 2 show route [ vrf { vrf-name | all }] [ afi-all | ipv4 | ipv6 ] [ unicast | multicast | safi-all ] [ protocol [ instance ] | ip-address mask ] [ standby ] [ detail ]
Example:RP/0/0/CPU0:router# show route ipv4 unicastDisplays more detailed route information about the specified routing table.
Verifying Networking and Routing Problems
SUMMARY STEPS1. show route [ vrf { vrf-name | all }] [ afi-all | ipv4 | ipv6 ] [ unicast | multicast | safi-all ] [ protocol [ instance ] | ip-address mask ] [ standby ] [ detail ]
2. show route [ vrf { vrf-name | all }] [ afi-all | ipv4 | ipv6 ] [ unicast | multicast | safi-all ] backup [ ip-address ] [ standby ]
3. sho w route [ vrf { vrf-name | all }] [ ipv4 | ipv6 ] [ unicast | multicast | safi-all ] best-local ip-address [ standby ]
4. sho w route [ vrf { vrf-name | all }] [ afi-all | ipv4 | ipv6 ] [ unicast | multicast | safi-all ] connected [ standby ]
5. show rout e [ vrf { vrf-name | all }] [ afi-all | ipv4 | ipv6 ] [ unicast | multicast | safi-all ] local [ interface ] [ standby ]
6. show route [ vrf { vrf-name | all }] [ ipv4 | ipv6 ] [ unicast | multicast | safi-all ] longer-prefixes { ip-address mask | ip-address / prefix-length } [ standby ]
7. show rou te [ vrf { vrf-name | all }] [ ipv4 | ipv6 ] [ unicast | multicast | safi-all ] next-hop ip-address [ standby ]
DETAILED STEPS
Command or Action Purpose Step 1 show route [ vrf { vrf-name | all }] [ afi-all | ipv4 | ipv6 ] [ unicast | multicast | safi-all ] [ protocol [ instance ] | ip-address mask ] [ standby ] [ detail ]
Example:RP/0/0/CPU0:router# show route list list1 bgp aspo ipv4 unicast 192.168.111/8Displays the current routes in RIB.
Step 2 show route [ vrf { vrf-name | all }] [ afi-all | ipv4 | ipv6 ] [ unicast | multicast | safi-all ] backup [ ip-address ] [ standby ]
Example:RP/0/0/CPU0:router# show route ipv4 unicast backup 192.168.111/8Displays backup routes in RIB.
Step 3 sho w route [ vrf { vrf-name | all }] [ ipv4 | ipv6 ] [ unicast | multicast | safi-all ] best-local ip-address [ standby ]
Example:RP/0/0/CPU0:router# show route ipv4 unicast best-local 192.168.111/8Displays the best-local address to use for return packets from the given destination.
Step 4 sho w route [ vrf { vrf-name | all }] [ afi-all | ipv4 | ipv6 ] [ unicast | multicast | safi-all ] connected [ standby ]
Example:RP/0/0/CPU0:router# show route ipv4 unicast connectedDisplays the current connected routes of the routing table.
Step 5 show rout e [ vrf { vrf-name | all }] [ afi-all | ipv4 | ipv6 ] [ unicast | multicast | safi-all ] local [ interface ] [ standby ]
Example:RP/0/0/CPU0:router# show route ipv4 unicast localDisplays local routes for receive entries in the routing table.
Step 6 show route [ vrf { vrf-name | all }] [ ipv4 | ipv6 ] [ unicast | multicast | safi-all ] longer-prefixes { ip-address mask | ip-address / prefix-length } [ standby ]
Example:RP/0/0/CPU0:router# show route ipv4 unicast 192.168. 111/8 longer-prefixesDisplays the current routes in RIB that share a given number of bits with a given network.
Step 7 show rou te [ vrf { vrf-name | all }] [ ipv4 | ipv6 ] [ unicast | multicast | safi-all ] next-hop ip-address [ standby ]
Example:RP/0/0/CPU0:router# show route ipv4 unicast next-hop 192.168.1.34Displays the next-hop gateway or host to a destination address.
Disabling RIB Next-hop Dampening
SUMMARY STEPS2. address-family { ipv4 | ipv6 } next-hop dampening disable
DETAILED STEPSConfiguration Examples for RIB Monitoring
RIB is not configured separately for the Cisco IOS XR system. RIB computes connectivity of the router with other nodes in the network based on input from the routing protocols. RIB may be used to monitor and troubleshoot the connections between RIB and its clients, but it is essentially used to monitor routing connectivity between the nodes in a network. This section contains displays from the show commands used to monitor that activity.
- Output of show route Command: Example
- Output of show route backup Command: Example
- Output of show route best-local Command: Example
- Output of show route connected Command: Example
- Output of show route local Command: Example
- Output of show route longer-prefixes Command: Example
- Output of show route next-hop Command: Example
Output of show route Command: Example
The following is sample output from the show route command when entered without an address:
RP/0/0/CPU0:router# show route Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - ISIS, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, su - IS-IS summary null, * - candidate default U - per-user static route, o - ODR, L - local Gateway of last resort is 172.23.54.1 to network 0.0.0.0 C 10.2.210.0/24 is directly connected, 1d21h, Ethernet0/1/0/0 L 10.2.210.221/32 is directly connected, 1d21h, Ethernet0/1/1/0 C 172.20.16.0/24 is directly connected, 1d21h, ATM4/0.1 L 172.20.16.1/32 is directly connected, 1d21h, ATM4/0.1 C 10.6.100.0/24 is directly connected, 1d21h, Loopback1 L 10.6.200.21/32 is directly connected, 1d21h, Loopback0 S 192.168.40.0/24 [1/0] via 172.20.16.6, 1d21hOutput of show route backup Command: Example
The following is sample output from the show route backup command:
RP/0/0/CPU0:router# show route backup Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - ISIS, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, su - IS-IS summary null, * - candidate default U - per-user static route, o - ODR, L - local S 172.73.51.0/24 is directly connected, 2d20h, GigabitEthernet 4/0/0/1 Backup O E2 [110/1] via 10.12.12.2, GigabitEthernet 3/0/0/1Output of show route best-local Command: Example
The following is sample output from the show route best-local command:
RP/0/0/CPU0:router# show route best-local 10.12.12.1 Routing entry for 10.12.12.1/32 Known via "local", distance 0, metric 0 (connected) Routing Descriptor Blocks 10.12.12.1 directly connected, via GigabitEthernet3/0 Route metric is 0Output of show route local Command: Example
The following is sample output from the show route local command:
RP/0/0/CPU0:router# show route local L 10.10.10.1/32 is directly connected, 00:14:36, Loopback0 L 10.91.36.98/32 is directly connected, 00:14:32, Ethernet0/0 L 172.22.12.1/32 is directly connected, 00:13:35, GigabitEthernet3/0 L 192.168.20.2/32 is directly connected, 00:13:27, GigabitEthernet2/0 L 10.254.254.1/32 is directly connected, 00:13:26, GigabitEthernet2/2Output of show route longer-prefixes Command: Example
The following is sample output from the show route longer-prefixes command:
RP/0/0/CPU0:router# show route ipv4 longer-prefixes 172.16.0.0/8 longer-prefixes Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP O - OSPF, IA - OSPF inter area, N1 - OSPF NSSA external type 1 N2 - OSPF NSSA external type 2, E1 - OSPF external type 1 E2 - OSPF external type 2, E - EGP, i - ISIS, L1 - IS-IS level-1 L2 - IS-IS level-2, ia - IS-IS inter area su - IS-IS summary null, * - candidate default U - per-user static route, o - ODR, L - local Gateway of last resort is 172.23.54.1 to network 0.0.0.0 S 172.16.2.0/32 is directly connected, 00:00:24, Loopback0 S 172.16.3.0/32 is directly connected, 00:00:24, Loopback0 S 172.16.4.0/32 is directly connected, 00:00:24, Loopback0 S 172.16.5.0/32 is directly connected, 00:00:24, Loopback0 S 172.16.6.0/32 is directly connected, 00:00:24, Loopback0 S 172.16.7.0/32 is directly connected, 00:00:24, Loopback0 S 172.16.8.0/32 is directly connected, 00:00:24, Loopback0 S 172.16.9.0/32 is directly connected, 00:00:24, Loopback0Output of show route next-hop Command: Example
The following is sample output from the show route resolving-next-hop command:
RP/0/0/CPU0:router# show route resolving-next-hop 10.0.0.1 Nexthop matches 0.0.0.0/0 Known via "static", distance 200, metric 0, candidate default path Installed Aug 18 00:59:04.448 Directly connected nexthops 172.29.52.1, via MgmtEth0/ RP0 0/CPU0/0 Route metric is 0 172.29.52.1, via MgmtEth0/RP1/CPU0/0 Route metric is 0Where to Go Next
For additional information on the protocols that interact with RIB, you may want to see the following publications:
Implementing MPLS Layer 3 VPNs in Cisco IOS XR MPLS Configuration Guide for the Cisco XR 12000 Series Router
Implementing BGP on Cisco IOS XR Software in Cisco IOS XR Routing Configuration Guide for the Cisco XR 12000 Series Router
Implementing EIGRP on Cisco IOS XR Software in Cisco IOS XR Routing Configuration Guide for the Cisco XR 12000 Series Router
Implementing IS-IS on Cisco IOS XR Software in Cisco IOS XR Routing Configuration Guide for the Cisco XR 12000 Series Router
Implementing OSPF on Cisco IOS XR Software in Cisco IOS XR Routing Configuration Guide for the Cisco XR 12000 Series Router
Implementing RIP on Cisco IOS XR Software in Cisco IOS XR Routing Configuration Guide for the Cisco XR 12000 Series Router
RIB Commands on Cisco IOS XR Software in Cisco IOS XR Routing Command Reference for the Cisco XR 12000 Series Router
Additional References
Related Documents
Related Topic
Document Title
OSPF and OSPFv3 commands: complete command syntax, command modes, command history, defaults, usage guidelines, and examples
Cisco IOS XR Routing Command Reference for the Cisco XR 12000 Series Router MPLS TE feature information
Implementing MPLS Traffic Engineering on Cisco IOS XR Softwaremodule in Cisco IOS XR MPLS Configuration Guide for the Cisco XR 12000 Series Router
Standards
Standards
Title
draft-ietf-ospf-multi-area-adj-07.txt
OSPF Multi-Area Adjacency
draft-ietf-pce-disco-proto-ospf-08.txt
OSPF Protocol Extensions for Path Computation Element (PCE)
draft-ietf-mpls-igp-sync-00.txt
LDP IGP Synchronization
draft-ietf-ospf-ospfv3-graceful-restart-07.txt
OSPFv3 Graceful Restart
MIBs
MIBs
MIBs Link
— To locate and download MIBs using Cisco IOS XR software, use the Cisco MIB Locator found at the following URL and choose a platform under the Cisco Access Products menu: http://cisco.com/public/sw-center/netmgmt/cmtk/mibs.shtml
RFCs
RFCs
Title
RFC 1587
The OSPF NSSA Option
RFC 1793
Extending OSPF to Support Demand Circuits
RFC 2328
OSPF Version 2
RFC 2370
The OSPF Opaque LSA Option
RFC 2740
OSPF for IPv6
RFC 3101
The OSPF Not-So-Stubby Area (NSSA) Option
RFC 3137
OSPF Stub Router Advertisement
RFC 3509
Alternative Implementations of OSPF Area Border Routers
RFC 3623
Graceful OSPF Restart
RFC 3630
Traffic Engineering (TE) Extensions to OSPF Version 2
RFC 3682
The Generalized TTL Security Mechanism (GTSM)
RFC 3906
Calculating Interior Gateway Protocol (IGP) Routes Over Traffic Engineering Tunnels
RFC 4136
OSPF Refresh and Flooding Reduction in Stable Topologies
RFC 4206
Label Switched Paths (LSP) Hierarchy with Generalized Multi-Protocol Label Switching (GMPLS) Traffic Engineering (TE)
RFC 4124
Protocol Extensions for Support of Diffserv-aware MPLS Traffic Engineering
RFC 4576
Using a Link State Advertisement (LSA) Options Bit to Prevent Looping in BGP/MPLS IP Virtual Private Networks (VPNs) ownbit Extension for L3VPN
RFC 4577
OSPF as the Provider/Customer Edge Protocol for BGP/MPLS IP Virtual Private Networks (VPNs)
RFC 4750
OSPF Version 2 Management Information Base
RFC 4811
OSPF Out-of-Band Link State Database (LSDB) Resynchronization
RFC 4812
OSPF Restart Signaling
RFC 4813
OSPF Link-Local Signaling
RFC 4970
Extensions to OSPF for Advertising Optional Router Capabilities