Skip to content

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 data centers and Equinix IBX locations.
  • 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 data center.
  • A VLAN is local to a specific data center. You cannot connect Equinix Metal servers to a VLAN outside it's data center.
  • 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 facility from the drop-down and give it a description. When you click Add, the VLAN is automatically provisioned in the data center.

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) 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>", 
    "vxlan": "<integer>"
    }'

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.