Skip to content

Commit 0f80d67

Browse files
RoRoJbene2k1jcirinosclwy
authored
feat(vpc): add info on DNS (#4159)
* feat(dns): first draft * feat(vps): dns more info * fix(vpc): juggle info * fix(vpc): add info * Apply suggestions from code review Co-authored-by: Benedikt Rollik <[email protected]> * Apply suggestions from code review Co-authored-by: Jessica <[email protected]> * fix(vpc): add info to dns doc --------- Co-authored-by: Benedikt Rollik <[email protected]> Co-authored-by: Jessica <[email protected]>
1 parent 5089074 commit 0f80d67

File tree

5 files changed

+100
-16
lines changed

5 files changed

+100
-16
lines changed

menu/navigation.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2923,17 +2923,21 @@
29232923
},
29242924
{
29252925
"items": [
2926-
{
2927-
"label": "Understanding VPC GA and migration",
2928-
"slug": "vpc-migration"
2929-
},
29302926
{
29312927
"label": "Understanding routing",
29322928
"slug": "understanding-routing"
29332929
},
2930+
{
2931+
"label": "Understanding DNS",
2932+
"slug": "dns"
2933+
},
29342934
{
29352935
"label": "Getting the most from Private Networks",
29362936
"slug": "getting-most-private-networks"
2937+
},
2938+
{
2939+
"label": "Understanding VPC GA and migration",
2940+
"slug": "vpc-migration"
29372941
}
29382942
],
29392943
"label": "Additional Content",

network/vpc/concepts.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,9 @@ While DHCP is built into all new Private Networks, it may not be automatically a
4242

4343
## DNS
4444

45-
The **D**omain **N**ame **S**ystem (DNS) is a naming system for devices connected to the internet or Private Networks. Most prominently, DNS servers translate text-based domain names (e.g. www.scaleway.com) to numerical IP addresses (e.g. 51.158.66.220).
45+
The **D**omain **N**ame **S**ystem (DNS) is a naming system for devices connected to the internet or Private Networks. Most prominently, DNS servers translate text-based domain names (e.g. www.scaleway.com) to numerical IP addresses (e.g. `51.158.66.220`).
4646

47-
Private Networks benefit from managed DNS, which resolves the hostnames of attached resources into their IP addresses. The hostname for a given device is generally the name defined when creating the resource (and which in the case of an Instance, for example, displays in the shell when connected to that resource by SSH). See [full information](/network/vpc/how-to/attach-resources-to-pn/#how-to-access-a-resource-on-a-private-network-via-its-hostname-dns) on reaching a resource via its hostname.
48-
49-
When a Private Network is attached to a [legacy Public Gateway](/network/public-gateways/concepts/#ipam) however, the gateway's DNS takes priority over that of the Private Network, to allow hostname resolution across the different Private Networks it may be attached to.
47+
Private Networks benefit from managed DNS, which resolves the hostnames of attached resources into their IP addresses. The hostname for a given device is generally the name defined when creating the resource (and which in the case of an Instance, for example, displays in the shell when connected to that resource by SSH). See [full information](/network/vpc/reference-content/dns/) on Scaleway DNS and how to reach a resource via its hostname.
5048

5149
## IPAM
5250

network/vpc/how-to/attach-resources-to-pn.mdx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -118,14 +118,7 @@ In addition to using its IP address, you can also access a resource on a Private
118118

119119
A resource's hostname is equivalent to the name you gave the resource when creating it. For example, if you have an Instance with the name `instance123` attached to a Private Network named `prodpn`, its address on that network is `instance123.prodpn.internal`.
120120

121-
<Message type="tip">
122-
- If you update the resource's name after creating it, and thus its hostname changes, it will not be automatically updated on our DNS records unless you detach and reattach the resource to the Private Network. <br/><br/>
123-
- If you created the resource via the API, and it has dots in its name, these dots should be replaced by dashes for the purposes of DNS resolution (`my.instance` --> `my-instance`)<br/><br/>
124-
- You can also reach a resource via its resource ID, e.g. `e49902a6-ed4c-431f-bd62-0fc41063eec0.prodpn.internal`
125-
126-
</Message>
127-
128-
If you are still having problems reaching a resource attached to a Private Network via its hostname, see our [troubleshooting guide](/network/vpc/troubleshooting/pn-name/).
121+
For full information on Scaleway internal DNS and hostname formats, including troubleshooting advice, see our [dedicated documentation](/network/vpc/reference-content/dns/).
129122

130123
## How to detach a resource from a Private Network
131124

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
---
2+
meta:
3+
title: Understanding Scaleway DNS for VPC and Private Networks
4+
description: Learn more about how internal DNS works within the Scaleway ecosystem, and how to ensure your infrastructure is using DNS efficiently.
5+
content:
6+
h1: Understanding Scaleway DNS for VPC and Private Networks
7+
paragraph: Learn more about how internal DNS works within the Scaleway ecosystem, and how to ensure your infrastructure is using DNS efficiently.
8+
tags: vpc private-network dns dns-server dns-resolution hostname
9+
dates:
10+
validation: 2024-12-31
11+
posted: 2024-12-31
12+
categories:
13+
- network
14+
---
15+
16+
Scaleway VPC and Private Networks integrate managed DNS, for the effective resolution of hostnames to IP addresses. Read on to find out more.
17+
18+
## What is DNS?
19+
20+
The **D**omain **N**ame **S**ystem (DNS) is a naming system for devices connected to the internet or any network. Most prominently, DNS servers translate text-based domain names (e.g. www.scaleway.com) to numerical IP addresses (e.g. 51.158.66.220). This allows traffic to find its destination by resolving a human-readable text-based name, to the numerical IP addresses used by networks and servers.
21+
22+
## Scaleway DNS overview
23+
24+
Scaleway Private Networks benefit from managed internal DNS. This allows the resolution of resources' **hostnames** on the Private Network, into their private IP addresses. This managed DNS service is automatically exposed in each Private Network and no user configuration is required.
25+
26+
<Message type="note">
27+
When a Private Network is attached to a [legacy Public Gateway](/network/public-gateways/concepts/#ipam), the gateway’s DNS takes priority over that of the Private Network.
28+
</Message>
29+
30+
## Hostname format
31+
32+
A resource's hostname is equivalent to the name you gave the resource when creating it. The full format for internal addressing is `<hostname>.<private-network-name>.internal`. For example, if you have an Instance with the name `instance123` attached to a Private Network named `prodpn`, its address on that network is `instance123.prodpn.internal`.
33+
34+
<Message type="tip">
35+
- If you update the resource's name after creating it, and thus its hostname changes, it will not be automatically updated on our DNS records unless you detach and reattach the resource to the Private Network. <br/><br/>
36+
- If you created the resource via the API, and it has dots in its name, these dots should be replaced by dashes for the purposes of DNS resolution (`my.instance` --> `my-instance`). We generally recommend avoiding using dots in your resource names to avoid issues.<br/><br/>
37+
</Message>
38+
39+
## DNS resolution details
40+
41+
The managed DNS resolver service is exposed on each Private Network through the following IP addresses:
42+
43+
- IPv4: `169.254.169.254`
44+
- IPv6: `fe80::200:22ff:fe05:ca1e`
45+
46+
The service resolves both regular public records, as well as internal VPC records.
47+
48+
<Message type="tip">
49+
The `.internal` at the end of internal addresses is important in enabling the resolver to distinguish between internal and external/public DNS. For this reason, you should always add `.internal` when addressing resources within your VPC.
50+
</Message>
51+
52+
The DNS service resolves the following formats:
53+
54+
```
55+
<resource_name>.<private-network_name>.internal
56+
<resource_name>.<private-network_uuid>.internal
57+
<resource_uuid>.<private-network_uuid>.internal
58+
```
59+
60+
<Message type="tip">
61+
The `resource_uuid` does not generally correspond to the ID of the principal resource (e.g. Instance, Elastic Metal server, Public Gateway), but rather to the ID of the sub-resource that facilitates the attachment to the Private Network. For example:
62+
- Instances: `resource_uuid` corresponds to the [Private NIC](https://www.scaleway.com/en/developers/api/instance/#path-private-nics-list-all-private-nics) ID
63+
- Elastic Metal: `resource_uuid` corresponds to the ID of the [Server-to-Private Network mapping](https://www.scaleway.com/en/developers/api/elastic-metal/private-network-api/#path-private-networks-add-a-server-to-a-private-network)
64+
- Public Gateways: `resource_uuid` corresponds to the [GatewayNetwork](https://www.scaleway.com/en/developers/api/public-gateway/#path-gateway-networks-list-public-gateway-connections-to-private-networks) ID.
65+
</Message>
66+
67+
DNS cannot resolve or forward queries between different VPCs. It can only resolve hostnames for resources within the same VPC, though they may be on different Private Networks within that VPC.
68+
69+
## Rate limiting
70+
71+
Currently, DNS requests are rate-limited to 50 requests per second per resource. Watch this space as we work to be able to increase this limit to accommodate higher traffic volumes.
72+
73+
## Troubleshooting
74+
75+
If you experience problems with DNS, try the following steps:
76+
77+
1. **Detach and reattach the affected resources from/to the Private Network.** This is effective in solving many issues for older resources, or resources whose name you have changed.
78+
79+
2. **Check resource hostname**. Issues can arise if your resource has a dot in its name. Rename it if necessary to eliminate the dot, and detach/reattach it from the Private Network.
80+
81+
3. **Check Private Network name**. Issues can arise with Private Networks who share a name with a TLD. See our [dedicated document](/network/vpc/troubleshooting/pn-name/) for more help.
82+
83+
4. **Check whether you are using Network Manager**: DNS does not work out of the box for Linux distributions using Network Managed, such as **RockyLinux**. Find out how to resolve this problem [on our troubleshooting page](/network/vpc/troubleshooting/private-dns-dhcp-not-working/#distributions-running-network-manager)
84+
85+
If you are still having problems reaching a resource attached to a Private Network via its hostname, [open a support ticket](https://console.scaleway.com/support).

network/vpc/reference-content/getting-most-private-networks.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ Further, when you attach a resource to a Private Network and specify a reserved
6969

7070
Using reserved IP addresses is ideal to ensure that certain IP addresses are never released into the general pool and kept for certain critical resources with fixed IP requirements, even when that resource is detached from the Private Network, or when migrating between resources. Reserved IP addresses may also be useful where your Private Network is extending or integrating with external networks, or to assign addresses to virtual machines hosted on Elastic Metal servers via Proxmox.
7171

72+
### DNS and hostnames
73+
74+
Scaleway Private Networks benefit from managed internal DNS. This allows the resolution of resources' **hostnames** on the Private Network, into their private IP addresses. See our documentation on [Understanding Scaleway DNS](/network/vpc/reference-content/dns/) for full details of how to effectively use hostname addressing and the capabilities of Private Networks' DNS resolver service.
75+
7276
## Removing public IPs from resources
7377

7478
We strongly recommend that you disable public connectivity on all of your Scaleway resources, unless it is absolutely required. It is preferable to attach resources to Private Networks wherever possible, and direct all traffic to the resource's private IP address on that network. This ensures optimal security, reduced cost and enhanced latency. Find out more in our documentation about [public connectivity best practices](/network/ipam/reference-content/public-connectivity-best-practices).

0 commit comments

Comments
 (0)