Thursday, December 27, 2012

RIB, FIB, LFIB, LIB etc

It can be quite confusing to work out what all these terms are exactly referring to. I’ll try and put a concise answer for all of them here with an example.
RIB – Routing Information Base
This is the route table. i.e. When you do a show ip route, the RIB is what you see
AR1#sh ip 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
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     10.0.0.0/32 is subnetted, 1 subnets
C       10.255.255.5 is directly connected, Loopback0
A router may have many separate RIB’s. If you’re running vrf’s with customer, then each vrf will have a separate RIB:
AR1#sh ip route vrf CUS1 | begin Gateway
Gateway of last resort is not set

C    192.168.1.0/24 is directly connected, FastEthernet0/0

AR1#sh ip route vrf CUS2 | begin Gateway
Gateway of last resort is not set

     172.16.0.0/24 is subnetted, 1 subnets
C       172.16.1.0 is directly connected, FastEthernet2/0
FIB – Forwarding Information Base
The FIB is an optimised version of the RIB. Or more correctly it’s the table a router looks at when deciding where to actually forward traffic. In Cisco land, the CEF table is a FIB.
AR1#sh ip cef
Prefix              Next Hop             Interface
0.0.0.0/0           drop                 Null0 (default route handler entry)
0.0.0.0/8           drop
0.0.0.0/32          receive
10.255.255.5/32     receive
127.0.0.0/8         drop
224.0.0.0/4         drop
224.0.0.0/24        receive
240.0.0.0/4         drop
255.255.255.255/32  receive
Like the RIB, there can be multiple FIB tables on a router:
AR1#sh ip cef vrf CUS1
Prefix              Next Hop             Interface
0.0.0.0/0           drop                 Null0 (default route handler entry)
0.0.0.0/32          receive
192.168.1.0/24      attached             FastEthernet0/0
192.168.1.0/32      receive
192.168.1.1/32      receive
192.168.1.255/32    receive
224.0.0.0/24        receive
255.255.255.255/32  receive

AR1#sh ip cef vrf CUS2
Prefix              Next Hop             Interface
0.0.0.0/0           drop                 Null0 (default route handler entry)
0.0.0.0/32          receive
172.16.1.0/24       attached             FastEthernet2/0
172.16.1.0/32       receive
172.16.1.1/32       receive
172.16.1.255/32     receive
224.0.0.0/24        receive
255.255.255.255/32  receive
LIB – Label Information Base
The LIB is an MPLS table. This is the place where the router will keep all known MPLS labels. To take a look, you just need to use show mpls ldp bindings:
AR1#sh mpls ldp bindings
  tib entry: 10.0.0.0/30, rev 18
        local binding:  tag: 21
        remote binding: tsr: 10.255.255.1:0, tag: imp-null
        remote binding: tsr: 10.255.255.2:0, tag: imp-null
  tib entry: 10.0.0.4/30, rev 16
        local binding:  tag: 20
        remote binding: tsr: 10.255.255.1:0, tag: 32
        remote binding: tsr: 10.255.255.2:0, tag: imp-null
  tib entry: 10.0.0.8/30, rev 44
        local binding:  tag: 34
        remote binding: tsr: 10.255.255.1:0, tag: 31
        remote binding: tsr: 10.255.255.2:0, tag: 32
  tib entry: 10.0.0.12/30, rev 42
        local binding:  tag: 33
        remote binding: tsr: 10.255.255.1:0, tag: imp-null
        remote binding: tsr: 10.255.255.2:0, tag: 31
  tib entry: 10.1.0.0/30, rev 5
        local binding:  tag: imp-null
        remote binding: tsr: 10.255.255.1:0, tag: imp-null
        remote binding: tsr: 10.255.255.2:0, tag: 30
  tib entry: 10.2.0.0/30, rev 4
        local binding:  tag: imp-null
        remote binding: tsr: 10.255.255.1:0, tag: 30
        remote binding: tsr: 10.255.255.2:0, tag: imp-null
  tib entry: 10.7.0.0/30, rev 36
        local binding:  tag: 30
        remote binding: tsr: 10.255.255.1:0, tag: 25
        remote binding: tsr: 10.255.255.2:0, tag: 26
  tib entry: 10.8.0.0/30, rev 34
        local binding:  tag: 29
        remote binding: tsr: 10.255.255.1:0, tag: imp-null
        remote binding: tsr: 10.255.255.2:0, tag: 25
  tib entry: 10.255.255.1/32, rev 30
        local binding:  tag: 27
        remote binding: tsr: 10.255.255.1:0, tag: imp-null
        remote binding: tsr: 10.255.255.2:0, tag: 23
  tib entry: 10.255.255.2/32, rev 10
        local binding:  tag: 17
        remote binding: tsr: 10.255.255.1:0, tag: 23
        remote binding: tsr: 10.255.255.2:0, tag: imp-null
  tib entry: 10.255.255.3/32, rev 28
        local binding:  tag: 26
        remote binding: tsr: 10.255.255.1:0, tag: 22
        remote binding: tsr: 10.255.255.2:0, tag: 22
  tib entry: 10.255.255.4/32, rev 26
        local binding:  tag: 25
        remote binding: tsr: 10.255.255.1:0, tag: 21
        remote binding: tsr: 10.255.255.2:0, tag: 21
  tib entry: 10.255.255.5/32, rev 6
        local binding:  tag: imp-null
        remote binding: tsr: 10.255.255.1:0, tag: 20
        remote binding: tsr: 10.255.255.2:0, tag: 20
  tib entry: 10.255.255.7/32, rev 24
        local binding:  tag: 24
        remote binding: tsr: 10.255.255.1:0, tag: 18
        remote binding: tsr: 10.255.255.2:0, tag: 18
AR1#
LFIB – Label Forwarding Instance Base
The LFIB is another MPLS table. This is the table that the router uses to forward labelled packets going through the network. Much like the RIB uses the FIB to forward traffic, so the LIB uses the LFIB to forward traffic. This is how you view it:
AR1#sh mpls forwarding-table
Local  Outgoing    Prefix            Bytes tag  Outgoing   Next Hop
tag    tag or VC   or Tunnel Id      switched   interface
17     Pop tag     10.255.255.2/32   0          Se1/2      point2point
20     Pop tag     10.0.0.4/30       0          Se1/2      point2point
21     Pop tag     10.0.0.0/30       0          Se1/2      point2point
       Pop tag     10.0.0.0/30       0          Se1/0      point2point
24     18          10.255.255.7/32   0          Se1/0      point2point
25     21          10.255.255.4/32   0          Se1/2      point2point
26     22          10.255.255.3/32   0          Se1/0      point2point
27     Pop tag     10.255.255.1/32   0          Se1/0      point2point
29     Pop tag     10.8.0.0/30       0          Se1/0      point2point
30     25          10.7.0.0/30       0          Se1/0      point2point
33     Pop tag     10.0.0.12/30      0          Se1/0      point2point
34     32          10.0.0.8/30       0          Se1/2      point2point
       31          10.0.0.8/30       0          Se1/0 
Related Posts Plugin for WordPress, Blogger...