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/troubleshoot-nat.md
+17-4Lines changed: 17 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ ms.devlang: na
12
12
ms.topic: overview
13
13
ms.tgt_pltfrm: na
14
14
ms.workload: infrastructure-services
15
-
ms.date: 04/28/2020
15
+
ms.date: 05/19/2020
16
16
ms.author: allensu
17
17
---
18
18
@@ -26,6 +26,7 @@ This article helps administrators diagnose and resolve connectivity problems whe
26
26
*[ICMP ping is failing](#icmp-ping-is-failing)
27
27
*[Connectivity failures](#connectivity-failures)
28
28
*[IPv6 coexistence](#ipv6-coexistence)
29
+
*[Connection doesn't originate from NAT gateway IP(s)](#connection-doesnt-originate-from-nat-gateway-ips)
29
30
30
31
To resolve these problems, follow the steps in the following section.
31
32
@@ -56,10 +57,10 @@ _**Solution:**_ Use appropriate patterns and best practices
56
57
- DNS can introduce many individual flows at volume when the client is not caching the DNS resolvers result. Use caching.
57
58
- UDP flows (for example DNS lookups) allocate SNAT ports for the duration of the idle timeout. The longer the idle timeout, the higher the pressure on SNAT ports. Use short idle timeout (for example 4 minutes).
58
59
- Use connection pools to shape your connection volume.
59
-
- Never silently abandon a TCP flow and rely on TCP timers to clean up flow. If you don't let TCP explicitly close the connection, state remains allocated at intermediate systems and endpoints and makes SNAT ports unavailable for other connections. This can trigger application failures and SNAT exhaustion.
60
+
- Never silently abandon a TCP flow and rely on TCP timers to clean up flow. If you don't let TCP explicitly close the connection, state remains allocated at intermediate systems and endpoints and makes SNAT ports unavailable for other connections. This pattern can trigger application failures and SNAT exhaustion.
60
61
- Don't change OS-level TCP close related timer values without expert knowledge of impact. While the TCP stack will recover, your application performance can be negatively impacted when the endpoints of a connection have mismatched expectations. The desire to change timers is usually a sign of an underlying design problem. Review following recommendations.
61
62
62
-
Often times SNAT exhaustion can also be amplified with other anti-patterns in the underlying application. Review these additional patterns and best practices to improve the scale and reliability of your service.
63
+
SNAT exhaustion can also be amplified with other anti-patterns in the underlying application. Review these additional patterns and best practices to improve the scale and reliability of your service.
63
64
64
65
- Explore impact of reducing [TCP idle timeout](nat-gateway-resource.md#timers) to lower values including default idle timeout of 4 minutes to free up SNAT port inventory earlier.
65
66
- Consider [asynchronous polling patterns](https://docs.microsoft.com/azure/architecture/patterns/async-request-reply) for long-running operations to free up connection resources for other operations.
@@ -111,7 +112,7 @@ Use tools like the following to validation connectivity. [ICMP ping isn't suppor
111
112
112
113
#### Configuration
113
114
114
-
Check the following:
115
+
Check your configuration:
115
116
1. Does the NAT gateway resource have at least one public IP resource or one public IP prefix resource? You must at least have one IP address associated with the NAT gateway for it to be able to provide outbound connectivity.
116
117
2. Is the virtual network's subnet configured to use the NAT gateway?
117
118
3. Are you using UDR (user-defined route) and are you overriding the destination? NAT gateway resources become the default route (0/0) on configured subnets.
@@ -178,6 +179,18 @@ _**Solution:**_ Deploy NAT gateway on a subnet without IPv6 prefix.
178
179
179
180
You can indicate interest in additional capabilities through [Virtual Network NAT UserVoice](https://aka.ms/natuservoice).
180
181
182
+
### Connection doesn't originate from NAT gateway IP(s)
183
+
184
+
You configure NAT gateway, IP address(es) to use, and which subnet should use a NAT gateway resource. However, connections from virtual machine instances that existed before the NAT gateway was deployed don't use the IP address(es). They appear to be using IP address(es) not used with the NAT gateway resource.
185
+
186
+
_**Solution:**_
187
+
188
+
[Virtual Network NAT](nat-overview.md) replaces the outbound connectivity for the subnet it is configured on. When transitioning from default SNAT or load balancer outbound SNAT to using NAT gateways, new connections will immediately begin using the IP address(es) associated with the NAT gateway resource. However, if a virtual machine still has an established connection during the switch to NAT gateway resources, the connection will continue using the old SNAT IP address that was assigned when the connection was established. Make sure you are really establishing a new connection rather than reusing a connection that already existed because the OS or the browser was caching the connections in a connection pool. For example, when using _curl_ in PowerShell, make sure to specify the _-DisableKeepalive_ parameter to force a new connection to be reused. If you're using a browser, connections may also be pooled.
189
+
190
+
It's not necessary to reboot a virtual machine configuring a subnet for a NAT gateway resource. However, if a virtual machine is rebooted, the connection state is flushed. When the connection state has been flushed, all connections will begin using the NAT gateway resource's IP address(es). However, this is a side effect of the virtual machine being rebooted and not an indicator that a reboot is required.
191
+
192
+
If you are still having trouble, open a support case for further troubleshooting.
193
+
181
194
## Next steps
182
195
183
196
* Learn about [Virtual Network NAT](nat-overview.md)
0 commit comments