AnswerBun.com

Why does Junos find multiple next hops only for the active prefix in case BGP multipath is enabled?

Network Engineering Asked on October 12, 2020

I have a Juniper router named r3 with one established eBGP session to router t1(172.16.0.14) and with second established eBGP session to router t2(172.16.0.18). BGP configuration of r3 can be seen below:

[email protected]> show configuration protocols bgp group t1-t2    
type external;
peer-as 65222;
multipath;
neighbor 172.16.0.14;
neighbor 172.16.0.18;

[email protected]> 

r3 receives the 1.1.1.1/32 prefix over both sessions:

[email protected]> show route receive-protocol bgp 172.16.0.14 1.1.1.1/32    

inet.0: 71 destinations, 84 routes (60 active, 0 holddown, 11 hidden)
  Prefix                  Nexthop              MED     Lclpref    AS path
* 1.1.1.1/32              172.16.0.14                             65222 I

[email protected]> show route receive-protocol bgp 172.16.0.18 1.1.1.1/32    

inet.0: 71 destinations, 84 routes (60 active, 0 holddown, 11 hidden)
  Prefix                  Nexthop              MED     Lclpref    AS path
  1.1.1.1/32              172.16.0.18                             65222 I

[email protected]> 

Thanks to multipath configuration option both the 172.16.0.14 and 172.16.0.18 are next-hops for the 1.1.1.1/32 prefix in case of the active route announced by the t1(172.16.0.14) which has the lower RID than the t2. However, only the active route has two next hops calculated:

[email protected]> show route 1.1.1.1 detail 

inet.0: 71 destinations, 84 routes (60 active, 0 holddown, 11 hidden)
1.1.1.1/32 (2 entries, 1 announced)
        *BGP    Preference: 170/-101
                Next hop type: Router, Next hop index: 0
                Address: 0xb634310
                Next-hop reference count: 10
                Source: 172.16.0.14
                Next hop: 172.16.0.14 via ge-0/0/4.0, selected
                Session Id: 0x0
                Next hop: 172.16.0.18 via ge-0/0/7.0
                Session Id: 0x0
                State: <Active Ext>
                Local AS: 65000 Peer AS: 65222
                Age: 2:42 
                Validation State: unverified 
                Task: BGP_65222.172.16.0.14+40876
                Announcement bits (4): 0-KRT 4-BGP_RT_Background 5-Resolve tree 1 7-BGP_RT_Background 
                AS path: 65222 I 
                Accepted Multipath
                Localpref: 100
                Router ID: 4.4.4.4
         BGP    Preference: 170/-101
                Next hop type: Router, Next hop index: 0
                Address: 0xd2ecab0
                Next-hop reference count: 9
                Source: 172.16.0.18
                Next hop: 172.16.0.18 via ge-0/0/7.0, selected
                Session Id: 0x0
                State: <NotBest Ext>
                Inactive reason: Not Best in its group - Active preferred
                Local AS: 65000 Peer AS: 65222
                Age: 6:54 
                Validation State: unverified 
                Task: BGP_65222.172.16.0.18+58923
                AS path: 65222 I 
                Accepted MultipathContrib
                Localpref: 100
                Router ID: 5.5.5.5

[email protected]> 

Is this some sort of optimization in Junos that the recursive next hops are found only for the active route?

One Answer

If you do show route 1.1.1.1/32 extensive you should see another field Junos calls protocol next-hop which may be less confusing. In the output you've pasted, it is listing all selected, adjacent next-hops, which are determined by resolving the next-hops to the protocol next-hop.

For example, if the protocol next-hop 198.51.100.100 is several layer-3 hops away, and the RIB contains two equal OSPF-learnt routes to 198.51.100.100, the type of display you've pasted would include those two OSPF-learnt next-hops in the active route stanza.

It would be better if Junos labeled these fields differently. We always have to keep in mind next-hop has a complex meaning in the context of BGP.

Answered by Jeff Wheeler on October 12, 2020

Add your own answers!

Related Questions

Estimating the Round-Trip Time in TCP

2  Asked on January 7, 2021

 

why SLA Track 8 isn’t applicable to my ISR Router

0  Asked on December 29, 2020 by kockiren

   

2 AS in the same box JunOS

2  Asked on December 13, 2020 by marcos-max

       

Confused with packet reordering

1  Asked on December 9, 2020 by amjad

 

Implementation of multi-lane ethernet

1  Asked on December 8, 2020 by user3563894

 

Trying to setup 5Gbps setup with APC and AP

1  Asked on September 30, 2020 by simon-kang

   

BFD issue with BGP support on Cisco 9396PX

1  Asked on July 23, 2020 by satish

         

Ask a Question

Get help from others!

© 2022 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP, SolveDir