HomeComputeInstancesHow to
Use Private Networks
Jump toUpdate content

How to use Private Networks with your Instances

Reviewed on 16 June 2023Published 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 allocation of private IP addresses for Instances (and other resources) when they are attached to the network.

Security & Identity (IAM):

You may need certain IAM permissions to carry out some actions described on this page. This means:

  • you are the Owner of the Scaleway Organization in which the actions will be carried out, or
  • you are an IAM user of the Organization, with a policy granting you the necessary permission sets
Requirements:

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 (wit is 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 new Private Network without immediately attaching any resources, or you want to create the Private Network in a specific VPC or with a custom CIDR block, you should 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. 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:

Prior to deleting a Private Network, all Instances attached to the network have to be detached.

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

See Also