Jump toUpdate content

Quickstart

Reviewed on 26 May 2021Published on 26 May 2021

Scaleway Virtual Private Cloud provides network functionalities for your Scaleway products. VPC products include Private Networks, enabling you to build a virtual L2 network between your instances, and the Public Gateway, enabling IP autoconfiguration of your Private Networks and their communication with the Internet.

Requirements:

How to create a Private Network

  1. Click VPC in the Network section of the side menu.

  2. Click the Private Networks tab.

  3. Click the Create a Private Network button. The creation wizard displays.

  4. Complete the following steps in the wizard:

    • Enter a Name for your private network, or leave the randomly-generated name in place. Optionally, you can also add tags (/network/vpc/concepts/#tags) to help you organize your private networks.
    • Choose an Availability Zone, which is the geographical region where your private network will be deployed. You can only add Instances from this same Availability Zone to the private network.
  5. Click Create a Private Network to finish. Your private network is created. You are taken back to the Private Networks tab, where your new private network is now displayed in the list.

How to attach and detach Instances to/from a Private Network

Remember that Instances must be within the same Availability Zone as a private network in order to be attached to it. If you have not yet created an Instance, see how to do so here.

  1. Click VPC in the Network section of the side menu.

  2. Click the Private Networks tab.

  3. Click the private network you want to add/remove Instances to. Alternatively, click the «See more Icon» icon next to the private network in question and select More Info from the dropdown list. You are taken to the Overview page for that network.

  4. Click the Attached Resources tab.

  5. Use the dropdown menu to select an Instance to add to your private network, then click Add Instance.

To detach an Instance, use the «Unlink Icon» icon next to the Instance in question to remove it from your private network. Confirm this action when prompted by clicking Detach this Instance.

How to create a Public Gateway

  1. Click VPC in the Network section of the side menu. The VPC page displays.

  2. Click Create a new Public Gateway to launch the Public Gateway creation wizard.

  3. Complete the following steps in the wizard:

    • Choose an Availability Zone, which is the geographical location in which your Public Gateway will be created. Note that in order to attach a Public Gateway to a Private Network, they must be in the same Availability Zone.
    • Choose a Public Gateway Type, which impacts the pricing and bandwidth of your gateway.
    • Choose an IP. You can choose to assign one of your existing Flexible IPs to your Public Gateway. Otherwise, a new IP will be automatically assigned here.
    • Choose Name for your Public Gateway, and (optionally) a description and tags.
    • Verify the Estimated Cost of your Public Gateway, based on the specifications you chose.
  4. Click Create a Public Gateway to finish.

Your Public Gateway is created and you are redirected to the Public Gateways tab, where your newly-created Public Gateway now displays.

How to attach your Public Gateway to your Private Network

  1. Click VPC in the Network section of the side menu. The VPC page displays.

  2. Navigate to the Public Gateways tab.

  3. Click the Public Gateway that you want to attach to a Private Network. You are taken to the Overview page for that Public Gateway.

  4. Click the Private Networks tab. A list of Private Networks attached to the Public Gateway displays.

  5. Click «Plus Icon» to attach a new Private Network to the Public Gateway. The following pop-up displays:

  6. Choose to attach an existing or a new Private Network. The default parameters should be appropriate for most cases (DHCP enabled, subnet automatically computed, NAT enabled). However, if you wish you can alter them now, or later once you have attached the Public Gateway.

    • If you want to attach an existing Private Network, select Attach an existing Private Network and choose the desired network from the drop-down list.
      Note: Note: Only Private Networks which are in the same Availability Zone as the Public Gateway are displayed in this list.
    • If you want to create and attach a new Private Network, select Attach a new Private Network. A default name will be suggested for you, but feel free to overwrite this with a new name of your choice.
    • Choose whether to Enable or Disable the DHCP server:
      • Enable DHCP: The Public Gateway will dynamically assign IP addresses to Instances in the private network. Enabling DHCP also enables the advertisement of a default route and DNS server through the Public Gateway. Both of these options can be disabled later.
      • Disable DHCP: None of the above functionalities will be applied.
    • Choose the subnet you would like to use for this network, e.g. 192.168.42.0/24. You may find the note here helpful if you are having difficulty choosing a subnet.
    • Choose whether to Enable or Disable Dynamic NAT:
      • Enable Dynamic NAT: Private IP addresses in the private network are automatically mapped to the public IP address of the Public Gateway, enabling automatic routing of egress traffic to and from multiple devices within the private network. Note: you will also be able to configure static NAT settings for ingress traffic.
      • Disable Dynamic NAT: The above functionality is not applied.
  7. Click Attach a Private Network to finish. You are taken back to the Private Networks tab, where the network you attached now appears, along with the services configured and the IP address of the Public Gateway.

Your Private Network is now attached to your Public Gateway. You can repeat the steps above to attach more Private Networks to the same Public Gateway if you wish.