6. Configure BGP on SD-WAN Edge
Before we can configure the BGP on the SD-WAN Edge, we need to obtain the Route Server peer IP address and AS Number. To obtain those information, click “Overview” of the corresponding Route Server. For example:

From the overview session, we can find the AS Number is 65515 and peer IP addresses are 10.209.1.4 and 10.209.1.5. Then, we will configure the eBGP peer of the SD-WAN Edge, the following is the configuration for Azure-SG-Edge1:

The Azure-SG-Edge1 local AS number is 65123, there are two eBGP peers of IP address 10.209.1.4 and 10.209.1.5, both peer are having AS number 65515. The Keep Alive and Hold Timers are adjusted to 10 and 30 respectively to allow a faster fail over in the situation of the primary SD-WAN Edge goes down.
The max-hop cannot be the default value of 1 because the peer is not in the same subnet, in this post a value of 3 for max-hop is used. This brings up another problem, there is no route for the SD-WAN Edge to reach the eBGP peer (route server). As a result, a static route is required:

Azure-SG-Edge2 also requires the same static route. Let’s take a look a the Azure-SG-Edge2 BGP configuration:

Since Azure-SG-Edge2 is intended to be a standby of Azure-SG-Edge1, there are AS number prepend configured at both inbound and outbound direction. With the AS number prepend, Azure-SG-Edge2 will be less preferred from the Route Server and also the spoke sites. Other than the AS number prepend, the BGP configuration of Azure-SG-Edge2 is the same as Azure-SG-Edge1.