Skip to content

Commit 91b4b52

Browse files
authored
Merge pull request #232429 from ChaseCrum/main
Doc-a-thon
2 parents e943075 + 8bd462a commit 91b4b52

File tree

1 file changed

+28
-18
lines changed

1 file changed

+28
-18
lines changed

articles/virtual-wan/howto-private-link.md

Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@ author: erjosito
77

88
ms.service: virtual-wan
99
ms.topic: how-to
10-
ms.date: 09/22/2020
10+
ms.date: 03/30/2023
1111
ms.author: jomore
1212
ms.custom: fasttrack-new
1313

1414
---
1515
# Use Private Link in Virtual WAN
1616

17-
[Azure Private Link](../private-link/private-link-overview.md) is a technology that allows you to connect Azure Platform-as-a-Service offerings using private IP address connectivity by exposing [Private Endpoints](../private-link/private-endpoint-overview.md). With Azure Virtual WAN, you can deploy a Private Endpoint in one of the virtual networks connected to any virtual hub. This provides connectivity to any other virtual network or branch connected to the same Virtual WAN.
17+
[Azure Private Link](../private-link/private-link-overview.md) is a technology that allows you to connect Azure Platform-as-a-Service offerings using private IP address connectivity by exposing [Private Endpoints](../private-link/private-endpoint-overview.md). With Azure Virtual WAN, you can deploy a Private Endpoint in one of the virtual networks connected to any virtual hub. This private link provides connectivity to any other virtual network or branch connected to the same Virtual WAN.
1818

1919
## Before you begin
2020

21-
The steps in this article assume that you have already deployed a virtual WAN with one or more hubs, as well as at least two virtual networks connected to Virtual WAN.
21+
The steps in this article assume that you've already deployed a virtual WAN with one or more hubs and at least two virtual networks connected to Virtual WAN.
2222

2323
To create a new virtual WAN and a new hub, use the steps in the following articles:
2424

@@ -28,24 +28,27 @@ To create a new virtual WAN and a new hub, use the steps in the following articl
2828

2929
## <a name="endpoint"></a>Create a private link endpoint
3030

31-
You can create a private link endpoint for many different services. In this example, we will use Azure SQL Database. You can find more information about how to create a private endpoint for an Azure SQL Database in [Quickstart: Create a Private Endpoint using the Azure portal](../private-link/create-private-endpoint-portal.md). The following image shows the network configuration of the Azure SQL Database:
31+
You can create a private link endpoint for many different services. In this example, we're using Azure SQL Database. You can find more information about how to create a private endpoint for an Azure SQL Database in [Quickstart: Create a Private Endpoint using the Azure portal](../private-link/create-private-endpoint-portal.md). The following image shows the network configuration of the Azure SQL Database:
3232

3333
:::image type="content" source="./media/howto-private-link/create-private-link.png" alt-text="create private link" lightbox="./media/howto-private-link/create-private-link.png":::
3434

3535
After creating the Azure SQL Database, you can verify the private endpoint IP address browsing your private endpoints:
3636

3737
:::image type="content" source="./media/howto-private-link/endpoints.png" alt-text="private endpoints" lightbox="./media/howto-private-link/endpoints.png":::
3838

39-
Clicking on the private endpoint we have created, you should see its private IP address, as well as its Fully Qualified Domain Name (FQDN). Note that the private endpoint has an IP address in the range of the VNet where it has been deployed (10.1.3.0/24):
39+
Clicking on the private endpoint we've created, you should see its private IP address and its Fully Qualified Domain Name (FQDN). The private endpoint should have an IP address in the range of the VNet where it has been deployed (10.1.3.0/24):
4040

4141
:::image type="content" source="./media/howto-private-link/sql-endpoint.png" alt-text="SQL endpoint" lightbox="./media/howto-private-link/sql-endpoint.png":::
4242

4343
## <a name="connectivity"></a>Verify connectivity from the same VNet
4444

45-
In this example, we will verify connectivity to the Azure SQL Database from an Ubuntu virtual machine with MS SQL tools installed. The first step is verifying that DNS resolution works and the Azure SQL Database Fully Qualified Domain Name is resolved to a private IP address, in the same VNet where the Private Endpoint has been deployed (10.1.3.0/24):
45+
In this example, we verify connectivity to the Azure SQL Database from a Linux virtual machine with the MS SQL tools installed. The first step is verifying that DNS resolution works and the Azure SQL Database Fully Qualified Domain Name is resolved to a private IP address, in the same VNet where the Private Endpoint has been deployed (10.1.3.0/24):
4646

4747
```bash
48-
$ nslookup wantest.database.windows.net
48+
nslookup wantest.database.windows.net
49+
```
50+
51+
```output
4952
Server: 127.0.0.53
5053
Address: 127.0.0.53#53
5154
@@ -55,22 +58,24 @@ Name: wantest.privatelink.database.windows.net
5558
Address: 10.1.3.228
5659
```
5760

