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-machines/linux/azure-dns.md
+11-19Lines changed: 11 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,9 +12,6 @@ ms.collection: linux
12
12
---
13
13
# DNS Name Resolution options for Linux virtual machines in Azure
14
14
15
-
> [!CAUTION]
16
-
> This article references CentOS, a Linux distribution that is nearing End Of Life (EOL) status. Please consider your use and plan accordingly. For more information, see the [CentOS End Of Life guidance](~/articles/virtual-machines/workloads/centos/centos-end-of-life.md).
17
-
18
15
**Applies to:**:heavy_check_mark: Linux VMs :heavy_check_mark: Flexible scale sets
19
16
20
17
Azure provides DNS name resolution by default for all virtual machines that are in a single virtual network. You can implement your own DNS name resolution solution by configuring your own DNS services on your virtual machines that Azure hosts. The following scenarios should help you choose the one that works for your situation.
@@ -36,7 +33,7 @@ The following table illustrates scenarios and corresponding name resolution solu
36
33
37
34
## Name resolution that Azure provides
38
35
39
-
Along with resolution of public DNS names, Azure provides internal name resolution for virtual machines and role instances that are in the same virtual network. In virtual networks that are based on Azure Resource Manager, the DNS suffix is consistent across the virtual network; the FQDN is not needed. DNS names can be assigned to both network interface cards (NICs) and virtual machines. Although the name resolution that Azure provides does not require any configuration, it is not the appropriate choice for all deployment scenarios, as seen on the preceding table.
36
+
Along with resolution of public DNS names, Azure provides internal name resolution for virtual machines and role instances that are in the same virtual network. In virtual networks that are based on Azure Resource Manager, the DNS suffix is consistent across the virtual network; the FQDN isn't needed. DNS names can be assigned to both network interface cards (NICs) and virtual machines. Although the name resolution that Azure provides does not require any configuration, it isn't the appropriate choice for all deployment scenarios, as seen on the preceding table.
40
37
41
38
### Features and considerations
42
39
@@ -50,20 +47,20 @@ Along with resolution of public DNS names, Azure provides internal name resoluti
50
47
51
48
**Considerations:**
52
49
53
-
* The DNS suffix that Azure creates cannot be modified.
54
-
* You cannot manually register your own records.
55
-
* WINS and NetBIOS are not supported.
50
+
* The DNS suffix that Azure creates can't be modified.
51
+
* You can't manually register your own records.
52
+
* WINS and NetBIOS aren't supported.
56
53
* Hostnames must be DNS-compatible.
57
-
Names must use only 0-9, a-z, and '-', and they cannot start or end with a '-'. See RFC 3696 Section 2.
54
+
Names must use only 0-9, a-z, and '-', and they can't start or end with a '-'. See RFC 3696 Section 2.
58
55
* DNS query traffic is throttled for each virtual machine. Throttling shouldn't impact most applications. If request throttling is observed, ensure that client-side caching is enabled. For more information, see [Getting the most from name resolution that Azure provides](#getting-the-most-from-name-resolution-that-azure-provides).
59
56
60
57
### Getting the most from name resolution that Azure provides\
61
58
62
59
**Client-side caching:**
63
60
64
-
Some DNS queries are not sent across the network. Client-side caching helps reduce latency and improve resilience to network inconsistencies by resolving recurring DNS queries from a local cache. DNS records contain a Time-To-Live (TTL), which enables the cache to store the record for as long as possible without impacting record freshness. As a result, client-side caching is suitable for most situations.
61
+
Some DNS queries aren't sent across the network. Client-side caching helps reduce latency and improve resilience to network inconsistencies by resolving recurring DNS queries from a local cache. DNS records contain a Time-To-Live (TTL), which enables the cache to store the record for as long as possible without impacting record freshness. As a result, client-side caching is suitable for most situations.
65
62
66
-
Some Linux distributions do not include caching by default. We recommend that you add a cache to each Linux virtual machine after you check that there isn't a local cache already.
63
+
Some Linux distributions don't include caching by default. We recommend that you add a cache to each Linux virtual machine after you check that there isn't a local cache already.
67
64
68
65
Several different DNS caching packages, such as dnsmasq, are available. Here are the steps to install dnsmasq on the most common distributions:
The `/etc/resolv.conf` file is auto-generated and should not be edited. The specific steps that add the 'options' line vary by distribution:
168
+
The `/etc/resolv.conf` file is auto-generated and shouldn't be edited. The specific steps that add the 'options' line vary by distribution:
172
169
173
170
**Ubuntu** (uses resolvconf)
174
171
@@ -180,11 +177,6 @@ The `/etc/resolv.conf` file is auto-generated and should not be edited. The spec
180
177
1. Add `timeout:1 attempts:5` to the `NETCONFIG_DNS_RESOLVER_OPTIONS=""` parameter in `/etc/sysconfig/network/config`.
181
178
2. Run `sudo netconfig update` to update.
182
179
183
-
**CentOS by Rogue Wave Software (formerly OpenLogic)** (uses NetworkManager)
184
-
185
-
1. Add `RES_OPTIONS="timeout:1 attempts:5"` to `/etc/sysconfig/network`.
186
-
2. Run `systemctl restart NetworkManager` to update.
187
-
188
180
## Name resolution using your own DNS server
189
181
190
182
Your name resolution needs may go beyond the features that Azure provides. For example, you might require DNS resolution between virtual networks. To cover this scenario, you can use your own DNS servers.
@@ -195,13 +187,13 @@ DNS forwarding also enables DNS resolution between virtual networks and enables
195
187
196
188

197
189
198
-
When you use name resolution that Azure provides, the internal DNS suffix is provided to each virtual machine by using DHCP. When you use your own name resolution solution, this suffix is not supplied to virtual machines because the suffix interferes with other DNS architectures. To refer to machines by FQDN or to configure the suffix on your virtual machines, you can use PowerShell or the API to determine the suffix:
190
+
When you use name resolution that Azure provides, the internal DNS suffix is provided to each virtual machine by using DHCP. When you use your own name resolution solution, this suffix isn't supplied to virtual machines because the suffix interferes with other DNS architectures. To refer to machines by FQDN or to configure the suffix on your virtual machines, you can use PowerShell or the API to determine the suffix:
199
191
200
192
* For virtual networks that are managed by Azure Resource Manager, the suffix is available via the [network interface card](/rest/api/virtualnetwork/networkinterfaces) resource. You can also run the `azure network public-ip show <resource group> <pip name>` command to display the details of your public IP, which includes the FQDN of the NIC.
201
193
202
194
If forwarding queries to Azure doesn't suit your needs, you need to provide your own DNS solution. Your DNS solution needs to:
203
195
204
-
* Provide appropriate hostname resolution, for example via [DDNS](../../virtual-network/virtual-networks-name-resolution-ddns.md). If you use DDNS, you might need to disable DNS record scavenging. DHCP leases of Azure are very long and scavenging may remove DNS records prematurely.
196
+
* Provide appropriate hostname resolution, for example via [DDNS](../../virtual-network/virtual-networks-name-resolution-ddns.md). If you use DDNS, you might need to disable DNS record scavenging. DHCP leases of Azure are long and scavenging may remove DNS records prematurely.
205
197
* Provide appropriate recursive resolution to allow resolution of external domain names.
206
198
* Be accessible (TCP and UDP on port 53) from the clients it serves and be able to access the Internet.
207
199
* Be secured against access from the Internet to mitigate threats posed by external agents.
0 commit comments