Description

How to prefer hub-2 over hub-1 for underlay traffic

Symptoms

In some cases, the user may have 2 hub locations. To reach the hub local network spoke SSR's are provided with 2 paths.

Solution

Example:

 

Out of 2 hub sites (HUB-1, HUB-2) the user would like to prefer HUB-2 as the primary path from spokes.

 

  • By default mist SSR chooses lowes IP(router-id) as the prefered path. In this case HUB-1 was prefered due to lowest IP.
  • If you want to change this behaviour then you will need to create a BGP goup config in the Spoke template.

 

To do that you can create:

 

  • a BGP GROUP in spoke
  • choose Peering Network: overlay
  • create and call the Import
  • under Import you can add the prefix, example 0.0.0.0/1-32 or interested prefix.
  • and choose Overlay Path Preference 
  • 1.HUB_PROFILE_HUB-2
  • 2.HUB_PROFILE_HUB-1
  • by doing this HUB-2 will be preferred. Bgp AS path prepending will happen in the backend.

 

#Output from spoke router

Before configuring BGP Overlay Path Preference, HUB-1 is prefered.

192.168.10.0/24 - hub local network.

 
[email protected]# show bgp summary
Tue 2025-07-22 12:36:00 UTC

Neighbor    V     AS  MsgRcvd  MsgSent  TblVer InQ OutQ Up/Down State/PfxRcd  PfxSnt Desc

10.224.8.80   4   65000   71210   71163    0  0  0 03w3d17h      2    2 N/A.

10.224.8.112  4   65000   71273   71155    0  0  0 03w3d17h      2    2 N/A

Total number of neighbors 2

✔ Retrieving bgp entries...

Completed in 0.16 seconds

 

[email protected]# show rib 192.168.10.0/24. (HUB-1 is prefered due to lowest router-id)

Tue 2025-07-22 12:36:14 UTC

Node: 020001dee848 Page 1


========= ================= ========== ========== ========== ======== ======== ============= ================ ============= =============

 Vrf    Prefix      Protocol  Selected  Distance  Metric  Uptime  Ip      Interface name  Recursive   Fib

========= ================= ========== ========== ========== ======== ======== ============= ================ ============= =============

 default  192.168.10.0/24  bgp    true      200    0  128025  10.224.8.80  unavailable   true     unavailable

                                        10.224.8.80  lo0       unavailable  true

 


After configuring BGP Overlay Path Preference, HUB-2 is prefered.

[email protected]# show rib 192.168.10.0/24

Tue 2025-07-22 12:44:19 UTC

Node: 020001dee848 Page 1

========= ================= ========== ========== ========== ======== ======== ============== ================ ============= =============

 Vrf    Prefix      Protocol  Selected  Distance  Metric  Uptime  Ip       Interface name  Recursive   Fib

========= ================= ========== ========== ========== ======== ======== ============== ================ ============= =============

 default  192.168.10.0/24  bgp    true      200    0    4  10.224.8.112  unavailable   true     unavailable

                                        10.224.8.112  lo0       unavailable  true

 

 

 

Modification History

2025-07-22 : Article Created