Skip to content

Commit 1689aa5

Browse files
Merge pull request #221038 from asudbring/nat-resource-fresh
Freshness update NAT gateway resource article
2 parents cacc9a7 + a9a4252 commit 1689aa5

File tree

1 file changed

+19
-17
lines changed

1 file changed

+19
-17
lines changed

articles/virtual-network/nat-gateway/nat-gateway-resource.md

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,29 @@ ms.service: virtual-network
77
ms.subservice: nat
88
ms.topic: article
99
ms.workload: infrastructure-services
10-
ms.custom: ignite-2022
11-
ms.date: 02/25/2022
10+
ms.custom: ignite-2022, FY23 content-maintenance
11+
ms.date: 12/06/2022
1212
ms.author: allensu
1313
---
1414

1515
# Design virtual networks with NAT gateway
1616

1717
NAT gateway provides outbound internet connectivity for one or more subnets of a virtual network. Once NAT gateway is associated to a subnet, NAT provides source network address translation (SNAT) for that subnet. NAT gateway specifies which static IP addresses virtual machines use when creating outbound flows. Static IP addresses come from public IP addresses, public IP prefixes, or both. If a public IP prefix is used, all IP addresses of the entire public IP prefix are consumed by a NAT gateway. A NAT gateway can use up to 16 static IP addresses from either.
1818

19-
:::image type="content" source="./media/nat-overview/flow-direction1.png" alt-text="Diagram depicts a NAT gateway resource that consumes all IP addresses for a public IP prefix and directs traffic to and from two subnets of VMs and a virtual machine scale set.":::
19+
:::image type="content" source="./media/nat-overview/flow-direction1.png" alt-text="Diagram of a NAT gateway resource with virtual machines and a Virtual Machine Scale Set.":::
2020

2121
*Figure: Virtual Network NAT for outbound to internet*
2222

2323
## How to deploy NAT
2424

25-
Configuring and using NAT gateway is intentionally made simple:
25+
Deployments are intentionally made simple:
2626

2727
NAT gateway:
2828

