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: network/public-gateways/reference-content/understanding-v2.mdx
+50-12Lines changed: 50 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ This document explains what to expect and how to prepare for the upcoming change
19
19
20
20
## Background: DHCP and IPAM
21
21
22
-
When Public Gateways were originally introduced, they provided DHCP functionality for resources on attached Private Networks. With the [arrival of Scaleway VPC](/network/vpc/reference-content/vpc-migration/), DHCP was moved from Public Gateways to Private Networks themselves.
22
+
When Scaleway originally introduced Public Gateways, they provided DHCP functionality for resources on attached Private Networks. With the [arrival of Scaleway VPC](/network/vpc/reference-content/vpc-migration/), DHCP was moved from Public Gateways to Private Networks themselves.
23
23
24
24
Scaleway also introduced [IPAM](/network/ipam/concepts/#ipam) to act as a single source of truth for the IP addressing of all Scaleway resources. DHCP uses IPAM to ensure consistent and reliable addressing across all Private Networks.
25
25
@@ -31,33 +31,71 @@ Whether you choose a custom or default CIDR block, automatic address assignment
31
31
32
32
Since the assignment and management of IP addresses on Private Networks is now managed by IPAM and the Private Networks themselves, we must complete the removal of the DHCP functionality from Public Gateways. This means releasing a new version (v2) of the [Public Gateways API](https://www.scaleway.com/en/developers/api/public-gateway/), which has until now retained a number of legacy DHCP functions. From this new version, you can expect:
33
33
34
+
- IPAM mode becomes default
34
35
- Deprecation of the DHCP object
35
-
-IPAM mode becoming default
36
+
-Deprecation of the `address` field
36
37
- Deprecation of DHCP entries
37
38
38
39
Read on to find out more.
39
40
41
+
### IPAM mode becomes default
42
+
43
+
Scaleway Public Gateways are either in **Legacy mode** or **IPAM mode**. You can see the mode of a given gateway by:
44
+
45
+
- Checking its badge in the gateway listing page of the [Scaleway console](https://console.scaleway.com/public-gateway/public-gateways)
46
+
- Checking the value of the `is_legacy` field via the [Public Gateways API](https://www.scaleway.com/en/developers/api/public-gateway/#path-gateways-get-a-public-gateway).
47
+
48
+
<Messagetype="tip">
49
+
All Public Gateways created via the Scaleway console since 17 October 2023 are necessarily in IPAM mode.
50
+
</Message>
51
+
52
+
Legacy Public Gateways use a [workaround](/network/vpc/reference-content/vpc-migration/#public-gateways-and-vpc) to ensure IPAM compatibility. IPAM-mode Public Gateways are fully integrated with Scaleway's [IPAM](/network/ipam/concepts/#ipam), which manages the coherent assignment of IP addresses to the gateway itself, and resources on attached Private Networks.
53
+
54
+
Legacy mode will be deprecated going forward. It will no longer be possible to create legacy-mode Public Gateways, all gateways will necessarily be in IPAM mode and the `is_legacy` parameter will be removed.
55
+
40
56
### Deprecation of the DHCP object
41
57
42
-
The [DHCP object](https://www.scaleway.com/en/developers/api/public-gateway/#path-dhcp-list-dhcp-configurations) has, until now, allowed users to define a DHCP configuration, which specified how IP addresses should be assigned to devices on attached Private Networks (parameters including the subnet of the DHCP server, entry validity period and more).
58
+
The [DHCP object](https://www.scaleway.com/en/developers/api/public-gateway/#path-dhcp-list-dhcp-configurations) has, until now, allowed users to define a DHCP configuration, which specified how the gateway should assign IP addresses to devices on attached Private Networks (parameters including the subnet of the DHCP server, entry validity period and more).
59
+
60
+
When attaching a Public Gateway to a Private Network (creating a [Gateway Network](https://www.scaleway.com/en/developers/api/public-gateway/#path-gateway-networks-attach-a-public-gateway-to-a-private-network)) via the API, you can pass a DHCP object, or the ID of an existing DHCP object.
61
+
62
+
This functionality will be deprecated going forward. It will no longer be possible to create or attach DHCP objects to Gateway Networks. Instead, IPAM configuration, where auto-configuration of `GatewayNetwork` is managed by IPAM, will become default.
63
+
64
+
### Deprecation of the `address` field
65
+
66
+
When attaching a Public Gateway to a Private Network (creating a [Gateway Network](https://www.scaleway.com/en/developers/api/public-gateway/#path-gateway-networks-attach-a-public-gateway-to-a-private-network)) via the API, you can use the `address` field to define a single static IP address to assign to the Public Gateway on that Private Network.
67
+
68
+
This functionality will be deprecated going forward. Instead, you can pass an `ipam_ip_id` to specify a reserved IP address to use for the Public Gateway on this Private Network, if you wish. Otherwise, IPAM will auto-assign an IP address from the Private Network's CIDR block to the Public Gateway.
69
+
70
+
### Deprecation of DHCP entries
71
+
72
+
[DHCP entries](https://www.scaleway.com/en/developers/api/public-gateway/#path-dhcp-entries-list-dhcp-entries) belong to a specified `GatewayNetwork` (Public Gateway / Private Network attachment) and can hold dynamic DHCP leases or static, user-created DHCP reservations. They effectively allow the Public Gateway to assign certain IP addresses to certain resources on the Private Network.
73
+
74
+
DHCP entries will be deprecated going forward. Instead, you can rely on the default IPAM/DHCP functionality as described [above](#background-dhcp-and-ipam). The default behavior will auto-assign IP addresses to resources on the Private Network from the network's CIDR block, or you can use the IP reservation functionality to specify the IP address(es) to assign to each resource.
43
75
44
-
When attaching a Public Gateway to a Private Network (creating a [Gateway Network](https://www.scaleway.com/en/developers/api/public-gateway/#path-gateway-networks-attach-a-public-gateway-to-a-private-network)), via the API, you could either:
45
-
- Pass a DHCP object
46
-
- Pass a static IP address to use
76
+
For custom resources, such as VMs hosted on Elastic Metal servers, you can use the IPAM API's [Attach IP to custom resource](https://www.scaleway.com/en/developers/api/ipam/#path-ips-attach-ip-to-custom-resource) method to assign IP addresses on Private Networks. This lets you associate a [reserved IP](https://www.scaleway.com/en/developers/api/ipam/#path-ips-reserve-a-new-ip) address with a resource name and MAC address.
47
77
78
+
## Deprecation and removal timeline
48
79
80
+
The Public Gateway v1 API will be deprecated on [TODO-DATE. OR JUST CERTAIN FIELDS/OBJECTS DEPRECATED?]. Deprecation means that the API will still function, but it is slated for removal and we do not recommended that you keep using it.
49
81
82
+
We will release v2 of the Public Gateway API on [TODO-DATE - SAME DATE?]. During the period that both versions of the API co-exist, you must migrate your resources from v1 to v2.
50
83
51
-
These objects define a DHCP configuration, i.e. how IP addresses should be assigned to devices on a Private Network attached to a Public Gateway. Definable parameters include the subnet for the DHCP server, the validity period for DHCP entries, whether to use dynamic pooling, and more. A DHCP configuration object has a DHCP ID, which can then be used as part of a call to create or update a Gateway Network. This lets you attach an existing DHCP configuration to a Public Gateway attached to a Private Network. Similarly, you can use a DHCP ID as a query parameter to list Gateway Networks which use this DHCP configuration object.
84
+
[TODO - INSERT INFORMATION ON HOW TO MIGRATE]
52
85
86
+
[TODO - WHAT WILL THIS ALL LOOK LIKE IN THE CONSOLE?
53
87
88
+
[TODO - DO USERS WHO DON'T USE LEGACY / DHCP OBJECT / DHCP ENTRIES HAVE ANY ACTION TO TAKE?]
54
89
90
+
After a period of [TODO - HOW LONG] weeks/months, v1 of the API will be removed. Any resources that have not been migrated to v2 by this time [TODO - WHAT WILL HAPPEN TO THEM?]
55
91
56
-
The NetProdCore will release a new version of the PGW API, deprecating DHCP entries, DHCP object and setting the IPAM mode as the new default mode when creating a PGW.
92
+
## Further help and support
57
93
58
-
We will need a documentation page explaining:
94
+
If you have any questions, get in touch with us on the `#public-gateway` channel on the [Scaleway Slack Community](https://www.scaleway.com/en/docs/tutorials/scaleway-slack-community/), or [open a support ticket](https://console.scaleway.com/support/tickets/create).
59
95
60
-
why we will deprecate the old API
61
-
what will be the impacts for the customers
62
-
how can they migrate to the new API (using some TF examples that DevTools will provide)
96
+
The following documentation resources may be useful to you:
63
97
98
+
-[Public Gateway API Documentation](https://www.scaleway.com/en/developers/api/public-gateway/)
99
+
-[Public Gateway Main Documentation](https://www.scaleway.com/en/docs/network/public-gateways/)
100
+
-[IPAM API Documentation](https://www.scaleway.com/en/developers/api/ipam/)
101
+
-[IPAM Main Documentation](https://www.scaleway.com/en/docs/network/ipam/)
0 commit comments