Forwarding Information Base
The Forwarding Information Base (FIB) is an optimized, high-speed lookup table used by routers and Layer 3 switches to make quick, destination IP address-based data plane forwarding decisions. FIB is a crucial data structure that lets devices transport traffic at line speed.
Speed is the FIB’s primary goal. Routers may forward millions of packets per second without having to do intricate routing calculations for each packet thanks to the FIB, which reduces the strain on the main CPU by pre-calculating forwarding decisions and storing them in an optimized structure.
You can also read Computer Network Security Measures: Protect Your Network
How it Works:
- RIB Populates FIB: FIB is populated by the RIB, which is created by routing protocols. The router then chooses the optimal routes and sends them to the FIB.
- Packet Arrives: A packet enters the forwarding engine.
- FIB Lookup: The engine uses the packet’s destination IP to quickly look for the packet in the FIB.
- Forwarding Action: The packet is forwarded to the subsequent hop via the appropriate interface based on the FIB entry.
How the FIB is Constructed
- Route Discovery (Control Plane): The router’s main CPU is used for route discovery (control plane), where routing protocols such as OSPF and BGP exchange data and discover every path that could be taken.
- RIB Population (Control Plane): All routes that are found are kept in the extensive Routing Information Base (RIB) (Control Plane).
- Best Path Selection (Control Plane): The Control Plane chooses the best, loop-free path for every destination prefix based on metrics and administrative distance.
- FIB Installation (Data Plane): The FIB, which is housed in the Data Plane hardware, receives the optimized, streamlined routes and downloads them for instantaneous, fast access.
Millions of packets are forwarded each second by current routers due to the FIB’s efficiency, particularly its usage of specialized hardware for the longest prefix match.
You can also read Importance Of Computer Network Security Protect Your Data
FIB vs. Routing Information Base (RIB)
Although they are different, the Routing Information Base (RIB), usually referred to as the standard routing table, is closely connected to the FIB.
- Role and Purpose: Functioning in the control plane, the RIB’s role is to store all known routes, including backup paths, metrics, and policies. Routing protocols have optimized the RIB to update efficiently. The best, active routes (also known as “winner routes”) required for forwarding are the only ones included in the FIB, which is a condensed, optimized form of the RIB that functions in the data plane. The FIB carries out the forwarding, while the RIB determines the optimal path.
- Structure and Speed: The FIB is designed to be as fast as possible. It is frequently implemented using very efficient, specialized data structures like hash tables or attempts, or it is stored in specialist hardware like Ternary Content-Addressable Memory (TCAM). Unlike RIB, which is usually stored in ordinary memory, this enables ultra-fast lookups, commonly measured in nanoseconds.
- Synchronization: The winning routes are chosen and instantly downloaded into the FIB when the RIB is changed by routing protocols (such as OSPF or BGP) to guarantee that the forwarding table reflects the most recent topology.
Key Components of a FIB Entry
Every FIB entry is simplified for quick forwarding and usually includes:
- Destination Prefix: The IP network address and subnet mask (such as 192.168.1.0/24) that are used for the Longest Prefix Match (LPM) lookup are known as the destination prefix.
- Next-Hop Address: The IP address of the router or device that comes after it in the route.
- Outgoing Interface: The particular logical or physical port that the packet should leave the device via.
- Adjacency Information (Layer 2 Rewrite): Importantly, the FIB frequently contains or refers to the required Layer 2 encapsulation information (e.g., the next-hop MAC address, or “MAC rewrite”). By doing this, the device may instantly generate the frame header of the outgoing packet, removing the need for further lookups (such as those in the ARP cache) and significantly accelerating processing.
Cisco Express Forwarding (CEF)
A key element of Cisco Express Forwarding (CEF), a cutting-edge Layer 3 IP switching technology, in Cisco networking is the FIB.
Two key synchronized data structures are used by CEF for high-performance forwarding:
- The FIB: By storing the optimized routing data (prefixes and next-hop pointers), the FIB finds the next packet destination.
- The Adjacency Table: All FIB entries’ Layer 2 information is stored in the Adjacency Table, which also decides how to encapsulate the packet (the MAC header rewriting) for the subsequent hop.
The FIB provides constant and steady performance by removing the inefficiencies of earlier demand-caching techniques (such as rapid switching), which necessitated route cache maintenance and avoided “cache thrash” during dynamic network changes. This is because the FIB contains all known routes produced from the RIB. The show ip cef or show ip fib commands can be used to display the FIB details and global CEF status.
Analogy
The Forwarding Information Base (FIB), if the Routing Information Base (RIB) is a map book with all the roads, historical routes, and traffic laws, is the GPS navigation guide. The router can act rapidly without requiring complicated calculations since the FIB is cleared of any extraneous information and concentrates exclusively on the one, fastest, and best-chosen path to the target.