2929
- Create a non-zonal or zonal NAT gateway.
30+
3031
- Assign a public IP address or public IP prefix.
32+
3133
- If necessary, modify TCP idle timeout (optional). Review [timers](#timers) before you change the default.
3234

3335
Virtual network:
@@ -52,13 +54,13 @@ NAT gateway is recommended for all production workloads where you need to connec
5254

5355
### Coexistence of outbound and inbound connectivity
5456

55-
NAT gateway, Load balancer and instance-level public IPs are flow direction aware. NAT gateway can coexist in the same virtual network as Load balancer and IL PIPs to provide outbound and inbound connectivity seamlessly. Inbound traffic through Load balancer or IL PIPs is translated separately from outbound traffic through NAT gateway.
57+
NAT gateway, load balancer and instance-level public IPs are flow direction aware. NAT gateway can coexist in the same virtual network as a load balancer and instance-level public IPs to provide outbound and inbound connectivity seamlessly. Inbound traffic through a load balancer or instance-level public IPs is translated separately from outbound traffic through NAT gateway.
5658

57-
The following scenarios are examples of how to ensure coexistence of Load balancer or instance level public IPs for inbound with NAT gateway for outbound.
59+
The following examples demonstrate co-existence of a load balancer or instance-level public IPs with a NAT gateway. Inbound traffic traverses the load balancer or public IP. Outbound traffic traverses the NAT gateway.
5860

5961
#### NAT and VM with an instance-level public IP
6062

61-
:::image type="content" source="./media/nat-overview/flow-direction2.png" alt-text="Diagram that depicts a NAT gateway resource that consumes all IP addresses for a public IP prefix and directs that traffic to and from two subnets that contain VMs and a virtual machine scale set.":::
63+
:::image type="content" source="./media/nat-overview/flow-direction2.png" alt-text="Diagram of a NAT gateway resource that consumes all IP addresses for a public IP prefix. The NAT gateway directs traffic for two subnets of VMs and a Virtual Machine Scale Set.":::
6264

6365
*Figure: Virtual Network NAT and VM with an instance level public IP*
6466

@@ -84,7 +86,7 @@ Any outbound configuration from a load-balancing rule or outbound rules is super
8486

8587
#### NAT and VM with an instance-level public IP and a standard public load balancer
8688

87-
:::image type="content" source="./media/nat-overview/flow-direction4.png" alt-text="Diagram that depicts a NAT gateway that supports outbound traffic to the internet from a virtual network and inbound traffic with an instance-level public I P and a public load balancer.":::
89+
:::image type="content" source="./media/nat-overview/flow-direction4.png" alt-text="Diagram of a NAT gateway that supports outbound traffic to the internet from a virtual network. Inbound traffic is depicted with an instance-level public IP and a public load balancer.":::
8890

8991
*Figure: Virtual Network NAT and VM with an instance-level public IP and a standard public load balancer*
9092

@@ -136,21 +138,21 @@ NAT gateway interacts with IP and IP transport headers of UDP and TCP flows. NAT
136138

137139
Source Network Address Translation (SNAT) rewrites the source of a flow to originate from a different IP address and/or port. Typically, SNAT is used when a private network needs to connect to a public host over the internet. SNAT allows multiple VM instances within the private VNet to use the same single Public IP address or set of IP addresses (prefix) to connect to the internet.
138140

139-
NAT gateway SNATs the private IP address and port of a virtual machine to a static public IP address and SNAT port before going outbound to the internet from a virtual network. Each new connection to the same destination endpoint uses a different SNAT port so that connections can be distinguished from one another. SNAT port exhaustion occurs when a source endpoint has run out of available SNAT ports to differentiate between new connections.
141+
NAT gateway uses SNAT to translate the private IP address and port of a virtual machine to a static public IP address and port. Traffic is translated before leaving the virtual network for the Internet. Each new connection to the same destination endpoint uses a different SNAT port so that connections can be distinguished from one another. SNAT port exhaustion occurs when a source endpoint has run out of available SNAT ports to differentiate between new connections.
140142

141143
### Example SNAT flows for NAT gateway
142144

143145
The following example flows explain the basic concept of SNAT and how it works with NAT gateway.
144146

145-
In the table below the VM makes connections to destination IP 65.52.0.1 from the following source tuples (IPs and ports):
147+
In the following table, the VM makes connections to destination IP 65.52.0.1 from the following source tuples (IPs and ports):
146148

147149
| Flow | Source tuple | Destination tuple |
148150
|:---:|:---:|:---:|
149151
| 1 | 192.168.0.16:4283 | 65.52.0.1:80 |
150152
| 2 | 192.168.0.16:4284 | 65.52.0.1:80 |
151153
| 3 | 192.168.0.17.5768 | 65.52.0.1:80 |
152154

153-
When NAT gateway is configured with public IP address 65.52.1.1, the source IPs are SNAT'd into NAT gateway's public IP address and a SNAT port as shown below:
155+
When NAT gateway is configured with public IP address 65.52.1.1, the source IPs are translated into NAT gateway's public IP address and a SNAT port:
154156

155157
| Flow | Source tuple | Source tuple after SNAT | Destination tuple |
156158
|:---:|:---:|:---:|:---:|
@@ -170,21 +172,21 @@ NAT gateway dynamically allocates SNAT ports across a subnet's private resources
170172

171173
Pre-allocation of SNAT ports to each virtual machine isn't required, which means SNAT ports aren't left unused by VMs not actively needing them.
172174

173-
:::image type="content" source="./media/nat-overview/exhaustion-threshold.png" alt-text="Diagram that depicts the inventory of all available SNAT ports used by any VM on subnets configured with NAT with an exhaustion threshold.":::
175+
:::image type="content" source="./media/nat-overview/exhaustion-threshold.png" alt-text="Diagram of all available SNAT ports used by virtual machines on subnets configured with NAT and an exhaustion threshold.":::
174176

175177
*Figure: Differences in exhaustion scenarios*
176178

177179
After a SNAT port is released, it's available for use by any VM on subnets configured with NAT. On-demand allocation allows dynamic and divergent workloads on subnets to use SNAT ports as needed. As long as SNAT ports are available, SNAT flows will succeed.
178180

179181
### Source (SNAT) port reuse
180182

181-
NAT gateway selects a port at random out of the available inventory of ports to make new outbound connections. If NAT gateway doesn't find any available SNAT ports, then it will reuse a SNAT port. A SNAT port can be reused when connecting to a different destination IP and port as shown below with this extra flow.
183+
NAT gateway selects a port at random out of the available inventory of ports to make new outbound connections. If NAT gateway doesn't find any available SNAT ports, then it will reuse a SNAT port. A SNAT port can be reused when connecting to a different destination IP and port as shown in the following table with this extra flow.
182184

183185
| Flow | Source tuple | Destination tuple |
184186
|:---:|:---:|:---:|
185187
| 4 | 192.168.0.16:4285 | 65.52.0.2:80 |
186188

187-
A NAT gateway will translate flow 4 to a SNAT port that may already be in use for other destinations as well (see flow 1 from table above). See [Scale NAT gateway](#scalability) for more discussion on correctly sizing your IP address provisioning.
189+
A NAT gateway will translate flow 4 to a SNAT port that may already be in use for other destinations as well (see flow 1 from previous table). See [Scale NAT gateway](#scalability) for more discussion on correctly sizing your IP address provisioning.
188190

189191
| Flow | Source tuple | Source tuple after SNAT | Destination tuple |
190192
|:---:|:---:|:---:|:---:|
@@ -226,15 +228,15 @@ Design recommendations for configuring timers:
226228

227229
- TCP keepalives can be used to provide a pattern of refreshing long idle connections and endpoint liveness detection. TCP keepalives appear as duplicate ACKs to the endpoints, are low overhead, and invisible to the application layer.
228230

229-
- Because UDP idle timeout timers aren't configurable, UDP keepalives should be used to ensure that the idle timeout value isn't reached, and that the connection is maintained. Unlike TCP connections, a UDP keepalive enabled on one side of the connection only applies to traffic flow in one direction. UDP keepalives must be enabled on both sides of the traffic flow in order to keep the traffic flow alive.
231+
- UDP idle timeout timers aren't configurable, UDP keepalives should be used to ensure that the idle timeout value isn't reached, and that the connection is maintained. Unlike TCP connections, a UDP keepalive enabled on one side of the connection only applies to traffic flow in one direction. UDP keepalives must be enabled on both sides of the traffic flow in order to keep the traffic flow alive.
230232

231233
## Limitations
232234

233235
- Basic load balancers and basic public IP addresses aren't compatible with NAT. Use standard SKU load balancers and public IPs instead.
234236

235-
- To upgrade a basic load balancer to standard, see [Upgrade Azure Public Load Balancer](../../load-balancer/upgrade-basic-standard.md)
237+
- To upgrade a load balancer from basic to standard, see [Upgrade Azure Public Load Balancer](../../load-balancer/upgrade-basic-standard.md)
236238

237-
- To upgrade a basic public IP address to standard, see [Upgrade a public IP address](../ip-services/public-ip-upgrade-portal.md)
239+
- To upgrade a public IP address from basic to standard, see [Upgrade a public IP address](../ip-services/public-ip-upgrade-portal.md)
238240

239241
- NAT gateway doesn't support ICMP
240242

0 commit comments

Comments
 (0)