vSwitch for Windows servers

Last change on 2021-04-23 • Created on 2020-05-18 • ID: RO-93219

General information

With the vSwitch feature, Hetzner Online has created a tool for your dedicated root servers that lets you connect your servers in multiple locations to each other using virtual layer 2 networks. On your account on the Robot administration interface, you can create and configure vSwitches using the "vSwitches" button in the server overview. You can find more details in this article vSwitch.

Server configuration (Windows)

On the host system

For the vSwitch, you need to configure an interface with the VLAN ID that you have entered on Robot. You should limit the MTU of the interface to 1400.

NIC teaming

To send VLAN traffic via the same interface as the host's main IP address, you need to include the physical adapter in a team. You also need to assign a virtual interface for each VLAN ID to the team and its corresponding team adapter.

In Window's Server Manager, go to "Local Server" and then to "NIC teaming".

Windows vlan nic teaming

You will now see a new window for NIC teaming. Create a new team by going to Teams, then click on Tasks, and then on New team.

Windows vlan team

Windows vlan team dialog

Add a new interface to the team by going to Adapters and interfaces. Then click on Team Interfaces and select the correct adapter. Then go to Tasks, and then click on Add interface. Enter the VLAN ID you chose for your vSwitch on Robot.

Windows vlan interface

Windows vlan interface dialog.png

Interface configuration

You can now manage the VLAN interface that you created using NIC teaming. Go to the control panel and then to Adapter configuration.

Important note: Windows does not support multiple default gateways. Depending on your individual configuration, you may therefore have to set additional static routes according to your requirements.

Add IPs

You can configure an IP as usual by going to the interface properties.

Windows vlan private ip

More than one IP on the interface

You can add additional IPs by going to the TCP/IP dialog and then clicking on the Advanced... button.

Windows vlan additional ip

MTU

Reduce the MTU to 1400 for VLAN interfaces. You can configure this via command prompt.

Retrieve the interface names and IDs:

\:> netsh interface ip show interface

Set the MTU for the individual VLAN interfaces:

\:> netsh interface ipv4 set subinterface <id> mtu=1400 store=persistent

Do the same for IPv6:

\:> netsh interface ipv6 set subinterface <id> mtu=1400 store=persistent

Hyper-V

It is not necessary to do a configuration with NIC teaming so that you can use VLANs in connections with virtual servers.

All you need to do is configure a VLAN ID for each virtual machine's network adapter by going to Settings.

But you still need to change the MTU for each virtual server.

Table of Contents