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/virtual-network/nat-gateway-resource.md
+18-62Lines changed: 18 additions & 62 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,75 +58,31 @@ NAT is recommended for most workloads unless you have a specific dependency on [
58
58
59
59
You can migrate from standard load balancer scenarios, including [outbound rules](../load-balancer/load-balancer-outbound-rules-overview.md), to NAT gateway. To migrate, move the public ip and public ip prefix resources from load balancer frontends to NAT gateway. New IP addresses for NAT gateway aren't required. Standard public IP and prefix can be reused as long as the total doesn't exceed 16 IP addresses. Plan for migration with service interruption in mind during the transition. You can minimize the interruption by automating the process. Test the migration in a staging environment first. During the transition, inbound originated flows aren't affected.
60
60
61
-
The following example would create a NAT gateway resource called _myNATGateway_ is created in region _East US 2, AZ 1_ with a _4-minutes_ idle timeout. The outbound IP addresses provided are:
62
-
- A set of public IP address resources _myIP1_ and _myIP2_ and
63
-
- A set of public IP prefix resources _myPrefix1_ and _myPrefix2_.
64
-
65
-
The total number of IP addresses provided by all four IP address resources can't exceed 16 IP addresses total. Any number of IP addresses between 1 and 16 is allowed.
66
-
67
-
```json
68
-
{
69
-
"name": "myNATGateway",
70
-
"type": "Microsoft.Network/natGateways",
71
-
"apiVersion": "2018-11-01",
72
-
"location": "East US 2",
73
-
"sku": { "name": "Standard" },
74
-
"zones": [ "1" ],
75
-
"properties": {
76
-
"idleTimeoutInMinutes": 4,
77
-
"publicIPPrefixes": [
78
-
{
79
-
"id": "ref to myPrefix1"
80
-
},
81
-
{
82
-
"id": "ref to myPrefix2"
83
-
}
84
-
],
85
-
"publicIPAddresses": [
86
-
{
87
-
"id": "ref to myIP1"
88
-
},
89
-
{
90
-
"id": "ref to myIP2"
91
-
}
92
-
]
93
-
}
94
-
}
95
-
```
61
+
The following example is a snippet from an Azure Resource Manager template. This template deploys several resources, including a NAT gateway. The template has the following parameters in this example:
62
+
63
+
-**natgatewayname** - Name of the NAT gateway.
64
+
-**location** - Azure region where resource is located.
65
+
-**publicipname** - Name of the outbound public IP associated with the NAT gateway.
66
+
-**publicipprefixname** - Name of the outbound public IP prefix associated with the NAT gateway.
67
+
-**vnetname** - Name of the virtual network.
68
+
-**subnetname** - Name of the subnet associated with the NAT gateway.
69
+
70
+
The total number of IP addresses provided by all IP address and prefix resources can't exceed 16 IP addresses total. Any number of IP addresses between 1 and 16 is allowed.
When the NAT gateway resource has been created, it can be used on one or more subnets of a virtual network. Specify which subnets use this NAT gateway resource. A NAT gateway isn't able to span more than one virtual network. It isn't required to assign the same NAT gateway to all subnets of a virtual network. Individual subnets can be configured with different NAT gateway resources.
98
75
99
76
Scenarios that don't use availability zones will be regional (no zone specified). If you're using availability zones, you can specify a zone to isolate NAT to a specific zone. Zone-redundancy isn't supported. Review NAT [availability zones](#availability-zones).
NAT gateways are defined with a property on a subnet within a virtual network. Flows created by virtual machines on subnet **subnetname** of virtual network **vnetname** will use the NAT gateway. All outbound connectivity will use the IP addresses associated with **natgatewayname** as the source IP address.
101
81
102
-
```json
103
-
{
104
-
"name": "myVNet",
105
-
"apiVersion": "2018-11-01",
106
-
"type": "Microsoft.Network/virtualNetworks",
107
-
"location": "myRegion",
108
-
"properties": {
109
-
"addressSpace": {
110
-
"addressPrefixes": [
111
-
"192.168.0.0/16"
112
-
]
113
-
},
114
-
"subnets": [
115
-
{
116
-
"name": "mySubnet1",
117
-
"properties": {
118
-
"addressPrefix": "192.168.0.0/24",
119
-
"natGateway": {
120
-
"id": "ref to myNATGateway"
121
-
}
122
-
}
123
-
}
124
-
]
125
-
}
126
-
}
127
-
```
128
-
NAT gateways are defined with a property on a subnet within a virtual network. Flows created by virtual machines on subnet _mySubnet1_ of virtual network _myVNet_ will use the NAT gateway. All outbound connectivity will use the IP addresses associated with _myNatGateway_ as the source IP address.
82
+
For more information on the Azure Resource Manager template used in this example, see:
129
83
84
+
-[Quickstart: Create a NAT gateway - Resource Manager template](quickstart-create-nat-gateway-template.md)
0 commit comments