Thanks Nayman!!
Below is the awesome response from Nayman , so everyone can learn:
I understand you're looking for hierarchical FIB. the knob preserve-nexthop-hierarchy will give you this functionality.
for each nexthop in the RIB you will have either unicast/unilist/composite and sometimes another layer of unilist and composite.
Without this feature, the FIB will be flattened means next-hop chain (just the direct/unicast nexthop) won't be copied as well as weight value will be flattened.
Try with and without this knob and check the forwarding table difference (don't forget to use extensive)
RIB with new expanded-nh: show route 1.1.1.1 extensive expanded-nh
Forwarding in the kernel: show route forwarding-table destination 1.1.1.1 extensive
for more info, you can go to the actual FPC
start shell
% vty fpc4
# show nhdb id 513 extensive
and btw, unlike Cisco (limited to 3) MX Trio has enormous depth of nexthop, unicast behined unilist, composite, list and then again composite, you can continue to gigantic depth.
------------------------------
Be kind!!
------------------------------
Original Message:
Sent: 05-26-2024 18:00
From: Moshiko Nayman
Subject: BGP PIC core and FIB architecture on MX
Yes, and that part is explained in the article. Please check the section for details provided with detail so you can see the hierarchy for the given route:
"preserve-nexthop-hierarchy" – BGP Transport Layer Protection
------------------------------
Moshiko Nayman
Original Message:
Sent: 05-26-2024 00:11
From: LEEBAHI
Subject: BGP PIC core and FIB architecture on MX
Thanks Nayman.
I stumbled upon your well written blog while learning the BGP PIC feature yesterday.
However, my question is not about the BGP PIC feature. It is about FIB architectures on JUNOS say MX. Does MX use hierarchical or Generalised FIB architecture?
Original Message:
Sent: 5/25/2024 10:53:00 PM
From: Moshiko Nayman
Subject: RE: BGP PIC core and FIB architecture on MX
Hi Leebahi,
If I understand you correctly, you're referring to these knobs:
set routing-options resolution preserve-nexthop-hierarchy
set protocols bgp group <group_name> family <NLRI> <...> nexthop-resolution preserve-nexthop-hierarchy
set routing-options rib inet.3 protect core
set routing-options protect core
set routing-instances <instance_name> routing-options protect core
The knob protect core
is related to BGP PIC. Whether it applies to the core or edge depends on whether it is configured under an instance or globally. It will make the second-best route active, create a weight, and install it into the forwarding table.
It really depends on how the next-hop is reachable; it can be an directly connected or indirect next-hop via IGP, BGP, etc.
When the nextoph is an indirect next-hop is reachable via another indirect next-hop, it result in a longer hierarchy than usual, you may want to use preserve-nexthop-hierarchy
(globally or per NLRI family) which will copy the next-hop hierarchy with its weight value from RIB to FIB.
Below is a link to some options and scenarios, I hope you will find it useful.
https://community.juniper.net/blogs/moshiko-nayman/2023/10/24/mastering-bgp-pic-on-junos
------------------------------
Moshiko Nayman
Original Message:
Sent: 05-25-2024 15:40
From: LEEBAHI
Subject: BGP PIC core and FIB architecture on MX
Hi everyone,
I am reading about BGP PIC core and hierarchical FIB architecture requirement to use BGP PIC core feature.
FLAT FIB:
Above we see BGP 's next hop is resolved to immediate next hop in FIB .
Hierarchical FIB:
Above we see BGP next's hop is not resolved to immediate next hop in hierarchical FIB.
Now if look at Juniper MX's forwarding table, even routing table, we see BGP's next hop is resolved to immediate next hop and installed into inet.0 and forwarding table, i;e FLAT FIB architecture . But I still see we can use BGP PIC core feature on MX, even though FIB is flat not hierarchical . How is it possible?
Thanks !!
------------------------------
Be kind!!
------------------------------