On This Page
Loading...

VLANs on Equinix Metal

COMMAND LINE

Copy to clipboard

VLANs on Equinix Metal

Equinix Metal™ provides Layer 2 virtual networks to connect your servers and other infrastructure. Here are some things to know about our VLANs:

  • VLANs are available in all Metros and Facilities.
  • VLANs are Project-level infrastructure.
  • There is no additional cost to adding a VLAN to a Project.
  • You may have up to 12 VLANs in a Project, and not all VLANs have to be in the same Metro.
  • A VLAN is local to a Metro. You cannot connect servers to a VLAN outside it's Metro.
  • VLANs support up to a 9000 byte maximum transmission unit (MTU) and jumbo Ethernet frames.

Creating a VLAN

You manage VLANs on the project's Layer 2 page. From the the project's IPs and Networks tab and click Layer 2. To provision a VLAN, click + Add VLAN.

Pick the Metro from the drop-down and give it a description. When you click Add, the VLAN is automatically provisioned.

Adding a VLAN to Your Project

Once it's done provisioning, the new VLAN will be listed on the Layer 2 page. The assigned VLAN ID displayed here will be used when you attach servers to the VLAN.

To create a VLAN, send a POST request to the /projects/{id}/virtual-networks endpoint. The Project ID is a path parameter, and you give your VLAN a description, where it is provisioned, and an ID number (using a unique integer between 2 and 3999) in the body of the request.

curl -X POST \
-H "Content-Type: application/json" \
-H "X-Auth-Token: <API_TOKEN>" \
"https://api.equinix.com/metal/v1/projects/{id}/virtual-networks" \
-d '{
    "vxlan": <integer>,
    "description": "<description>",
    "metro": "<metro_code>"
    }'

Using Your VLAN

Once you have a VLAN, you can configure any servers in the project to connect to it. The networking mode you choose for each server can vary by use-case, location, and high-availability concerns.

A summary of the different networking modes is on the Layer 2 Networking Overview page.

Details and instructions on how to convert to the different networking modes and configure your servers to connect to your VLANs are on the pages for each mode.

Managing VLANs

You manage VLANs on the project's Layer 2 page. From the the project's IPs and Networks tab and click Layer 2. Each VLAN in the Project is listed with its ID, description, location, number of connections, and the option to Delete it.

VLANs listed on the Layer 2 page

To list the VLANs in a Project, send a GET request to the /projects/{id}/virtual-networks endpoint.

curl -X GET -H 'X-Auth-Token: <API_TOKEN>' https://api.equinix.com/metal/v1/projects/{id}/virtual-networks

To get the details of a specific VLAN, send a GET request to the /virtual-networks/{id} endpoint.

curl -X GET -H 'X-Auth-Token: <API_TOKEN>' https://api.equinix.com/metal/v1/virtual-networks/{id}

Deleting a VLAN

From the the project's IPs and Networks tab and click Layer 2. Click Delete next to the VLAN you are deleting, and click Yes to confirm.

Deleting a VLAN

Note that in order to delete a VLAN, you must first detach any devices that are attached to it, otherwise it will return an error.

To delete a VLAN, send a DELETE request to the /virtual-networks/{id} endpoint.

curl -X DELETE -H 'X-Auth-Token: <API_TOKEN>' https://api.equinix.com/metal/v1/virtual-networks/{id}

Note that you cannot delete a VLAN that has devices attached to it. Detach any devices first, otherwise it will return an error.

Facility-based VLANs

Prior to the introduction of Metros in April 2021, VLANs were provisioned at the facility-level, and VLANs could only connect servers in a single facility. VLANs provisioned before Metros continue to function in this manner; they continue to work as-is.

However, facility-based VLANs and metro-based VLANs are not compatible.

First, it is possible to have both facility and metro VLANs in the same project, but if you have a facility VLAN 1001, you cannot create a Metro VLAN 1001. And likewise, if you have a Metro VLAN 1002, you will not have a facility VLAN 1002.

Second, it is not possible to expand an existing facility-level VLAN into a Metro VLAN. You will need to provision an entirely new Metro-aware VLAN, and reconfigure your servers to use it.

Third, it is possible to stick with provisioning VLANs at the facility-level if your use-case warrants it, but the default experience in the console is Metro-based, and you will have to use the API. To create a VLAN, send a POST request to the /projects/{id}/virtual-networks endpoint. The Project ID is a path parameter, and you give your VLAN a description and the facility where it will be provisioned in the body of the request.

curl -X POST \
-H "Content-Type: application/json" \
-H "X-Auth-Token: <API_TOKEN>" \
"https://api.equinix.com/metal/v1/projects/{id}/virtual-networks" \
-d '{
    "description": "<description>", 
    "facility": "<facility_code>"
    }'

Frequently
asked questions

Slack

Still stuck?

Join us on Slack

Get support from our team and community members.

Frequently asked questions

What 3rd party Managed Services?

Neutra trust fund narwhal, palo santo bicycle rights live-edge stumptown health goth portland selfies kinfolk woke. ssss Echo park irony artisan vaporware typewriter. Next level pinterest drinking vinegar lyft mumblecore af small batch heirloom VHS. Fixie banh mi asymmetrical trust fund.

What 3rd party Managed Services?

Neutra trust fund narwhal, palo santo bicycle rights live-edge stumptown health goth portland selfies kinfolk woke. ssss Echo park irony artisan vaporware typewriter. Next level pinterest drinking vinegar lyft mumblecore af small batch heirloom VHS. Fixie banh mi asymmetrical trust fund.

What 3rd party Managed Services?

Neutra trust fund narwhal, palo santo bicycle rights live-edge stumptown health goth portland selfies kinfolk woke. ssss Echo park irony artisan vaporware typewriter. Next level pinterest drinking vinegar lyft mumblecore af small batch heirloom VHS. Fixie banh mi asymmetrical trust fund.

Copied code to clipboard