3

VJX 0,1,3 are setup to be RR’s for this simple test , i want to know why link p5 is always preferred even though the physical next-hop changes , and the IGP path to the next-hop is is not via p5 ...

enter image description here


Below baseline exhibits where VJX4 has 3 equal iBGP paths to 77/22 where 172.65.65.11 – VJX1 is the current preferred path

root@VJX4> show route 77/22 

inet.0: 17 destinations, 19 routes (17 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

77.0.0.0/22        *[BGP/170] 04:43:01, MED 999, localpref 100, from 172.16.65.10
                      AS path: I, validation-state: unverified
                      to 10.0.0.10 via ge-0/0/1.0 (P3)
                      to 10.0.0.8 via ge-0/0/2.0 (P4)
                    > to 10.0.0.12 via ge-0/0/3.0 (P5) 
                    [BGP/170] 23:35:18, MED 999, localpref 100, from 172.16.65.11
                      AS path: I, validation-state: unverified
                      to 10.0.0.10 via ge-0/0/1.0 (P3)
                      to 10.0.0.8 via ge-0/0/2.0 (P4)
                    > to 10.0.0.12 via ge-0/0/3.0 (p5) 
                    [BGP/170] 04:43:06, MED 999, localpref 100, from 172.16.65.13
                      AS path: I, validation-state: unverified
                      to 10.0.0.10 via ge-0/0/1.0 (P3)
                      to 10.0.0.8 via ge-0/0/2.0 (P4)
                    > to 10.0.0.12 via ge-0/0/3.0 (p5)

root@VJX4> show route 77/22 extensive 

inet.0: 17 destinations, 19 routes (17 active, 0 holddown, 0 hidden)
77.0.0.0/22 (3 entries, 1 announced)
TSI:
KRT in-kernel 77.0.0.0/22 -> {indirect(262143)}
        *BGP    Preference: 170/-101
                Next hop type: Indirect
                Address: 0x92a8698
                Next-hop reference count: 5
                Source: 172.16.65.10
                Next hop type: Router, Next hop index: 262144
                Next hop: 10.0.0.10 via ge-0/0/1.0 (P3)
                Session Id: 0x1
                Next hop: 10.0.0.8 via ge-0/0/2.0 (P4)
                Session Id: 0x3
                Next hop: 10.0.0.12 via ge-0/0/3.0, selected (P5)
                Session Id: 0x5
                Protocol next hop: 172.16.65.12
                Indirect next hop: 94ec000 262143 INH Session ID: 0x4
                State: <Active Int Ext>
                Local AS:  1234 Peer AS:  1234
                Age: 4:43:14    Metric: 999     Metric2: 20 
                Validation State: unverified 
                Task: BGP_1234.172.16.65.10+56241
                Announcement bits (2): 0-KRT 4-Resolve tree 4 
                AS path: I (Originator)
                Cluster list:  0.0.0.0
                Originator ID: 172.16.65.12
                Accepted
                Localpref: 100
                Router ID: 172.16.65.10
                Indirect next hops: 1
                        Protocol next hop: 172.16.65.12 Metric: 20
                        Indirect next hop: 94ec000 262143 INH Session ID: 0x4
                        Indirect path forwarding next hops: 3
                                Next hop type: Router
                                Next hop: 10.0.0.10 via ge-0/0/1.0 (P3)
                                Session Id: 0x1
                                Next hop: 10.0.0.8 via ge-0/0/2.0 (P4)
                                Session Id: 0x3
                                Next hop: 10.0.0.12 via ge-0/0/3.0 (P5)
                                Session Id: 0x5
                        172.16.65.12/32 Originating RIB: inet.0
                          Metric: 20                      Node path count: 1
                          Forwarding nexthops: 3
                                Nexthop: 10.0.0.10 via ge-0/0/1.0 (P3)
         BGP    Preference: 170/-101
                Next hop type: Indirect
                Address: 0x92a8698
                Next-hop reference count: 5
                Source: 172.16.65.11
                Next hop type: Router, Next hop index: 262144
                Next hop: 10.0.0.10 via ge-0/0/1.0 (P3)
                Session Id: 0x1
                Next hop: 10.0.0.8 via ge-0/0/2.0 (P4)
                Session Id: 0x3
                Next hop: 10.0.0.12 via ge-0/0/3.0, selected ( P5 ) 
                Session Id: 0x5
                Protocol next hop: 172.16.65.12
                Indirect next hop: 94ec000 262143 INH Session ID: 0x4
                State: <NotBest Int Ext>
                Inactive reason: Not Best in its group - Update source
                Local AS:  1234 Peer AS:  1234
                Age: 23:35:31   Metric: 999     Metric2: 20 
                Validation State: unverified 
                Task: BGP_1234.172.16.65.11+60823
                AS path: I (Originator)
                Cluster list:  1.1.1.1
                Originator ID: 172.16.65.12
                Accepted
                Localpref: 100
                Router ID: 172.16.65.11
                Indirect next hops: 1
                        Protocol next hop: 172.16.65.12 Metric: 20
                        Indirect next hop: 94ec000 262143 INH Session ID: 0x4
                        Indirect path forwarding next hops: 3
                                Next hop type: Router
                                Next hop: 10.0.0.10 via ge-0/0/1.0 (P3)
                                Session Id: 0x1
                                Next hop: 10.0.0.8 via ge-0/0/2.0 (P4)
                                Session Id: 0x3
                                Next hop: 10.0.0.12 via ge-0/0/3.0 (P5)
                                Session Id: 0x5
                        172.16.65.12/32 Originating RIB: inet.0
                          Metric: 20                      Node path count: 1
                          Forwarding nexthops: 3
                                Nexthop: 10.0.0.10 via ge-0/0/1.0
         BGP    Preference: 170/-101
                Next hop type: Indirect
                Address: 0x92a8698
                Next-hop reference count: 5
                Source: 172.16.65.13
                Next hop type: Router, Next hop index: 262144
                Next hop: 10.0.0.10 via ge-0/0/1.0 (P3)
                Session Id: 0x1
                Next hop: 10.0.0.8 via ge-0/0/2.0 (P4)
                Session Id: 0x3
                Next hop: 10.0.0.12 via ge-0/0/3.0, selected (P5)
                Session Id: 0x5
                Protocol next hop: 172.16.65.12
                Indirect next hop: 94ec000 262143 INH Session ID: 0x4
                State: <NotBest Int Ext>
                Inactive reason: Not Best in its group - Update source
                Local AS:  1234 Peer AS:  1234
                Age: 4:43:19    Metric: 999     Metric2: 20 
                Validation State: unverified 
                Task: BGP_1234.172.16.65.13+52655
                AS path: I (Originator)
                Cluster list:  3.3.3.3
                Originator ID: 172.16.65.12
                Accepted
                Localpref: 100
                Router ID: 172.16.65.13
                Indirect next hops: 1
                        Protocol next hop: 172.16.65.12 Metric: 20
                        Indirect next hop: 94ec000 262143 INH Session ID: 0x4
                        Indirect path forwarding next hops: 3
                                Next hop type: Router
                                Next hop: 10.0.0.10 via ge-0/0/1.0 (P3)
                                Session Id: 0x1
                                Next hop: 10.0.0.8 via ge-0/0/2.0 (P4)
                                Session Id: 0x3
                                Next hop: 10.0.0.12 via ge-0/0/3.0 (P5)
                                Session Id: 0x5
                        172.16.65.12/32 Originating RIB: inet.0
                          Metric: 20                      Node path count: 1
                          Forwarding nexthops: 3
                                Nexthop: 10.0.0.10 via ge-0/0/1.0 (P3)

root@VJX4> show route 172.16.65.10 

inet.0: 17 destinations, 19 routes (17 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

172.16.65.10/32    *[IS-IS/18] 04:45:50, metric 10
                    > to 10.0.0.8 via ge-0/0/2.0 (P4)

root@VJX4> show route 172.16.65.12    

inet.0: 17 destinations, 19 routes (17 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

172.16.65.12/32    *[IS-IS/18] 04:45:59, metric 20
                    > to 10.0.0.10 via ge-0/0/1.0 (P3)
                      to 10.0.0.8 via ge-0/0/2.0 (P4)
                      to 10.0.0.12 via ge-0/0/3.0 (P5)
  • Can you post the output of "show configuration routing-options" from VJX4, please? – Jordan Head Sep 22 '15 at 14:26
  • I only have the ASN configured under routing-options for all routers apart from VJX2 where the static originates.... – DrBru Sep 22 '15 at 19:31
  • Do you have a load balancing policy configured? – Jordan Head Oct 13 '15 at 14:16
  • Did any answer help you? if so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could provide and accept your own answer. – Ron Maupin Aug 9 '17 at 23:02
2

See the JUNOS route selection process and you'll find that you end up at rule 9:

For BGP, prefer the path whose next hop is resolved through the IGP route with the lowest metric.

Note: A path is considered a BGP equal-cost path (and will be used for forwarding) if a tie-break is performed after the previous step. All paths with the same neighboring AS, learned by a multipath-enabled BGP neighbor, are considered. BGP multipath does not apply to paths that share the same MED-plus-IGP cost yet differ in IGP cost. Multipath path selection is based on the IGP cost metric, even if two paths have the same MED-plus-IGP cost.

The default load-balancing of JUNOS is to set the next-hop for a BGP route over one of the IGP paths, i.e. not to install multiple IGP next-hops for a given BGP route. If you add a second prefix in addition to your 77/22 you will see how it picks another next-hop for it so to achieve load balancing of your traffic on a per-prefix level. This works well when you have a lot of prefixes and your traffic is spread over all or many of these prefixes. If you are only looking at one prefix though, you will not achieve any load balancing of traffic.

This behaviour can be changed. If you want to install all IGP next-hops you can set load-balancing to per-packet (which really isn't true on most platforms, it's hash-bashed). See this document for further explanation on load-balancing in JUNOS.

Exactly how to calculate which IGP next-hop is picked for a given BGP route is trickier. I don't know the internal workings of it but I assume it is based on a hash of the prefix.

| improve this answer | |
-2

Buddy, by the conf that you has put here, this one:

77.0.0.0/22        *[BGP/170] 04:43:01, MED 999, localpref 100, from 172.16.65.10
                      AS path: I, validation-state: unverified
                      to 10.0.0.10 via ge-0/0/1.0 (P3)
                      to 10.0.0.8 via ge-0/0/2.0 (P4)
                    > to 10.0.0.12 via ge-0/0/3.0 (P5) 

The best path is accross VJX0, over the p4 link, and not accross VJX1 like you said. By the other hand, the bgp set this one like the BEST ROUTE, ´cause, all the parameters are de same to all the routers, weigth, local-preference, .... But, on the end of the bgp decision algotihm, it takes the LOWER router ID of the BGP neighbors, with preference the loopbacks address.

172.16.65.10, is the lowest loopback address of all your routers. This path (p4) is set to best route then.

| improve this answer | |
  • look carefully the prefered next-hop is 172.16.65.10 ( VJX0 ) but its selected next-hop is via VJX1 ( 10.0.0.12) – DrBru Sep 20 '15 at 7:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.