You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/vpn-gateway/bgp-howto.md
+42-25Lines changed: 42 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,21 +1,21 @@
1
1
---
2
2
title: 'Configure BGP for VPN Gateway: Portal'
3
3
titleSuffix: Azure VPN Gateway
4
-
description: Learn how to configure BGP for Azure VPN Gateway.
4
+
description: Learn how to configure BGP for Azure VPN Gateway using the Azure portal.
5
5
services: vpn-gateway
6
6
author: cherylmc
7
7
8
8
ms.service: vpn-gateway
9
9
ms.topic: how-to
10
-
ms.date: 01/04/2023
10
+
ms.date: 01/09/2023
11
11
ms.author: cherylmc
12
12
13
13
---
14
14
# How to configure BGP for Azure VPN Gateway
15
15
16
-
This article helps you enable BGP on cross-premises site-to-site (S2S) VPN connections and VNet-to-VNet connections using the Azure portal.
16
+
This article helps you enable BGP on cross-premises site-to-site (S2S) VPN connections and VNet-to-VNet connections using the Azure portal. This article helps you enable BGP on cross-premises site-to-site (S2S) VPN connections and VNet-to-VNet connections using Azure PowerShell. You can also create this configuration using the [Azure portal](bgp-howto.md) or [PowerShell](vpn-gateway-bgp-resource-manager-ps.md) steps.
17
17
18
-
BGP is the standard routing protocol commonly used in the Internet to exchange routing and reachability information between two or more networks. BGP enables the Azure VPN gateways and your on-premises VPN devices, called BGP peers or neighbors, to exchange "routes" that will inform both gateways on the availability and reachability for those prefixes to go through the gateways or routers involved. BGP can also enable transit routing among multiple networks by propagating routes a BGP gateway learns from one BGP peer to all other BGP peers.
18
+
BGP is the standard routing protocol commonly used in the Internet to exchange routing and reachability information between two or more networks. BGP enables the VPN gateways and your on-premises VPN devices, called BGP peers or neighbors, to exchange "routes" that will inform both gateways on the availability and reachability for those prefixes to go through the gateways or routers involved. BGP can also enable transit routing among multiple networks by propagating routes a BGP gateway learns from one BGP peer to all other BGP peers.
19
19
20
20
For more information about the benefits of BGP and to understand the technical requirements and considerations of using BGP, see [About BGP and Azure VPN Gateway](vpn-gateway-bgp-overview.md).
21
21
@@ -25,21 +25,21 @@ Each part of this article helps you form a basic building block for enabling BGP
25
25
26
26
**Diagram 1**
27
27
28
-
:::image type="content" source="./media/bgp-howto/bgp-crosspremises-v2v.png" alt-text="Diagram showing network architecture and settings" border="false":::
28
+
:::image type="content" source="./media/bgp-howto/vnet-to-vnet.png" alt-text="Diagram showing network architecture and settings." border="false":::
29
29
30
30
You can combine parts together to build a more complex, multi-hop, transit network that meets your needs.
31
31
32
32
### Prerequisites
33
33
34
34
Verify that you have an Azure subscription. If you don't already have an Azure subscription, you can activate your [MSDN subscriber benefits](https://azure.microsoft.com/pricing/member-offers/msdn-benefits-details/) or sign up for a [free account](https://azure.microsoft.com/pricing/free-trial/).
35
35
36
-
## <aname ="config"></a>Configure BGP on the virtual network gateway
36
+
## <aname ="config"></a>Enable BGP for the VPN gateway
37
37
38
-
In this section, you create and configure a virtual network, create and configure a virtual network gateway with BGP parameters, and obtain the Azure BGP Peer IP address. Diagram 2 shows the configuration settings to use when working with the steps in this section.
38
+
This section is required before you perform any of the steps in the other two configuration sections. The following configuration steps set up the BGP parameters of the VPN gateway as shown in Diagram 2.
:::image type="content" source="./media/bgp-howto/gateway.png" alt-text="Diagram showing settings for the virtual network gateway." border="false":::
43
43
44
44
### 1. Create TestVNet1
45
45
@@ -87,20 +87,20 @@ In this step, you create a VPN gateway with the corresponding BGP parameters.
87
87
88
88
> [!IMPORTANT]
89
89
>
90
-
> * By default, Azure assigns a private IP address from the GatewaySubnet prefix range automatically as the Azure BGP IP address on the Azure VPN gateway. The custom Azure APIPA BGP address is needed when your on premises VPN devices use an APIPA address (169.254.0.1 to 169.254.255.254) as the BGP IP. Azure VPN Gateway will choose the custom APIPA address if the corresponding local network gateway resource (on-premises network) has an APIPA address as the BGP peer IP. If the local network gateway uses a regular IP address (not APIPA), Azure VPN Gateway will revert to the private IP address from the GatewaySubnet range.
90
+
> * By default, Azure assigns a private IP address from the GatewaySubnet prefix range automatically as the Azure BGP IP address on the VPN gateway. The custom Azure APIPA BGP address is needed when your on premises VPN devices use an APIPA address (169.254.0.1 to 169.254.255.254) as the BGP IP. VPN Gateway will choose the custom APIPA address if the corresponding local network gateway resource (on-premises network) has an APIPA address as the BGP peer IP. If the local network gateway uses a regular IP address (not APIPA), VPN Gateway will revert to the private IP address from the GatewaySubnet range.
91
91
>
92
-
> * The APIPA BGP addresses must not overlap between the on-premises VPN devices and all connected Azure VPN gateways.
92
+
> * The APIPA BGP addresses must not overlap between the on-premises VPN devices and all connected VPN gateways.
93
93
>
94
-
> * When APIPA addresses are used on Azure VPN gateways, the gateways do not initiate BGP peering sessions with APIPA source IP addresses. The on-premises VPN device must initiate BGP peering connections.
94
+
> * When APIPA addresses are used on VPN gateways, the gateways do not initiate BGP peering sessions with APIPA source IP addresses. The on-premises VPN device must initiate BGP peering connections.
95
95
>
96
96
97
97
1. Select **Review + create** to run validation. Once validation passes, select **Create** to deploy the VPN gateway. Creating a gateway can often take 45 minutes or more, depending on the selected gateway SKU. You can see the deployment status on the Overview page for your gateway.
98
98
99
99
### 3. Get the Azure BGP Peer IP addresses
100
100
101
-
Once the gateway is created, you can obtain the BGP Peer IP addresses on the Azure VPN gateway. These addresses are needed to configure your on-premises VPN devices to establish BGP sessions with the Azure VPN gateway.
101
+
Once the gateway is created, you can obtain the BGP Peer IP addresses on the VPN gateway. These addresses are needed to configure your on-premises VPN devices to establish BGP sessions with the VPN gateway.
102
102
103
-
On the virtual network gateway **Configuration** page, you can view the BGP configuration information on your Azure VPN gateway: ASN, Public IP address, and the corresponding BGP peer IP addresses on the Azure side (default and APIPA). You can also make the following configuration changes:
103
+
On the virtual network gateway **Configuration** page, you can view the BGP configuration information on your VPN gateway: ASN, Public IP address, and the corresponding BGP peer IP addresses on the Azure side (default and APIPA). You can also make the following configuration changes:
104
104
105
105
* You can update the ASN or the APIPA BGP IP address if needed.
106
106
* If you have an active-active VPN gateway, this page will show the Public IP address, default, and APIPA BGP IP addresses of the second VPN gateway instance.
@@ -112,11 +112,13 @@ To get the Azure BGP Peer IP address:
112
112
113
113
## <aname ="crosspremises"></a>Configure BGP on cross-premises S2S connections
114
114
115
-
To establish a cross-premises connection, you need to create a *local network gateway* to represent your on-premises VPN device, and a *connection* to connect the VPN gateway with the local network gateway as explained in [Create site-to-site connection](tutorial-site-to-site-portal.md). The following sections contain the additional properties required to specify the BGP configuration parameters.
115
+
To establish a cross-premises connection, you need to create a *local network gateway* to represent your on-premises VPN device, and a *connection* to connect the VPN gateway with the local network gateway as explained in [Create site-to-site connection](tutorial-site-to-site-portal.md). The following sections contain the additional properties required to specify the BGP configuration parameters, as shown in Diagram 3.
Before proceeding, make sure you have enabled BGP for the VPN gateway.
120
122
121
123
### 1. Create a local network gateway
122
124
@@ -142,13 +144,13 @@ Configure a local network gateway with BGP settings.
142
144
#### Important configuration considerations
143
145
144
146
* The ASN and the BGP peer IP address must match your on-premises VPN router configuration.
145
-
* You can leave the **Address space** empty only if you're using BGP to connect to this network. Azure VPN gateway will internally add a route of your BGP peer IP address to the corresponding IPsec tunnel. If you're **NOT** using BGP between the Azure VPN gateway and this particular network, you **must** provide a list of valid address prefixes for the **Address space**.
146
-
* You can optionally use an **APIPA IP address** (169.254.x.x) as your on-premises BGP peer IP if needed. But you'll also need to specify an APIPA IP address as described earlier in this article for your Azure VPN gateway, otherwise the BGP session can't establish for this connection.
147
+
* You can leave the **Address space** empty only if you're using BGP to connect to this network. Azure VPN gateway will internally add a route of your BGP peer IP address to the corresponding IPsec tunnel. If you're **NOT** using BGP between the VPN gateway and this particular network, you **must** provide a list of valid address prefixes for the **Address space**.
148
+
* You can optionally use an **APIPA IP address** (169.254.x.x) as your on-premises BGP peer IP if needed. But you'll also need to specify an APIPA IP address as described earlier in this article for your VPN gateway, otherwise the BGP session can't establish for this connection.
147
149
* You can enter the BGP configuration information during the creation of the local network gateway, or you can add or change BGP configuration from the **Configuration** page of the local network gateway resource.
148
150
149
151
### 2. Configure an S2S connection with BGP enabled
150
152
151
-
In this step, you create a new connection that has BGP enabled. If you already have a connection and you want to enable BGP on it, you can [update an existing connection](#update).
153
+
In this step, you create a new connection that has BGP enabled. If you already have a connection and you want to enable BGP on it, you can update it.
152
154
153
155
#### To create a connection
154
156
@@ -158,27 +160,42 @@ In this step, you create a new connection that has BGP enabled. If you already h
158
160
1. Select **Enable BGP** to enable BGP on this connection.
159
161
1. Click **OK** to save changes.
160
162
161
-
#### <aname ="update"></a>To update an existing connection
163
+
#### To update an existing connection
162
164
163
165
1. Go to your virtual network gateway **Connections** page.
164
166
1. Click the connection you want to modify.
165
167
1. Go to the **Configuration** page for the connection.
166
168
1. Change the **BGP** setting to **Enabled**.
167
169
1.**Save** your changes.
168
170
169
-
## <aname ="v2v"></a>Configure BGP on VNet-to-VNet connections
171
+
#### On-premises device configuration
172
+
173
+
The following example lists the parameters you enter into the BGP configuration section on your on-premises VPN device for this exercise:
174
+
175
+
```
176
+
- Site5 ASN : 65050
177
+
- Site5 BGP IP : 10.51.255.254
178
+
- Prefixes to announce : (for example) 10.51.0.0/16
179
+
- Azure VNet ASN : 65010
180
+
- Azure VNet BGP IP : 10.12.255.30
181
+
- Static route : Add a route for 10.12.255.30/32, with nexthop being the VPN tunnel interface on your device
182
+
- eBGP Multihop : Ensure the "multihop" option for eBGP is enabled on your device if needed
183
+
```
184
+
185
+
## Enable BGP on VNet-to-VNet connections
170
186
171
187
The steps to enable or disable BGP on a VNet-to-VNet connection are the same as the [S2S steps](#crosspremises). You can enable BGP when creating the connection, or update the configuration on an existing VNet-to-VNet connection.
172
188
173
-
>[!NOTE]
174
-
>A VNet-to-VNet connection without BGP will limit the communication to the two connected VNets only. Enable BGP to allow transit routing capability to other S2S or VNet-to-VNet connections of these two VNets.
175
-
>
189
+
> [!NOTE]
190
+
> A VNet-to-VNet connection without BGP will limit the communication to the two connected VNets only. Enable BGP to allow transit routing capability to other S2S or VNet-to-VNet connections of these two VNets.
176
191
177
-
For context, referring to **Diagram 4**, if BGP were to be disabled between TestVNet2 and TestVNet1, TestVNet2 wouldn't learn the routes for the on-premises network, Site5, and therefore couldn't communicate with Site 5. Once you enable BGP, as shown in the Diagram 4, all three networks will be able to communicate over the IPsec and VNet-to-VNet connections.
192
+
If you completed all three parts of this exercise, you have established the following network topology:
178
193
179
194
**Diagram 4**
180
195
181
-
:::image type="content" source="./media/bgp-howto/bgp-crosspremises-v2v.png" alt-text="Diagram showing full network" border="false":::
196
+
:::image type="content" source="./media/bgp-howto/vnet-to-vnet.png" alt-text="Diagram showing full network configuration." border="false":::
197
+
198
+
For context, referring to **Diagram 4**, if BGP were to be disabled between TestVNet2 and TestVNet1, TestVNet2 wouldn't learn the routes for the on-premises network, Site5, and therefore couldn't communicate with Site 5. Once you enable BGP, as shown in the Diagram 4, all three networks will be able to communicate over the S2S IPsec and VNet-to-VNet connections.
0 commit comments