Fortinet black logo

SD-WAN Deployment for MSSPs

7.2.0

Advertising preferred Hub

Advertising preferred Hub

In this section, we advertise the preferred entry point into our SD-WAN network to the outside world. The example below makes sure that the Hub H1 is preferred by the incoming traffic if (and only if) at least one of its overlays is healthy.

This topic includes reference configurations for the following components:

Spoke

  1. In the SD-WAN configuration, configure the SD-WAN Neighbor feature, declaring each Hub healthy if (and only if) at least one of its overlays is healthy:

        config system sdwan
          config neighbor
            edit 10.200.1.253
              set member 2 3
              set health-check "HUB"
              set sla-id 1
              set minimum-sla-meet-members 1
            next
            edit 10.200.1.254
              set member 4 5
              set health-check "HUB"
              set sla-id 1
              set minimum-sla-meet-members 1
            next
          end
        end
  2. Apply a custom BGP community when advertising to a healthy Hub:

        config router route-map
          edit "SLA_OK"
            config rule
              edit 1
                set set-community "65001:99"
              next
            end
          next
        end
        config router bgp
          config neighbor
            edit 10.200.1.253
              set route-map-out-vpnv4-preferable "SLA_OK"
            next
            edit 10.200.1.254
              set route-map-out-vpnv4-preferable "SLA_OK"
            next
        end

Hub

  1. Define the custom BGP community sent by the Spokes:

        config router community-list
          edit "SLA_OK"
            config rule
              edit 1
                set action permit
                set match "65001:99"
              next
            end
          next
        end
  2. When advertising SD-WAN routes to external peers, match on the above community, and set BGP attributes accordingly, to guarantee that the traffic is attracted as desired.

    For example, if the desired behavior is to prefer the Hub H1 if (and only if) at least one of its overlays is healthy, then we can use BGP MED attribute and ensure that:

    • Whenever H1 is healthy, it is preferred.
    • Whenever H1 is not healthy, but H2 is healthy, then H2 is preferred.

    Assuming that the external peer's IP is 192.168.1.1, the following snippets will achieve the desired result:

    On Hub H1:
        config router route-map
          edit “H1_TO_OUTSIDE”
            config rule
              edit 1
                set match-community “SLA_OK”
                set set-metric 90
              next
              edit 2
                set set-metric 100
              next
            end
          next
        end
        config router bgp
          config neighbor
            edit “192.168.1.1”
              set route-map-out “H1_TO_OUTSIDE”
            next
          end
        end
    On Hub H2:
        config router route-map
          edit “H2_TO_OUTSIDE”
            config rule
              edit 1
                set match-community “SLA_OK”
                set set-metric 95
              next
              edit 2
                set set-metric 105
              next
            end
          next
        end
        config router bgp
          config neighbor
            edit “192.168.1.1”
              set route-map-out “H2_TO_OUTSIDE”
            next
          end
        end

Advertising preferred Hub

In this section, we advertise the preferred entry point into our SD-WAN network to the outside world. The example below makes sure that the Hub H1 is preferred by the incoming traffic if (and only if) at least one of its overlays is healthy.

This topic includes reference configurations for the following components:

Spoke

  1. In the SD-WAN configuration, configure the SD-WAN Neighbor feature, declaring each Hub healthy if (and only if) at least one of its overlays is healthy:

        config system sdwan
          config neighbor
            edit 10.200.1.253
              set member 2 3
              set health-check "HUB"
              set sla-id 1
              set minimum-sla-meet-members 1
            next
            edit 10.200.1.254
              set member 4 5
              set health-check "HUB"
              set sla-id 1
              set minimum-sla-meet-members 1
            next
          end
        end
  2. Apply a custom BGP community when advertising to a healthy Hub:

        config router route-map
          edit "SLA_OK"
            config rule
              edit 1
                set set-community "65001:99"
              next
            end
          next
        end
        config router bgp
          config neighbor
            edit 10.200.1.253
              set route-map-out-vpnv4-preferable "SLA_OK"
            next
            edit 10.200.1.254
              set route-map-out-vpnv4-preferable "SLA_OK"
            next
        end

Hub

  1. Define the custom BGP community sent by the Spokes:

        config router community-list
          edit "SLA_OK"
            config rule
              edit 1
                set action permit
                set match "65001:99"
              next
            end
          next
        end
  2. When advertising SD-WAN routes to external peers, match on the above community, and set BGP attributes accordingly, to guarantee that the traffic is attracted as desired.

    For example, if the desired behavior is to prefer the Hub H1 if (and only if) at least one of its overlays is healthy, then we can use BGP MED attribute and ensure that:

    • Whenever H1 is healthy, it is preferred.
    • Whenever H1 is not healthy, but H2 is healthy, then H2 is preferred.

    Assuming that the external peer's IP is 192.168.1.1, the following snippets will achieve the desired result:

    On Hub H1:
        config router route-map
          edit “H1_TO_OUTSIDE”
            config rule
              edit 1
                set match-community “SLA_OK”
                set set-metric 90
              next
              edit 2
                set set-metric 100
              next
            end
          next
        end
        config router bgp
          config neighbor
            edit “192.168.1.1”
              set route-map-out “H1_TO_OUTSIDE”
            next
          end
        end
    On Hub H2:
        config router route-map
          edit “H2_TO_OUTSIDE”
            config rule
              edit 1
                set match-community “SLA_OK”
                set set-metric 95
              next
              edit 2
                set set-metric 105
              next
            end
          next
        end
        config router bgp
          config neighbor
            edit “192.168.1.1”
              set route-map-out “H2_TO_OUTSIDE”
            next
          end
        end