Manage VLAN networks
VLAN networks allow your VMs to communicate without the network traffic passing through the public internet. It's also possible to connect your physical servers to your VMware VMs.
Use traditional VLAN-based networks to connect your VMware servers or physical hardware, or link VMware servers with physical hardware in the same data center.
If you only intend to connect VMs, we recommend using the simpler alternative private networks instead. VLAN networks are intended for specific use cases, such as connecting physical servers to each other or linking physical servers with virtual machines.
Create a VLAN network using the control panel
First, you need to create a VLAN network for the VMs to use. This is done under Network → VLAN networks in the left-hand menu. Here, click Create network.

In the dialog box that opens, select the data center where you want the network to be created. This should be the same data center where the VMs are located. Choose a name for the network as well. Then, click Create.

Once the network is created, it appears in the network overview.

Connect VMs to the VLAN network
For the VMs to communicate over the VLAN network, you need to add a new network adapter to each of the VMs that will use the network.
To add a network adapter to a VM, click on the VM under Virtual machines. Once the VM overview is open, select the Network adapters tab. There is already a network adapter listed here—the one used to access the internet. To create a new network adapter for the private network, click Create Network Adapter.

In the dialog box that opens, select the network adapter type. In most cases, the default option VMXNET 3 works perfectly. Then, under Connection Type, select VLAN network. Under Network, select the VLAN network that you just created. You can also adjust the speed of the network adapter.
Once you have made all the selections, click Create.

Repeat the same process for all VMs that need access to the VLAN network.
Before the VMs can use the network, you need to configure the network adapter on each VM and assign it a private IP address. The steps for doing this vary between operating systems. Below, we'll explain how to configure it for each operating system.
Right-click on the network icon in the system tray, then select Open Network & Internet settings.

Under Advanced network settings, click on Change adapter options.

There should now be two network adapters, Ethernet0 and Ethernet1. Under the adapter Ethernet1, it should say Unidentified network. If it does, you know this is the new adapter. Right-click on it and select Properties.

Now, select Internet Protocol Version 4 (TCP/IPv4) and click on Properties.

In the next dialog box, select Use the following IP address and enter a private IP address and subnet mask. It's essential to choose an IP address within the same network as the other VMs it needs to communicate with. In this example, we use the IP address 192.168.0.3 with the subnet mask 255.255.255.0. Click OK to save.

Now, close all the open dialog boxes.
Test and verify the network adapter
To verify that the network adapter has the correct IP address, open the command prompt by clicking on the Start menu and searching for cmd. Click on Command Prompt when it appears.
Type the command ipconfig to list all the IP addresses on the server.
Now we also try pinging another computer on the network.
Right-click on the network icon in the system tray, then select Network & Internet settings.

Next, click on Advanced network settings.

There should now be two network adapters, Ethernet0 and Ethernet1. Under the adapter Ethernet1, it should say Unidentified network. If it does, you know this is the new adapter. Click on it to show all the options, and then select Edit.

Now, select Internet Protocol Version 4 (TCP/IPv4) and click on Properties.

In the next dialog box, select Use the following IP address and enter a private IP address and subnet mask. It's important to choose an IP address within the same network as the other VMs it needs to communicate with. In this example, we use the IP address 192.168.0.3 with the subnet mask 255.255.255.0. Click OK to save.