58-
As you can see in the previous output, the FQDN `wantest.database.windows.net` is mapped to `wantest.privatelink.database.windows.net`, that the private DNS zone created along the private endpoint will resolve to the private IP address `10.1.3.228`. Looking into the private DNS zone will confirm that there is an A record for the private endpoint mapped to the private IP address:
61+
As you can see in the previous output, the FQDN `wantest.database.windows.net` is mapped to `wantest.privatelink.database.windows.net`, that the private DNS zone created along the private endpoint will resolve to the private IP address `10.1.3.228`. Looking into the private DNS zone will confirm that there's an A record for the private endpoint mapped to the private IP address:
5962

6063
:::image type="content" source="./media/howto-private-link/dns-zone.png" alt-text="DNS zone" lightbox="./media/howto-private-link/dns-zone.png":::
6164

6265
After verifying the correct DNS resolution, we can attempt to connect to the database:
6366

6467
```bash
65-
$ query="SELECT CONVERT(char(15), CONNECTIONPROPERTY('client_net_address'));"
66-
$ sqlcmd -S wantest.database.windows.net -U $username -P $password -Q "$query"
68+
query="SELECT CONVERT(char(15), CONNECTIONPROPERTY('client_net_address'));"
69+
sqlcmd -S wantest.database.windows.net -U $username -P $password -Q "$query"
70+
```
6771

72+
```output
6873
10.1.3.75
6974
```
7075

71-
As you can see, we are using a special SQL query that gives us the source IP address that the SQL server sees from the client. In this case the server sees the client with its private IP (`10.1.3.75`), which means that the traffic goes from the VNet straight into the private endpoint.
76+
As you can see, we're using a special SQL query that gives us the source IP address that the SQL server sees from the client. In this case the server sees the client with its private IP (`10.1.3.75`), which means that the traffic goes from the VNet straight into the private endpoint.
7277

73-
Note that you need to set the variables `username` and `password` to match the credentials defined in the Azure SQL Database to make the examples in this guide work.
78+
Set the variables `username` and `password` to match the credentials defined in the Azure SQL Database to make the examples in this guide work.
7479

7580
## <a name="vnet"></a>Connect from a different VNet
7681

@@ -81,14 +86,17 @@ Once you have connectivity between the VNet or the branch to the VNet where the
8186
* If connecting to the private endpoint from a VNet, you can use the same private zone that was created with the Azure SQL Database.
8287
* If connecting to the private endpoint from a branch (Site-to-site VPN, Point-to-site VPN or ExpressRoute), you need to use on-premises DNS resolution.
8388

84-
In this example we will connect from a different VNet, so first we will attach the private DNS zone to the new VNet so that its workloads can resolve the Azure SQL Database Fully Qualified Domain Name to the private IP address. This is done through linking the private DNS zone to the new VNet:
89+
In this example we're connecting from a different VNet. First attach the private DNS zone to the new VNet so that its workloads can resolve the Azure SQL Database Fully Qualified Domain Name to the private IP address. This is done through linking the private DNS zone to the new VNet:
8590

8691
:::image type="content" source="./media/howto-private-link/dns-link.png" alt-text="DNS link" lightbox="./media/howto-private-link/dns-link.png":::
8792

8893
Now any virtual machine in the attached VNet should correctly resolve the Azure SQL Database FQDN to the private link's private IP address:
8994

9095
```bash
91-
$ nslookup wantest.database.windows.net
96+
nslookup wantest.database.windows.net
97+
```
98+
99+
```output
92100
Server: 127.0.0.53
93101
Address: 127.0.0.53#53
94102
@@ -102,16 +110,18 @@ In order to double-check that this VNet (10.1.1.0/24) has connectivity to the or
102110

103111
:::image type="content" source="./media/howto-private-link/effective-routes.png" alt-text="effective routes" lightbox="./media/howto-private-link/effective-routes.png":::
104112

105-
As you can see, there is a route pointing to the VNet 10.1.3.0/24 injected by the Virtual Network Gateways in Azure Virtual WAN. Now we can finally test connectivity to the database:
113+
As you can see, there's a route pointing to the VNet 10.1.3.0/24 injected by the Virtual Network Gateways in Azure Virtual WAN. Now we can finally test connectivity to the database:
106114

107115
```bash
108-
$ query="SELECT CONVERT(char(15), CONNECTIONPROPERTY('client_net_address'));"
109-
$ sqlcmd -S wantest.database.windows.net -U $username -P $password -Q "$query"
116+
query="SELECT CONVERT(char(15), CONNECTIONPROPERTY('client_net_address'));"
117+
sqlcmd -S wantest.database.windows.net -U $username -P $password -Q "$query"
118+
```
110119

120+
```output
111121
10.1.1.75
112122
```
113123

114-
With this example, we have seen how creating a private endpoint in one of the VNets attached to a Virtual WAN provides connectivity to the rest of VNets and branches in the Virtual WAN.
124+
With this example, we've seen how creating a private endpoint in one of the VNets attached to a Virtual WAN provides connectivity to the rest of VNets and branches in the Virtual WAN.
115125

116126
## Next steps
117127

0 commit comments

Comments
 (0)