Routing Information Base
A router’s memory contains the Routing Information Base (RIB), a fundamental, all-inclusive database that acts as the “brain” or primary intelligence of network routing. It is an essential data structure that houses all of the known routing data required for managing and choosing routes.
While the terms are frequently used interchangeably, the routing table usually refers to the current routes chosen for packet forwarding from the RIB, and the RIB is the full conceptual database of all routing information.
You can also read Computer Network Security Measures: Protect Your Network
Core Function and Operation
The RIB handles decision-making instead of handling fast packets, and it functions fully inside the router’s Control Plane. Its main job is to collect routes, figure out the best way to get to each place, and then get that best information ready for the data plane.
- Route Collection: From a variety of the RIB gathers possible routes:
- Directly Connected Routes: When a router interface is in use, directly connected routes are automatically added.
- Static Routes (S): Administrators manually configure them.
- Dynamic Routes (e.g., OSPF, BGP, IS-IS): Dynamic routes, such as OSPF, BGP, and IS-IS, are automatically learned by routing protocols.
- Path Selection: Next, each routing protocol determines which routes are the best for it and adds them to the RIB along with their properties. The single optimal overall route for each destination is then determined by the RIB using a hierarchical selection process:
- Administrative Distance (AD): The RIB compares the Administrative Distance (AD) of the related protocols in order to determine the optimal path. AD is a number that rates the reliability a lower number indicates greater trustworthiness. A Static route (AD 1), for instance, is better than an OSPF route (AD 110).
- Protocol Metrics: In the event that two routes share an AD, the router selects the path with the lowest protocol-defined metric (cost).
- Longest Prefix Match: When forwarding packets, the router always favors the route with the longest subnet mask.
RIB Data Components
Important details necessary for path evaluation and forwarding are usually included in each RIB entry:
- Destination Prefix: The subnet mask and network address are the destination prefixes.
- Next Hop: The next router’s IP address on the way to the destination.
- Outgoing Interface: The actual port via which the destination is reached.
- Metric/Distance: A value that is utilized in its protocol to rank the cost or preference of the route.
- Administrative Distance: The number that indicates how reliable the route.
You can also read What Is Data Encapsulation In Networking & De-Encapsulation
Distinction from the Forwarding Information Base (FIB)
There are key differences between the Forwarding Information Base (FIB) and the RIB:
| Feature | Routing Information Base (RIB) | Forwarding Information Base (FIB) |
| Common Name | IP Routing Table | Forwarding Table (e.g., CEF Table) |
| Operational Plane | Control Plane (CPU-based) | Data Plane (Hardware/ASIC-based) |
| Primary Purpose | To build a map of the network and select the best path. | To forward packets as fast as possible to the correct interface. |
| Contents | All learned routes (OSPF, BGP, Static) and their attributes (Metrics, Admin Distance). | Only the best paths; pre-resolved next-hop and Layer 2 info. |
| Speed/Optimization | Optimized for complex logic and protocol updates. | Optimized for hardware-speed lookups and high-speed switching. |
| Dependency | Built by routing protocols. | Derived directly from the RIB. |
| Storage Medium | System RAM | Specialized hardware like TCAM (Cisco). |
| CLI Command | show ip route | show ip cef (on Cisco devices) |
Following the RIB’s selection of the best route, the optimized FIB which is utilized for quick packet forwarding is created by downloading that subset of routes to the line cards.
Monitoring and Management
Several aspects of RIB management and integrity maintenance, especially in Cisco setups, are described:
- Consistency Checking: Verifying consistency between the RIB (control plane) and the FIB (data plane) is done with the help of the Route Consistency Checker (RCC). On-demand (instantaneous, one-time scan) or background (programmed to run at predetermined intervals) RCC/LCC (Label Consistency Checker) scans are both possible.
- Quarantining: Quarantining is a method that detects recurring oscillations between the RIB and routing protocols. These oscillations can cause CPU consumption to spike and are frequently caused by mutually recursive routes that result from network misconfiguration. The route is quarantined once the RIB identifies the faulty path, alerts the protocol, and tests it periodically to determine whether it can be securely reinstalled.
- Verification Commands: To examine information about connected, local, backup, or next-hop routes stored in the RIB and confirm the RIB configuration, network engineers utilize commands such as show route.
You can also read How Data Flows Through The OSI Model And It’s Importance