Now, close all the open dialog boxes.
Test and verify the network adapter
To verify that the network adapter has the correct IP address, open the command prompt by clicking on the Start menu and searching for cmd. Click on Command Prompt when it appears.
Type the command ipconfig to list all the IP addresses on the server.
Now we also try pinging another computer on the network.
Before configuring the network in AlmaLinux, you need to disable automatic cloud network configuration to prevent your changes from being overwritten. This is done by editing the file /etc/cloud/cloud.cfg.d/99-custom-networking.cfg.
The file should have the following content:
Identify the new network adapter
Start by locating the name of the new network adapter by typing ip addr. The new adapter is the one that does not have any IP addresses. It is most likely the last one in the list. In the example below, ens224 is the new adapter.
Once you have identified the name of the new network adapter and disabled automatic cloud configuration, it's time to configure the network.
Configure the VLAN network connection
Start by listing the network profiles that AlmaLinux has created. Most likely, the system has created a new profile named Wired connection 1. This profile has probably not been linked to any network adapter yet. In the final step, you will link the profile to the network adapter.
Now, it's time to configure Wired Connection 1 with a private IP address and then link it to the network adapter ens224, as you saw in the output from ip addr. You also need to set the network profile to manual mode; otherwise, the system will attempt to obtain an IP address via DHCP. Here, we'll assign the server the private address 192.168.0.4 with a 24-bit subnet mask (255.255.255.0).
The network is now configured and ready to be used.
Test and verify the network adapter
To verify that the network adapter has received the IP address you assigned to it, you can use the command: ip addr show <adapter>:
You also try pinging another computer on the private network.
Before configuring the network in Ubuntu, you need to disable automatic cloud network configuration to prevent your changes from being overwritten. This is done by editing the file /etc/cloud/cloud.cfg.d/99-custom-networking.cfg.
The file should have the following content:
Identify the new network adapter
Start by locating the name of the new network adapter. You do this by typing ip addr. The new adapter is the one that does not have any IP addresses. It is most likely the last one in the list. In the example below, ens224 is the new adapter.
Once you have identified the name of the new network adapter and disabled automatic cloud configuration, it's time to configure the network.
Configure the VLAN network connection
Next, it's time to add a private IP address to the file /etc/netplan/50-cloud-init.yaml. Leave the first network adapter untouched, as it is used to access the internet. Only add the new adapter and assign it a private IP address. In this case, we assign it the IP address 192.168.0.2 with the subnet mask /24 (255.255.255.0). Here, the new adapter is named ens224.
Note that the line with ens224 must be indented with the same number of spaces as the line with ens192.
Activate the new settings with the command netplan try. With try, the settings will revert to a previous state if you get disconnected and cannot confirm the new settings by pressing the Enter key.
The network is now configured and ready to be used.
Test and verify the network adapter
To verify that the network adapter has received the IP address you assigned to it, you can use the command: ip addr show <adapter>:
You also try pinging another computer on the private network.
Before configuring the network in Debian, you need to disable automatic cloud network configuration to prevent your changes from being overwritten. This is done by editing the file /etc/cloud/cloud.cfg.d/99-custom-networking.cfg.
The file should have the following content:
Identify the new network adapter
Start by locating the name of the new network adapter. Do this by typing ip addr. The new adapter is the one that does not have any IP addresses. It is most likely the last one in the list. In the example below, ens224 is the new adapter.
Once you have identified the name of the new network adapter and disabled automatic cloud configuration, it's time to configure the network.
Configure the VLAN network connection
To configure the new network adapter ens224 in Debian, you only need to add a few lines at the end of the file /etc/network/interfaces.d/50-cloud-init. The other lines in the file are left untouched. Here, we assign the new adapter the IP address 192.168.0.5 with a 24-bit subnet mask (255.255.255.0).
The lines we add are these:
After that, we restart the network:
The network is now configured and ready to be used.
Test and verify the network adapter
To verify that the network adapter has received the IP address you assigned to it, you can use the command: ip addr show <adapter>:
You also try pinging another computer on the private network.
Connect physical servers to the VLAN network
To connect physical servers to the VLAN network, please contact the support team at [email protected].
Delete a VLAN network
To delete a VLAN network, you must first either disconnect all of the network adapters by connecting them to another network or simply delete the network adapters from the VMs. Here, we'll delete the network adapter from a VM connected to the VLAN.
Click on the VM in the Virtual machines overview. Select the Network adapters tab and click the cross next to the adapter connected to the private network.

Confirm the deletion by typing the name of the adapter in the dialog box that opens, and then click Delete.
When all the adapters are disconnected or deleted, you can delete the network.
To delete the network, click on VLAN networks in the left-hand menu in the control panel. Then, click the red cross to the right of the network.

In the next dialog box, confirm the deletion by typing the name of the network in the text field, and click Delete.
Manage VLAN networks using the API
Use the network module to manage VLAN networks using the API. For example:
To create a VLAN network, use the network/create endpoint.
To list your VLAN networks, use the network/list endpoint.
To view details about a specific network, use the network/details endpoint.
To delete a VLAN network, use the network/delete endpoint.
Use the networkadapter module to manage network adapters for VMs. For example:
Create a network adapter by using the networkadapter/create endpoint.
Delete a network adapter by using the networkadapter/delete endpoint.
To list existing network adapters and their ID for a VM, use the server/networkadapters endpoint.
Last updated
Was this helpful?