@@ -15,43 +15,44 @@ This article helps you configure an Azure Virtual WAN hub router to peer with a
15
15
16
16
:::image type="content" source="./media/create-bgp-peering-hub-portal/diagram.png" alt-text="Diagram of configuration.":::
17
17
18
- ## Prerequisites
18
+ ### Prerequisites
19
19
20
20
Verify that you've met the following criteria before beginning your configuration:
21
21
22
22
[ !INCLUDE [ Before you begin] ( ../../includes/virtual-wan-before-include.md )]
23
23
24
- ### Azure PowerShell
24
+ #### Azure PowerShell
25
25
26
26
[ !INCLUDE [ PowerShell] ( ../../includes/vpn-gateway-cloud-shell-powershell-about.md )]
27
27
28
- ## <a name =" signin " ></a >Sign in
28
+ #### <a name =" signin " ></a >Sign in
29
29
30
30
[ !INCLUDE [ sign in] ( ../../includes/vpn-gateway-cloud-shell-ps-login.md )]
31
31
32
- ## Create a virtual WAN
32
+ #### Create a virtual WAN
33
33
34
34
``` azurepowershell-interactive
35
35
$virtualWan = New-AzVirtualWan -ResourceGroupName "testRG" -Name "myVirtualWAN" -Location "West US"
36
36
```
37
37
38
- ## Create a virtual hub
38
+ #### Create a virtual hub
39
39
40
40
A hub is a virtual network that can contain gateways for site-to-site, ExpressRoute, or point-to-site functionality. Once the hub is created, you'll be charged for the hub, even if you don't attach any sites.
41
41
42
42
``` azurepowershell-interactive
43
43
$virtualHub = New-AzVirtualHub -VirtualWan $virtualWan -ResourceGroupName "testRG" -Name "westushub" -AddressPrefix "10.0.0.1/24"
44
44
```
45
45
46
- ## Connect the VNet to the hub
46
+ #### Connect the VNet to the hub
47
47
48
- In this section, you create a connection between your hub and VNet.
48
+ In this section, you create a connection between your hub and VNet:
49
49
50
50
``` azurepowershell-interactive
51
+ $remote = Get-AzVirtualNetwork -Name "[vnet name]" -ResourceGroupName "[resource group name]"
51
52
$hubVnetConnection = New-AzVirtualHubVnetConnection -ResourceGroupName "[parent resource group name]" -VirtualHubName "[virtual hub name]" -Name "[name of connection]" -RemoteVirtualNetwork $remote
52
53
```
53
54
54
- ## Configure a BGP peer
55
+ #### Configure a BGP peer
55
56
56
57
Configure BGP peer for the $hubVnetConnection you created.
57
58
@@ -67,22 +68,22 @@ $hubVnetConnection = Get-AzVirtualHubVnetConnection -ResourceGroupName "[resourc
67
68
New-AzVirtualHubBgpConnection -ResourceGroupName "[resource group name]" -VirtualHubName "westushub" -PeerIp 192.168.1.5 -PeerAsn 20000 -Name "testBgpConnection" -VirtualHubVnetConnection $hubVnetConnection
68
69
```
69
70
70
- ## Modify a BGP peer
71
+ #### Modify a BGP peer
71
72
72
73
Update an existing hub BGP peer connection.
73
74
74
75
``` azurepowershell-interactive
75
76
Update-AzVirtualHubBgpConnection -ResourceGroupName "[resource group name]" -VirtualHubName "westushub" -PeerIp 192.168.1.6 -PeerAsn 20000 -Name "testBgpConnection" -VirtualHubVnetConnection $hubVnetConnection
76
77
```
77
78
78
- ## Delete a BGP peer
79
+ #### Delete a BGP peer
79
80
80
81
Remove an existing hub BGP connection.
81
82
82
83
``` azurepowershell-interactive
83
84
Remove-AzVirtualHubBgpConnection -ResourceGroupName "[resource group name]" -VirtualHubName "westushub" -Name "testBgpConnection"
84
85
```
85
86
86
- ## Next steps
87
+ #### Next steps
87
88
88
89
For more information about BGP scenarios, see [ Scenario: BGP peering with a virtual hub] ( scenario-bgp-peering-hub.md ) .
0 commit comments