NavigationContentFooter

Elastic Metal - Private Networks API

Download (.yml, 19KB)

Introduction

Private Networks, allow to facilitate the interconnection of resources via a dedicated, private, and flexible L2 network.

This documentation describes the usage of the Private Network feature on Elastic Metal servers.

You have the flexibility to add multiple servers to your Private Networks and can connect up to eight (8) distinct networks per server, in the form of additional network interfaces within the server (VLANs). With this feature, you can isolate services from the public internet and expose them to the rest of your infrastructure without concern about public network filtering.

Servers can be added or removed from a Private Network at any time, even while running. The network interface will be hot-plugged into the server, and software can be configured to set it up automatically as soon as it appears.

Note

Keep in mind that Private Networks for Elastic Metal servers are zoned and not regional, thus you will only be able to connect servers to networks from the same Availability Zone.

Important

This documentation refers to Private Networks for Elastic Metal servers. If you are looking for information for Private Networks on other products, refer to our VPC API documentation.

Concepts

Refer to our dedicated concepts page to find definitions of all concepts and terminology related to Elastic Metal servers.

Quickstart

  1. Configure your environment variables.

    export SCW_SECRET_KEY="<API secret key>"
    export SCW_DEFAULT_ZONE="<Scaleway Availability Zone>"
    export SCW_PROJECT_ID="<Scaleway Project ID>"
    Tip

    This is an optional step that seeks to simplify your usage of the Private Netowrks API. See Availability Zones below for help choosing an Availability Zone. You can find your Project ID in the Scaleway console.

  2. Create a Private Network for your Elastic Metal server.

  3. Add a server to the Private Network.

    curl -s -H "Content-Type: application/json" \
    -H "X-Auth-Token: $SECRET_KEY" \
    https://api.scaleway.com/baremetal/v1/zones/$SCW_DEFAULT_ZONE/servers/$EM_SERVER_ID/private-networks \
    -d '{"private_network_id": "'$PN_ID'"}'
    Note

    Keep the vlan field from the response. It is your VLAN ID, and will be used to configure the server to handle traffic from and to the Private Network.

  4. Connect to your Elastic Metal server and use the following command to configure your Private Network interface"

    sudo ip link add link eno1 name eno1.$VLAN type vlan id $VLAN
    sudo ip link set eno1.$VLAN up
    sudo ip addr add 192.168.0.10/24 dev eno1.$VLAN
Requirements

To perform the following steps, you must first ensure that:

  • You have a Scaleway account
  • You have created an API key and that the API key has sufficient IAM permissions to perform the actions described on this page
  • You have installed curl

Technical information

Pagination

Most listing requests receive a paginated response. Requests against paginated endpoints accept two query arguments:

  • page, a positive integer to choose which page to return.
  • page_size, a positive integer lower or equal to 100 to select the number of items to return per page. The default value is 20.

Paginated endpoints usually also accept filters to search and sort results. These filters are documented along each endpoint documentation.

Availability Zones

Private Networks for Elastic Metal servers can be deployed in the following Availability Zones:

NameAPI ID
Parisfr-par-1 fr-par-2
Amsterdamnl-ams-1 nl-ams-2
Warsawpl-waw-2 pl-waw-3

Technical limitations

  • You need to configure a VLAN manually, using the Elastic Metal server interface
  • The bandwidth is limited to 1Gbps inside the Private Network
  • You can configure up to 8 Private Networks per server
  • Broadcast and multicast traffic, while supported, are rate-limited

Going further

For more help using Private Networks on Elastic Metal servers, check out the following resources:

  • Our main documentation
  • The #private-networks channel on our Slack Community
  • Our support ticketing system.

Private Networks

A Private Network allows you to interconnect your resources in an isolated and private network. Network reachability is limited to the resources that are on the same Private Network. A VLAN interface is available on the server and can be freely managed (adding IP addresses, shutdown interface etc.).

Note that a resource can be a part of multiple Private Networks.

GET
/baremetal/v3/zones/{zone}/server-private-networks
POST
/baremetal/v3/zones/{zone}/servers/{server_id}/private-networks
PUT
/baremetal/v3/zones/{zone}/servers/{server_id}/private-networks
DELETE
/baremetal/v3/zones/{zone}/servers/{server_id}/private-networks/{private_network_id}
API DocsScaleway consoleDedibox consoleScaleway LearningScaleway.comPricingBlogCareers
© 2023-2024 – Scaleway