Wired Intelligent Edge

 View Only
last person joined: yesterday 

Bring performance and reliability to your network with the HPE Aruba Networking Core, Aggregation, and Access layer switches. Discuss the latest features and functionality of your switching devices, and find ways to improve security across your network to bring together a mobile-first solution
Expand all | Collapse all

BGP best path

This thread has been viewed 50 times
  • 1.  BGP best path

    Posted Feb 29, 2024 04:46 AM

    Hi

    I'm preparing for a customer implementation where I will change the existing Aruba-CX 8360v2 VSX cluster with a single Internet access using static routing to a redundant Internet access using BGP. This is also the first step for multiple DC's connected to Internet.

    So now my question. I have setup a simple setup using eve-ng with Cisco routers being the ISP and the Aruba-CX OVA Version: Virtual.10.07.0004 being the customer (without the VSX part)
    I'm using Communities providing Local pref for the provider (standard setup for the ISP (instead of as-path prepend) and using local pref for the inbound routes from the provider which probably will be the default route only at this stage. All this looks good. 

    The setup for the customer will be active standby using BGP meaning only one path will be active. On the provider side local pref works as expected with local pref value deciding the path. Now to my concern. when looking in the Aruba bgp table, "show bgp ipv4/ipv6 unicast" the local pref is ok, 300 on the "standby node iBGP path. BUT the best path in the table on the "standby node" is the eBGP with a local pref of 200. 

    Looking in the Aruba doc and BGP best path algorithm it says that step 2 is local pref and ebgp and ibgp is further down in the table. This is what I expected but the outcome in reality doesn't follow that. Why? I assume I can tweak it by setting ibgp and ebgp to the same distance, not possible though in the OVA. Is there a difference in the Aruba-CX OVA compared to the real devices in scope 8360v2? Anyone that can sched some light on this behaviour?

    Below the bgp output from the standby node. The eBGP link networks are /31 nets. OSPF for igp and loopback is used for update source for ibgp.

    Node 1 (standby node)
    --------------
    sw01# sho bgp ipv4 unicast
    Status codes: s suppressed, d damped, h history, * valid, > best, = multipath,
                  i internal, e external S Stale, R Removed, a additional-paths
    Origin codes: i - IGP, e - EGP, ? - incomplete
     
    VRF : default
    Local Router-ID 10.10.255.1
     
        Network            Nexthop         Metric     LocPrf     Weight Path
    * i 0.0.0.0/0          172.16.184.243 0          300        0       64513 i
    *>e 0.0.0.0/0          172.16.184.241 0          200        0       64513 i
    *>  172.16.184.0/23   0.0.0.0         0          100        0       i
    * i 172.16.184.0/23   10.10.255.2   0          100        0       i
    * i 200.200.0.0/16     172.16.184.243 2          300        0       64513 i
    *>e 200.200.0.0/16     172.16.184.241 0          200        0       64513 i
    Total number of entries 6
     
    sw01# 



    ------------------------------
    Torro
    ------------------------------


  • 2.  RE: BGP best path

    Posted Mar 11, 2024 12:05 PM

    Hi again

    I have now tested with a newer version of Aruba-CX OVA, 

    -----------------------------------------------------------------------------
    ArubaOS-CX
    (c) Copyright Hewlett Packard Enterprise Development LP
    -----------------------------------------------------------------------------
    Version      : Virtual.10.09.0002
    Build Date   :
    Build ID     : ArubaOS-CX:Virtual.10.09.0002:456cd71cc7cb:202112061706
    Build SHA    : 456cd71cc7cb78a52d12445ff257fd49cf120ad9

    Still the same problem, 

    eBGP has precedence over Local Preference which is wrong. Also its not possible to change the routing administrative distance for eBGP/iBGP.

    Comments anyone?
    I will test this in reality when the second access is installed (still some weeks to go).



    ------------------------------
    Torro
    ------------------------------



  • 3.  RE: BGP best path

    EMPLOYEE
    Posted Mar 12, 2024 04:52 AM

    What you observed with the OVA is wrong.

    The BGP decision tree should be:

    Please note that the admin distance does not come into the picture before step 8.

    I can not check right now on OVA but you should have distance bgp command in router bgp section.

    If so, please set same distance for both ebgp and ibgp although this is not expected in network industry.

    If the behavior is the same on 8360, please open a TAC case.




  • 4.  RE: BGP best path

    Posted Mar 13, 2024 04:19 AM

    Hi
    Many thanks for responding and yes that is my expectation that Local pref has precedence over eBGP in this case according to the best path algorithm.
    Yes I'm aware of that and my workaround will be to set eBGP and iBGP with the same distance so that local pref will break the tie in favour for iBGP.

    I will feed back here also if I see the same problem in the 8360v2 sw and open a TAC case,

     



    ------------------------------
    Torro
    ------------------------------



  • 5.  RE: BGP best path

    EMPLOYEE
    Posted Mar 14, 2024 05:16 AM

    Right now, you still have to configure same admin distance even on physical switches to get what you're looking for.




  • 6.  RE: BGP best path

    Posted Mar 14, 2024 05:21 AM

    Hi
    thanks for notifying. It's a bit sad though.



  • 7.  RE: BGP best path

    EMPLOYEE
    Posted Mar 14, 2024 06:50 AM

    Hi,

    Can you double check if iBGP route next-hop (172.16.184.243) is reachable? 

    * i 0.0.0.0/0          172.16.184.243 0          300        0       64513 i
    *>e 0.0.0.0/0          172.16.184.241 0          200        0       64513 i
    AOS-CX supports BGP best-path selection as per standard BGP decision tree, and there are no gaps here.  When BGP RIB learns same route from iBGP and eBGP sessions, by default eBGP route will get selected as best route. However, in this case you have set the LP which is second in priority so the route that has higher local-preference should get selected as best route. I think here eBGP is selected as best route may be due to next-hop 172.16.184.243 is unreachable.
    Can you double check if the next-hop is reachable?
    My local test-bed it is working perfectly fine.

        Network                                     Nexthop                                 Metric     LocPrf     Weight Path

    *>i 22.22.22.22/32                              10.1.1.1                                0          300        0       1 i

    * e 22.22.22.22/32                              12.1.1.1                                0          200        0       1 i

    --Ramaprasad



  • 8.  RE: BGP best path

    Posted Mar 14, 2024 07:50 AM
    Hi

    Next-hop self on the iBGP peering (best practice) would perhaps help as well. 

    Cheers, Thomas





  • 9.  RE: BGP best path

    Posted Mar 14, 2024 08:22 AM

    Hi

    When I do setups like this I use next hop self on eBGP and use IGP and update source loopback interface for iBGP



    ------------------------------
    Torro
    ------------------------------



  • 10.  RE: BGP best path

    EMPLOYEE
    Posted Mar 19, 2024 11:52 AM

    next-hop-self should be set on iBGP peering.




  • 11.  RE: BGP best path

    Posted Mar 14, 2024 08:05 AM

    Hi
    Thanks for your input. I discovered that I had an IGP error that I didnt see previously. When correcting that it looks correct now. But I don't think that should impact the BGP table, just the reachability based on the forwarding table. At the moment I have a mix of 10.09 and 10.07. I will use 10.09 on both CX nodes and do some failovers between nodes based on failures to see how it behaves.



    ------------------------------
    Torro
    ------------------------------



  • 12.  RE: BGP best path

    Posted Mar 18, 2024 09:32 AM

    It seems stable now and my original issue was my mistake. Missing was IGP routing for the eBGP interface on both Aruba-CX switches. It stable now after correcting this. 



    ------------------------------
    Torro
    ------------------------------



  • 13.  RE: BGP best path

    EMPLOYEE
    Posted Mar 19, 2024 04:53 AM

    Hello, 

    Would you mind sharing for the community CLI output for show bgp ipv4 unicast and sh ip route,

    so that it closes the topic. Thanks.




  • 14.  RE: BGP best path

    Posted Mar 19, 2024 05:43 AM

    Hi

    Yes of course. All IPs are fake and I hope I haven't made a typo while changing to those.

    The output below is from the two CX-OVA nodes (SW01 & SW02). Connectivity for this lab is one external for the eBGP on both nodes, one connection between the two nodes and one connection to an "internal" network from both CX nodes. I'm "controlling" the inbound path from the ISP side by using BGP communities and Local Preference and as seen in the output also Local Preference to control the outbound path. The output below show that SW02 have the primary path to/from the ISP. 

    sw01# sho bgp ipv4 unicast
    Status codes: s suppressed, d damped, h history, * valid, > best, = multipath,
                  i internal, e external S Stale, R Removed, a additional-paths
    Origin codes: i - IGP, e - EGP, ? - incomplete
     
    VRF : default
    Local Router-ID 10.10.255.1
     
        Network            Nexthop         Metric     LocPrf     Weight Path
    *>  0.0.0.0/0          172.16.184.243 0          300        0       64513 i
    * e 0.0.0.0/0          172.16.184.241 0          200        0       64513 i
    *>  172.16.184.0/23   0.0.0.0         0          100        0       i
    * i 172.16.184.0/23   10.10.255.2   0          100        0       i
    *>i 200.200.0.0/16     172.16.184.243 2          300        0       64513 i
    * e 200.200.0.0/16     172.16.184.241 0          200        0       64513 i
    Total number of entries 6
     
    sw01# sho ip route
     
    Displaying ipv4 routes selected for forwarding
     
    Origin Codes: C - connected, S - static, L - local
                  R - RIP, B - BGP, O - OSPF
    Type Codes:   E - External BGP, I - Internal BGP, V - VPN, EV - EVPN
                  IA - OSPF internal area, E1 - OSPF external type 1
                  E2 - OSPF external type 2
     
    VRF: default
     
    Prefix               Nexthop           Interface     VRF(egress)   Origin/  Distance/    Age
                                                                       Type     Metric
    ----------------------------------------------------------------------------------------------
    0.0.0.0/0           10.10.254.49   1/1/3         -                 B/I       [200/0]      00h:03m:05s
    10.10.254.48/31   -                1/1/3         -                 C         [0/0]        -
    10.10.254.48/32   -                1/1/3         -                 L         [0/0]        -
    10.10.255.1/32    -                loopback0     -                 L         [0/0]        -
    10.10.255.2/32    10.10.254.49   1/1/3         -                 O         [110/100]    00h:03m:45s
    172.16.184.0/23    -                blackhole     -                 S         [1/0]        00h:04m:06s
    172.16.184.0/24    172.16.184.1    1/1/2         -                 S         [1/0]        00h:04m:06s
    172.16.184.0/28    -                1/1/2         -                 C         [0/0]        -
    172.16.184.13/32   -                1/1/2         -                 L         [0/0]        -
    172.16.184.240/31  -                1/1/1         -                 C         [0/0]        -
    172.16.184.240/32  -                1/1/1         -                 L         [0/0]        -
    172.16.184.242/31  10.10.254.49   1/1/3         -                 O         [110/200]    00h:03m:45s
    172.16.185.0/24    172.16.184.1    1/1/2         -                 S         [1/0]        00h:04m:06s
    200.200.0.0/16      10.10.254.49   1/1/3         -                 B/I       [200/2]      00h:03m:05s
     
    Total Route Count : 14
     
    sw01#
     
    -------------------------------------------------------------------------------
     
    sw02# sho bgp ipv4 unicast
    Status codes: s suppressed, d damped, h history, * valid, > best, = multipath,
                  i internal, e external S Stale, R Removed, a additional-paths
    Origin codes: i - IGP, e - EGP, ? - incomplete
     
    VRF : default
    Local Router-ID 10.10.255.2
     
        Network            Nexthop         Metric     LocPrf     Weight Path
    *>e 0.0.0.0/0          172.16.184.243 0          300        0       64513 i
    *>  172.16.184.0/23   0.0.0.0         0          100        0       i
    *   172.16.184.0/23   10.10.255.1   0          100        0       i
    *>e 200.200.0.0/16     172.16.184.243 2          300        0       64513 i
    Total number of entries 4
     
    sw02# sho ip route
     
    Displaying ipv4 routes selected for forwarding
     
    Origin Codes: C - connected, S - static, L - local
                  R - RIP, B - BGP, O - OSPF
    Type Codes:   E - External BGP, I - Internal BGP, V - VPN, EV - EVPN
                  IA - OSPF internal area, E1 - OSPF external type 1
                  E2 - OSPF external type 2
     
    VRF: default
     
    Prefix              Nexthop          Interface     VRF(egress)       Origin/   Distance/    Age
                                                                         Type      Metric
    ---------------------------------------------------------------------------------------------------------
    0.0.0.0/0           172.16.184.243  1/1/1         -                 B/E       [20/0]       00h:03m:13s
    10.10.254.48/31   -                1/1/3         -                 C         [0/0]        -
    10.10.254.49/32   -                1/1/3         -                 L         [0/0]        -
    10.10.255.1/32    10.10.254.48   1/1/3         -                 O         [110/100]    00h:04m:04s
    10.10.255.2/32    -                loopback0     -                 L         [0/0]        -
    172.16.184.0/23    -                blackhole     -                 S         [1/0]        00h:04m:25s
    172.16.184.0/24    172.16.184.1    1/1/2         -                 S         [1/0]        00h:04m:26s
    172.16.184.0/28    -                1/1/2         -                 C         [0/0]        -
    172.16.184.14/32   -                1/1/2         -                 L         [0/0]        -
    172.16.184.240/31  10.10.254.48   1/1/3         -                 O         [110/200]    00h:04m:04s
    172.16.184.242/31  -                1/1/1         -                 C         [0/0]        -
    172.16.184.242/32  -                1/1/1         -                 L         [0/0]        -
    172.16.185.0/24    172.16.184.1    1/1/2         -                 S         [1/0]        00h:04m:26s
    200.200.0.0/16      172.16.184.243  1/1/1         -                 B/E       [20/2]       00h:03m:13s
     
    Total Route Count : 14
     
    sw02#



    ------------------------------
    Torro
    ------------------------------



  • 15.  RE: BGP best path

    EMPLOYEE
    Posted Mar 19, 2024 04:29 PM

    Thanks for these output.