NavigationContentFooter
Jump toSuggest an edit

How to use Private Networks with your Instances

Reviewed on 26 August 2024Published on 26 May 2021

Private Networks allow your Instances to communicate in an isolated and secure network without needing to be connected to the public internet. Each Instance can be connected to one or several Private Networks, letting you build your own network topologies.

Private Networks are LAN-like layer 2 ethernet networks. A new network interface with a unique media access control address (MAC address) is configured on each Instance in a Private Network. Private Networks’ built-in DHCP server manages the distribution of private IP addresses for Instances (and other resources) when they are attached to the network.

Before you start

To complete the actions presented below, you must have:

  • A Scaleway account logged into the console
  • Owner status or IAM permissions allowing you to perform actions in the intended Organization
  • An Instance

How to create a new Private Network

The procedure below shows you how to create a new Private Network to attach to an existing Instance. The Private Network will have default settings (created in your default VPC for the region, with an auto-generated CIDR block). This CIDR block will be used to allocate private IP addresses to Instances attached to the network. Each Instance will get an IPv4 and an IPv6 address on the Private Network.

If you want to create a Private Network without immediately attaching any resources or create it in a specific VPC or with a custom CIDR block, follow this procedure instead.

  1. Click Instances in the Compute section of the side menu. The Instances page displays.

  2. Click the Instance you want to add a Private Network to.

  3. Click the Private Networks tab.

  4. Click the Attach to a Private Network button. A pop-up displays.

  5. Select Attach to a new Private Network.

  6. Enter a Name for your Private Network, or leave the randomly-generated name in place.

  7. Click Attach to a Private Network to finish.

    Your Private Network is created in your default VPC for the region. The Private Network will have default settings, meaning an auto-generated CIDR block.

    You are taken back to the Private Networks tab, where your new Private Network is now displayed in the list and you can see the IP address for your Instance on the network. For more information about resources’ private IP addresses on a Private Network, see our dedicated documentation.

How to attach Instances to an existing Private Network

  1. Click Instances in the Compute section of the side menu. The Instances page displays.

  2. Click the Instance you want to add a Private Network to.

  3. Click the Private Networks tab.

  4. Click the Attach to a Private Network button. A pop-up displays.

  5. Select *Attach to an existing Private Network

  6. Select the Private Network you want to attach the Instance to.

    Note

    Only Instances from the same region as your Private Network will be available in the drop-down menu.

  7. Choose whether to auto-allocate an available IP from the pool (the CIDR block defined at the time of creating the Private Network), or use a reserved IP address for the attachment. You must make this choice for both the IPv4 and IPv6 address that the Instance will have on this Private Network.

  8. Click Attach to Private Network.

    You are taken back to the Private Networks tab, where you can see the private IP address for the Instance you just attached. For more information about resources’ private IP addresses on a Private Network, see our dedicated documentation.

How to detach Instances from a Private Network

  1. Click Instances in the Compute section of the side menu. The Instances page displays.

  2. Click the Instance you want to detach from a Private Network.

  3. Click the Private Networks tab.

  4. Click the «Unlink Icon» icon next to the resource you want to detach.

  5. Click Detach resource when prompted to confirm.

    You are taken back to the Private Networks tab, where the Instance you just detached is now removed from the list.

How to delete a Private Network

Note

Before deleting a Private Network, you must detach all Instances attached to it.

This must be carried out from the VPC section of the console. Follow the procedure detailed in our dedicated VPC documentation.

See also
How to use Security GroupsHow to configure reverse DNS
API DocsScaleway consoleDedibox consoleScaleway LearningScaleway.comPricingBlogCareers
© 2023-2024 – Scaleway