Skip to content

Commit

Permalink
feat(ipam): attach MAC address to reserved IP (#3752)
Browse files Browse the repository at this point in the history
* feat(ipam): started mac address

* feat(ipam): finished mac address info

* feat(ipam): mac address finishing touches

* Apply suggestions from code review

Co-authored-by: Jessica <[email protected]>

* fix(ipam): add message box

---------

Co-authored-by: Jessica <[email protected]>
  • Loading branch information
RoRoJ and jcirinosclwy authored Nov 27, 2024
1 parent 7c4c1f7 commit d407fdc
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 4 deletions.
2 changes: 1 addition & 1 deletion faq/ipam.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ Currently, the Scaleway console only supports attachment with a reserved IP for

## Can I use a reserved private IP with a virtual machine hosted on my Elastic Metal server?

This is not currently possible via the Scaleway console, but you can use the [Attach existing IP to custom resource](https://www.scaleway.com/en/developers/api/ipam/#path-ips-attach-existing-ip-to-custom-resource) method in the IPAM API to achieve exactly this purpose. Simply specify the MAC address and name of the custom resource, and the ID of the reserved IP to attach. The custom resource will be attached to the Private Network using the specified reserved IP.
Yes, this functionality is now available via the Scaleway console and API. See [how to reserve a private IP address with an attached MAC address](/network/ipam/how-to/reserve-ip/#how-to-reserve-a-private-ip-address-with-an-attached-mac-address).
2 changes: 1 addition & 1 deletion faq/vpc.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ Nonetheless, you can also reserve specific IPs from a Private Network's CIDR blo

## How can I manage IP addresses for my Proxmox Virtual Machines (VMs) on Elastic Metal servers?

We recommend that you use the IPAM API's [Attach IP to custom resource](https://www.scaleway.com/en/developers/api/ipam/#path-ips-attach-existing-ip-to-custom-resource) method for this purpose. This allows you to assign a [reserved IP](/network/ipam/how-to/reserve-ip/) on a Private Network to a VM or other custom resource by passing its name and MAC address.
We recommend that you use our IPAM product for this purpose. See [how to reserve a private IP address with an attached MAC address](/network/ipam/how-to/reserve-ip/#how-to-reserve-a-private-ip-address-with-an-attached-mac-address).
28 changes: 28 additions & 0 deletions network/ipam/how-to/reserve-ip.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,36 @@ This page sets out the steps necessary to reserve an IP address with IPAM.
Four IP addresses from each CIDR block are unavailable for reservation: the first two and last two in the block. For example, for the subnet `172.16.12.0/22` the following addresses cannot be reserved or assigned to any resource: `172.16.12.0`, `172.16.12.1`, `172.16.15.254` and `172.16.15.256`.
</Message>

5. Define whether you want to attach a MAC address to the reserved IP. **Only do this for custom resources** e.g. virtual machines hosted on a Proxmox cluster on an Elastic Metal server.

<Message type="important">
Do **not** attach a MAC address for reserved IPs you want to use with standard Scaleway resources such as Instances, Load Balancers or Elastic Metal servers themselves.
</Message>

For more help with attaching MAC addresses, [see below](#how-to-reserve-a-private-ip-address-with-an-attached-mac-address).

6. Click **Reserve** to reserve the IP.

The IP address is reserved, and you are returned to the list of your private IP addresses, where the reserved address now displays. You can use this address to attach a resource to the Private Network you reserved it from. If and when you no longer need the reserved IP, you can [release](#how-to-release-a-reserved-private-ip-address) it.

## How to reserve a private IP address with an attached MAC address

When you reserve a private IP, you have the option to attach a MAC address to it. This allows you to use the IP with a custom resource e.g. virtual machines hosted on a Proxmox cluster on an Elastic Metal server. This functionality marks the final stage of replacing the now-deprecated static DHCP reservations via the Public Gateway.

It is only possible to attach a MAC address during the IP reservation. You cannot edit an existing reserved IP to attach a MAC address.

1. Follow the steps above to [reserve a private IP](#how-to-reserve-a-private-ip-address), and at step 5, check the box to attach a MAC address.

2. Enter the MAC address of the custom resource you want to attach, e.g. `00:1B:44:11:3A:B7`.

3. Enter the name of the resource. This will be used for DNS resolution on the Private Network.

4. Click **Reserve**.

The IP address is reserved, and you are returned to the list of your private IP addresses, where the reserved address now displays.

If you later attach this reserved IP address to a standard Scaleway resource e.g. an Instance, the attached MAC address and resource name will be erased.

## How to attach a resource to a Private Network using a reserved IP address

You can currently attach **Instances**, **Elastic Metal servers**, **Load Balancers**, and **Public Gateways** to Private Networks using a reserved IP address. Support for Managed Databases will be coming soon.
Expand Down
2 changes: 1 addition & 1 deletion network/vpc/reference-content/vpc-migration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ If you fall into one of the cases where DHCP is not automatically activated for

See the dedicated documentation on [activating DHCP](/network/vpc/how-to/activate-dhcp/)

Any static DHCP reservations (static leases) configured via a Public Gateway have been transparently migrated. Going forward, [DHCP reservations via the Public Gateway API](https://www.scaleway.com/en/developers/api/public-gateway/) and other devtools are deprecated but still available, to avoid breaking changes. They are no longer available via the console. IP reservations are also available through [the IPAM API](https://www.scaleway.com/en/developers/api/ipam/).
Any static DHCP reservations (static leases) configured via a Public Gateway have been transparently migrated. Going forward, [DHCP reservations via the Public Gateway API](https://www.scaleway.com/en/developers/api/public-gateway/) and other devtools are deprecated but still available via the API, to avoid breaking changes. They are no longer available via the console. We strongly recommend that you use our IPAM product to [reserve](/network/ipam/how-to/reserve-ip/) and manage your IP addresses.

## Aspect 3: DNS on Private Networks

Expand Down
2 changes: 1 addition & 1 deletion network/vpc/troubleshooting/resource-attached-no-ip.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ To fix this problem, **detach your resource from the Private Network, and reatta

Note that some manual configuration of the network interface is required for Elastic Metal servers. Follow the steps in our [dedicated documentation](/bare-metal/elastic-metal/how-to/use-private-networks/#how-to-configure-the-network-interface-on-your-elastic-metal-server-for-private-networks).

If you are running multiple virtual machines on an Elastic Metal server, we recommend that you use the IPAM API's [Attach IP to custom resource](https://www.scaleway.com/en/developers/api/ipam/#path-ips-attach-existing-ip-to-custom-resource) method to manage their private IPs. This allows you to assign a [reserved IP](/network/ipam/how-to/reserve-ip/) on a Private Network to a VM or other custom resource by passing its name and MAC address.
If you are running multiple virtual machines on an Elastic Metal server, you can reserve private IP addresses for them with IPAM, and attach a MAC address and resource name to these IPs. Follow our [dedicated documentation](/network/ipam/how-to/reserve-ip/#how-to-reserve-a-private-ip-address-with-an-attached-mac-address).

0 comments on commit d407fdc

Please sign in to comment.