RIB, FIB, CEF, adjacency tables

dppagcdppagc Member Posts: 293
Correct me if I am wrong:

RIB-> possible routing routes
FIB -> parsed from RIB
CEF -> good info from FIB
adjacency tables ???

Comments

  • EdTheLadEdTheLad Member Posts: 2,111 ■■■■□□□□□□
    The RIB hold all known routes learned from the various routing protocols including static or connected. These routes appear as learned i.e. with the next-hop that was provided by the routing protocol which means the route could be recursive.
    The FIB holds has all routes from the RIB but it holds the results of the recursive lookup against destination ip address and points to the exit interface.
    The adjacency table holds the L2 info for all directly connected neighbors i.e. the mac address of directly connected device.
    CEF uses both the FIB and ADJ table to create header that can be pushed onto frames quickly as they get forwarding through the router. Rather than the router performing a recursive lookup, finding the exit interface, checking the arp cache of exit interface for remote mac etc, packet arrives for destination and gets the cef destination header added.
    Networking, sometimes i love it, mostly i hate it.Its all about the $$$$
  • james43026james43026 Member Posts: 303 ■■□□□□□□□□
    RIB = Routing table.
    FIB = a tree like structure built for hardware (not the CPU) to parse through to match IP addresses, and determine next hop address and exit interface.
    Adjacency table = information that the FIB points to in order to determine next hop MAC info
    CEF = FIB + Adjacency table
  • linuxabuserlinuxabuser Member Posts: 97 ■■□□□□□□□□
    When you run show ip cef you'll see routes from all VRFs. A show ip route​ is per-vrf.
  • fredrikjjfredrikjj Member Posts: 879
    When you run show ip cef you'll see routes from all VRFs. A show ip route​ is per-vrf.
    That's not true. This is a router that I'm working with at the moment:
    R2#show ip cef
    Prefix               Next Hop             Interface
    0.0.0.0/0            no route
    0.0.0.0/8            drop
    0.0.0.0/32           receive              
    10.1.23.0/24         attached             GigabitEthernet0/2
    10.1.23.0/32         receive              GigabitEthernet0/2
    10.1.23.2/32         receive              GigabitEthernet0/2
    10.1.23.3/32         attached             GigabitEthernet0/2
    10.1.23.255/32       receive              GigabitEthernet0/2
    10.1.24.0/24         attached             GigabitEthernet0/3
    10.1.24.0/32         receive              GigabitEthernet0/3
    10.1.24.2/32         receive              GigabitEthernet0/3
    10.1.24.4/32         attached             GigabitEthernet0/3
    10.1.24.255/32       receive              GigabitEthernet0/3
    10.1.35.0/24         10.1.23.3            GigabitEthernet0/2
    10.1.45.0/24         10.1.24.4            GigabitEthernet0/3
    127.0.0.0/8          drop
    192.168.1.2/32       receive              Loopback0
    192.168.1.3/32       10.1.23.3            GigabitEthernet0/2
    192.168.1.4/32       10.1.24.4            GigabitEthernet0/3
    192.168.1.5/32       192.168.1.5          Tunnel3
                         192.168.1.5          Tunnel4
    Prefix               Next Hop             Interface
    224.0.0.0/4          drop
    224.0.0.0/24         receive              
    240.0.0.0/4          drop
    255.255.255.255/32   receive              
    R2#show ip cef vrf CUST_A
    Prefix               Next Hop             Interface
    0.0.0.0/0            no route
    0.0.0.0/8            drop
    0.0.0.0/32           receive              
    10.1.12.0/24         attached             GigabitEthernet0/1
    10.1.12.0/32         receive              GigabitEthernet0/1
    10.1.12.1/32         attached             GigabitEthernet0/1
    10.1.12.2/32         receive              GigabitEthernet0/1
    10.1.12.255/32       receive              GigabitEthernet0/1
    127.0.0.0/8          drop
    192.168.1.1/32       10.1.12.1            GigabitEthernet0/1
    192.168.1.6/32       192.168.1.5          Tunnel3
                         192.168.1.5          Tunnel4
    224.0.0.0/4          drop
    224.0.0.0/24         receive              
    240.0.0.0/4          drop
    255.255.255.255/32   receive              
    

    As you can see, only the global table is shown with show ip cef and you need to specify the VRF if you want to show that information.
  • linuxabuserlinuxabuser Member Posts: 97 ■■□□□□□□□□
    I'll be damned. Learn something every day. I even looked at a lab router I have before I posted, but I didn't look carefully enough.
Sign In or Register to comment.