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/nat-gateway-resource.md
+8-20Lines changed: 8 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -142,23 +142,15 @@ NAT gateway uses SNAT to translate the private IP address and port of a virtual
142
142
143
143
### Example SNAT flows for NAT gateway
144
144
145
-
The following example flows explain the basic concept of SNAT and how it works with NAT gateway.
145
+
NAT gateway provides a many to one configuration in which multiple virtual machine instances within a NAT gatway configured subnet can use the same public IP address to connect outbound.
146
146
147
-
In the following table, the VM makes connections to destination IP 65.52.0.1 from the following source tuples (IPs and ports):
148
-
149
-
| Flow | Source tuple | Destination tuple |
150
-
|:---:|:---:|:---:|
151
-
| 1 | 192.168.0.16:4283 | 65.52.0.1:80 |
152
-
| 2 | 192.168.0.16:4284 | 65.52.0.1:80 |
153
-
| 3 | 192.168.0.17.5768 | 65.52.0.1:80 |
154
-
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:
147
+
In the following table, two different virtual machines (10.0.0.1 and 10.2.0.1) makes connections to https://microsoft.com destination IP 23.53.254.142. When NAT gateway is configured with public IP address 65.52.1.1, each virtual machine's source IPs are translated into NAT gateway's public IP address and a SNAT port:
"IP masquerading" or "port masquerading" is the act of replacing the private IP and port with the public IP and port before connecting to the internet. Multiple private resources can be masqueraded behind the same public IP of NAT gateway.
164
156
@@ -182,15 +174,11 @@ After a SNAT port is released, it's available for use by any VM on subnets confi
182
174
183
175
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.
184
176
185
-
| Flow | Source tuple | Destination tuple |
186
-
|:---:|:---:|:---:|
187
-
| 4 | 192.168.0.16:4285 | 65.52.0.2:80 |
188
-
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.
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.
194
182
195
183
Don't take a dependency on the specific way source ports are assigned in the above example. The preceding is an illustration of the fundamental concept only.
0 commit comments