Routing Configuration Guide for Cisco 8000 Series Routers, Cisco IOS XR Releases

PDF

Routing Configuration Guide for Cisco 8000 Series Routers, Cisco IOS XR Releases

RIB key concepts

Want to summarize with AI?

Log in

Explains key RIB concepts, including route selection, protocol data structures, administrative distance, IPv4 support, statistics, quarantining, and route consistency checking.


This topic provides the necessary conceptual background to implement the Cisco RIB feature effectively within a network environment.


How RIB stores and selects routes

Each routing protocol selects its own best routes and installs those routes, along with their attributes, in RIB. RIB stores routes from all routing protocols and selects the best routes from among them. After RIB selects the best routes, it downloads them to the line cards for packet forwarding. The term RIB refers both to the RIB processes and to the collection of route data that RIB contains.

Within a routing protocol, route selection depends on the metric that the protocol uses. A protocol downloads its best routes, including routes with the lowest metric or tied metric, to RIB.

RIB selects the best overall route by comparing the administrative distance of the associated routing protocol.


RIB data structures in BGP and other protocols

This topic explains how RIB manages data structures independently of other routing protocols and how it interacts with the Forwarding Information Base (FIB).

RIB and protocol-specific data structures

RIB uses processes and maintains data structures that are distinct from those used by other routing applications, such as Border Gateway Protocol (BGP) and other unicast routing protocols.

These routing protocols can use internal data structures that are similar to those used by RIB, and they can refer to those internal data structures as a RIB.

For example, BGP routes are stored in the BGP RIB (BRIB). RIB processes are not responsible for the BRIB. BGP manages the BRIB.

RIB and forwarding tables

The table that the line cards and route processor (RP) use to forward packets is called the Forwarding Information Base (FIB).

RIB processes do not build the FIBs. Instead, RIB sends the selected best routes to the FIB processes through the Bulk Content Downloader (BCDL) process on each line card.

After the routes are downloaded, the FIBs are constructed.


RIB administrative distance

This topic explains the role of administrative distance in route selection and provides the default values for common routing protocols.

How RIB uses longest prefix match

Packet forwarding uses the longest prefix match.

For example, if a packet is destined for 10.0.2.1, the route 10.0.2.0/24 is preferred over 10.0.0.0/16 because the /24 prefix is longer and more specific than the /16 prefix.

How RIB uses administrative distance

When routes from different protocols have the same prefix and prefix length, RIB selects the route by using administrative distance.

For example, Open Shortest Path First (OSPF) has a default administrative distance of 110, and Intermediate System-to-Intermediate System (IS-IS) has a default administrative distance of 115. If OSPF and IS-IS both download 10.0.1.0/24 to RIB, RIB prefers the OSPF route because OSPF has the lower administrative distance.

Administrative distance is used only to choose between multiple routes that have the same prefix length.

Table 1. Default administrative distances

Protocol

Default administrative distance

Connected or local routes

0

Static routes

1

External BGP routes

20

OSPF routes

110

IS-IS routes

115

Internal BGP routes

200

Changing administrative distance

You can change the administrative distance for some routing protocols, such as IS-IS, OSPF, and BGP. See the protocol-specific documentation for the correct procedure.

Note

Changing the administrative distance of a protocol on some routers but not on all routers can cause routing loops and other undesirable behavior. This practice is not recommended.


RIB support for IPv4

This topic provides an overview of IPv4 unicast routing support in the RIB and details the process placement functionality for the RIB manager.

IPv4 routing-table support

In Cisco IOS XR software, RIB tables support unicast routing.

The default routing tables for Cisco IOS XR software RIB are the unicast RIB tables for IPv4 routing.

RIB process placement

The rib_mgr RIB process runs on the route processor (RP) card.

If process placement functionality is available and the router supports multiple RPs, RIB processes can be placed on any available node.


RIB statistics

Use this reference to understand the message counters and request results that RIB maintains for client interactions.

RIB message statistics

RIB supports statistics for messages, or requests, that flow between RIB and its clients.

Protocol clients send messages to RIB, such as route add, route delete, and next-hop registration requests. RIB also sends messages such as redistributed routes, advertisements, and next-hop notifications.

These statistics show what messages were sent and how many messages were sent between the RIB server and its clients.

Use the show rib statistics command to display these statistics.

Client request counters

RIB maintains counters for all requests that clients send, including these request types:

  • Route operations

  • Table registrations

  • Next-hop registrations

  • Redistribution registrations

  • Attribute registrations

  • Synchronization completion

RIB request counters and results

RIB also maintains counters for requests that RIB sends to its clients.

When RIB next-hop dampening is disabled, RIB immediately notifies a client when a registered next hop becomes resolved or unresolved.

RIB also maintains the results of these requests.


RIB quarantining

RIB quarantining is a protection mechanism that

  • detects problematic route oscillation between routing protocols and RIB

  • quarantines routes that create mutual recursion, and

  • reduces CPU impact while the routing condition is being resolved.

Why RIB quarantining is needed

RIB quarantining addresses a persistent oscillation between routing protocols and RIB. This oscillation occurs when a route is repeatedly inserted into and withdrawn from RIB.

If the oscillation is not dampened, both the protocol process and the RIB process can experience high CPU use. This condition can affect the rest of the system and can block other protocol and RIB operations.

This behavior usually occurs when a specific combination of routes is received and installed in RIB. It typically results from a network misconfiguration that spans the network and cannot be detected on a single router during configuration.

How RIB quarantining works

The quarantining mechanism detects mutually recursive routes and quarantines the last route that completes the mutual recursion.

RIB periodically reevaluates the quarantined route to determine whether the mutual recursion still exists. If the recursion remains, the route stays quarantined. If the recursion is gone, the route is released from quarantine.

What happens during quarantine

  1. RIB detects when a problematic path is installed.

  2. RIB notifies the protocol that installed the path.

  3. The protocol marks the route as quarantined. If the route is a Border Gateway Protocol (BGP) route, BGP does not advertise reachability for that route to its neighbors.

  4. RIB periodically tests quarantined paths to determine whether they can be safely installed.

  5. RIB notifies the protocol when the path is safe to use again.