---
title: "Configuring the network on Windows Server with Hyper-V"
description: "Find out how to configure the network on Windows Server with Hyper-V"
url: https://docs.ovhcloud.com/en/guides/bare-metal-cloud/dedicated-servers/hyperv-network-hg-scale
lang: en
lastUpdated: 2025-05-16
---
# Configuring the network on Windows Server with Hyper-V

## Objective

**This guide explains how to configure the network in  Windows Server with Hyper-V.**

### High Grade & Scale ranges

As of May 2025, virtual MACs can be used to operate Additional IPs in _bridged_ mode on servers from the High Grade and Scale ranges.

If you want to use virtual MACs to configure the network with Hyper-V on High Grade or Scale servers, you can refer to [this guide](/en/guides/bare-metal-cloud/dedicated-servers/network-bridging.md).

### Advance range

As Advance servers only have 2 network interfaces, we advise configuring the server in full private mode with both interfaces in teaming connected to the vRack. A second server can act as an internet gateway with one interface connected to the private network and another connected to the public network.

For this type of configuration, it is possible to use the IP aliasing as described in the article [Configuring IP aliasing](/en/guides/bare-metal-cloud/dedicated-servers/network-ipaliasing.md).

It is also possible to set up such configuration (one interface on private network, the second on the public network) for each Hyper-V server and therefore not configure any teaming. In this case, the private network bandwidth is reduced and there’s no high availability on network interfaces.

## Requirements

- An [OVHcloud dedicated server](https://www.ovhcloud.com/en-gb/bare-metal/)
- An [Additional IP](https://www.ovhcloud.com/en-gb/network/additional-ip/)

:::warning
No virtual MACs should be applied to Additional IPs in the OVHcloud Control Panel.

:::

## Instructions

:::info
On these server ranges, there are 4 network cards. The first two for the public, the last two for the private network. To get all the bandwidth, aggregates must be created.

:::

### Additional IP in routed mode on public network interfaces

#### Explanations

You need to:

- Set up NIC Teaming.
- Install the Hyper-V and RRAS roles.
- Setup RRAS to act as a router.

#### Identify Interfaces and Configure NIC teaming

Open Windows Powershell and execute the command `Get-NetAdapter`:

```powershell
PS C:\Windows\system32> Get-NetAdapter

Name                      InterfaceDescription                    ifIndex Status       MacAddress             LinkSpeed
----                      --------------------                    ------- ------       ----------             ---------
Ethernet                  Mellanox ConnectX-5 Adapter                   9 Up           04-3F-72-D5-C3-38        25 Gbps
Ethernet 4                Mellanox ConnectX-5 Adapter #4                7 Up           0C-42-A1-DD-37-B3        25 Gbps
Ethernet 2                Mellanox ConnectX-5 Adapter #2                6 Up           04-3F-72-D5-C3-39        25 Gbps
Ethernet 3                Mellanox ConnectX-5 Adapter #3                4 Up           0C-42-A1-DD-37-B2        25 Gbps
```

In our example:

- The public interfaces are `Ethernet 3` and `Ethernet 4`.
- The private interfaces are `Ethernet` and `Ethernet 2`.

:::info
Check that your configuration is similar. You can access information on MACs and public or private interfaces in your OVHcloud Control Panel
 or via the OVHcloud API.
:::

Now go back to the Server Manager and go to `Local Server
` and click on `Disabled
` opposite `NIC Teaming`
.
![NIC Teaming](/images/bare-metal-cloud/dedicated-servers/hyperv-network-HG-Scale/nic_teaming_1.png)
On the following page, right-click one of public interfaces identified earlier and click `Add to New Team
`.
![NIC Teaming](/images/bare-metal-cloud/dedicated-servers/hyperv-network-HG-Scale/nic_teaming_2.png)
Next, give your team a name, add the second interface to the team, then expand the Additional Properties and set "Teaming Mode" to `LACP`
, and finally click `OK
`.
#### Configure a static IP

In order to prevent a connection loss on a reboot we will need to configure the IP statically on the team.

Press `Windows Key`
 + `R`
 to open a "Run" window. Enter `ncpa.cpl`
 and click `OK
`. This will open your Network Connections control panel.
![Static IP](/images/bare-metal-cloud/dedicated-servers/hyperv-network-HG-Scale/static_ip_1.png)
Right click on your team that you created and click `Properties
`.
![Static IP](/images/bare-metal-cloud/dedicated-servers/hyperv-network-HG-Scale/static_ip_2.png)
Next, double-click on `Internet Protocol Version 4 (TCP/IPv4)
`.
![Static IP](/images/bare-metal-cloud/dedicated-servers/hyperv-network-HG-Scale/static_ip_3.png)
Select `Use the following IP address` and insert your IP address.

The "Subnet mask" and "Default gateway" will be: 255.255.255.255 and 100.64.0.1 as shown below.

For DNS servers, you can choose your own. For our example we are using 213.186.33.99 and 8.8.8.8.

Once done, click `OK
` to close the Window, and `OK
` again to close the adapter properties Window.
![Static IP](/images/bare-metal-cloud/dedicated-servers/hyperv-network-HG-Scale/static_ip_4.png)
#### Installing the Hyper-V and RRAS Roles

Go to the Server Manager and open the `Dashboard
`, then click on `Add roles and features
`
![Install roles](/images/bare-metal-cloud/dedicated-servers/hyperv-network-HG-Scale/install_roles_1.png)
Go through the Wizard until you reach the `Server Roles` section and select `Hyper-V` and `Remote Access`.

![Install roles](/images/bare-metal-cloud/dedicated-servers/hyperv-network-HG-Scale/install_roles_2.png)
Next, proceed to the `Virtual Switches` subsection of `Hyper-V` and ensure no interfaces are selected.

![Install roles](/images/bare-metal-cloud/dedicated-servers/hyperv-network-HG-Scale/install_roles_3_2.png)
Next, proceed to the `Role Services` subsection of `Remote Access` and select `Routing`.

![Install roles](/images/bare-metal-cloud/dedicated-servers/hyperv-network-HG-Scale/install_roles_4.png)
Finally, proceed to the `Confirmation`
 section, select `Restart the destination server automatically if required`
 and click `Install
`.
#### Creating the Virtual Switch

With the newest versions of Windows Server, Hyper-V virtual switches on an LBFO-Type Network adapter cluster are deprecated. As such we will need to create the switch manually using Powershell. Run the following command and replace "vSwitch\_Name" with the name of your choice and replace "NIC\_Team\_Name" with the name of the NIC team that you created earlier:

```powershell
New-VMSwitch -Name "vSwitch_Name" -NetAdapterName "NIC_Team_Name" -AllowNetLbfoTeams $true -AllowManagementOS $true 
```

#### Configure Routing and Remote Access

Open the new application called `Routing and Remote Access`
 and right click on your server and choose `Configure and Enable Routing and Remote Access
`.
![Configure RRAS](/images/bare-metal-cloud/dedicated-servers/hyperv-network-HG-Scale/configure_rras_1.png)
Now, choose `Custom configuration`
 and click `Next
`.
![Configure RRAS](/images/bare-metal-cloud/dedicated-servers/hyperv-network-HG-Scale/configure_rras_2.png)
Next, you need to select `LAN routing`
 and then click `Next
`.
![Configure RRAS](/images/bare-metal-cloud/dedicated-servers/hyperv-network-HG-Scale/configure_rras_3.png)
Finally, click on `Finish
` and then `Start Service
` on the popup that will appear.
![Configure RRAS](/images/bare-metal-cloud/dedicated-servers/hyperv-network-HG-Scale/configure_rras_4.png)
#### Set Primary and Additional IP statically on Hyper-V interface

We must now move the IP configuration to the Hyper-V interface.

Press `Windows Key`
 + `R`
 to open a "Run" window. Enter `ncpa.cpl`
 and click `OK
`. This will open your Network Connections control panel.
![Static IP](/images/bare-metal-cloud/dedicated-servers/hyperv-network-HG-Scale/static_ip_1.png)
Right click on your vEthernet Adapter and click `Properties
`.
![Static IP](/images/bare-metal-cloud/dedicated-servers/hyperv-network-HG-Scale/static_ip_5.png)
Next, double-click on `Internet Protocol Version 4 (TCP/IPv4)
`.
![Static IP](/images/bare-metal-cloud/dedicated-servers/hyperv-network-HG-Scale/static_ip_3.png)
Select `Use the following IP address` and insert your IP address.

The "Subnet mask" and "Default gateway" will be: 255.255.255.255 and 100.64.0.1 as shown below.

For DNS servers, you can choose your own. For our example we are using 213.186.33.99 and 8.8.8.8.

![Static IP](/images/bare-metal-cloud/dedicated-servers/hyperv-network-HG-Scale/static_ip_4.png)
Next click on the `Advanced...
` button and in the new Window click `Add...
` under IP addresses.
Add your IP address and subnet mask for your Additional IP and click `Add
`.
![Static IP](/images/bare-metal-cloud/dedicated-servers/hyperv-network-HG-Scale/static_ip_6.png)
Once done, click `OK
` to close the Advanced Window, click `OK
` again to close the TCP/IPv4 settings, and finally click `OK
`, to close the adapter properties Window.
:::warning
This step can cause a connection loss. If it occurs, please connect using the [IPMI](/en/guides/bare-metal-cloud/dedicated-servers/ipmi.md) and edit the configuration again. You will find that your default gateway is reverted back to blank. You would need to re-add the gateway of 100.64.0.1.

:::

#### Add a static route

Open a command prompt as administrator and run the command `route print interface`:

```powershell
C:\Users\admin>route print interface
===========================================================================
Interface List
 22...0c 42 a1 dd 37 b2 ......Hyper-V Virtual Ethernet Adapter
 10...04 3f 72 d5 c3 38 ......Mellanox ConnectX-5 Adapter
  7...04 3f 72 d5 c3 39 ......Mellanox ConnectX-5 Adapter #2
  1...........................Software Loopback Interface 1
===========================================================================
```

In our example you will see that our Hyper-V adapter has the ID of 22.

Take note of your Hyper-V adapter then run the command `route add -p 192.xxx.xxx.16 mask 255.255.255.255 0.0.0.0 if 22`
 (replace the IP and interface ID with the one you received).

You should have the result `OK!`

```powershell
PS C:\Users\admin> route add -p 192.xxx.xxx.16 mask 255.255.255.255 0.0.0.0 if 22
 OK!
```

Your VM, once created and configured, should now have internet access.

#### Configuration example of a client VM on Ubuntu

File contents of `/etc/netplan/ip.yaml`:

```yaml
network:
        version: 2
        ethernets:
                eth0:
                        dhcp4: no
                        addresses:
                                - 192.xxx.xxx.16/32
                        nameservers:
                                addresses:
                                        - 213.186.33.99
                                        - 8.8.8.8
                        routes:
                                - to: 0.0.0.0/0
                                  via: 100.64.0.1
                                  on-link: true
```

### Additional IP via vRack

#### Requirements

- A public block of IP addresses in your account, with a minimum of four addresses
- Your chosen private IP address range
- A [vRack compatible server](https://www.ovhcloud.com/en-gb/bare-metal/)
- A [vRack](https://www.ovhcloud.com/en-gb/network/vrack/) service activated in your account

#### Explanations

You need to:

- Create an aggregate.
- Create a bridge connected to the aggregate.

#### Identify Interfaces and Configure NIC teaming

Open Windows Powershell and Execute the command `Get-NetAdapter`:

```powershell
PS C:\Windows\system32> Get-NetAdapter

Name                      InterfaceDescription                    ifIndex Status       MacAddress             LinkSpeed
----                      --------------------                    ------- ------       ----------             ---------
Ethernet                  Mellanox ConnectX-5 Adapter                   9 Up           04-3F-72-D5-C3-38        25 Gbps
Ethernet 4                Mellanox ConnectX-5 Adapter #4                7 Up           0C-42-A1-DD-37-B3        25 Gbps
Ethernet 2                Mellanox ConnectX-5 Adapter #2                6 Up           04-3F-72-D5-C3-39        25 Gbps
Ethernet 3                Mellanox ConnectX-5 Adapter #3                4 Up           0C-42-A1-DD-37-B2        25 Gbps
```

In our example:

- The public interfaces are `Ethernet 3` and `Ethernet 4`.
- The private interfaces are `Ethernet` and `Ethernet 2`.

:::info
Check that your configuration is similar. You can access information on MACs and public or private interfaces in your OVHcloud Control Panel
 or via the OVHcloud API.
:::

Now go back to the Server Manager, go to `Local Server`
 and click on `Disabled
` besides NIC Teaming.
![NIC Teaming](/images/bare-metal-cloud/dedicated-servers/hyperv-network-HG-Scale/nic_teaming_1.png)
On the following page, right-click one of private interfaces identified earlier and click `Add to New Team
`.
![NIC Teaming](/images/bare-metal-cloud/dedicated-servers/hyperv-network-HG-Scale/nic_teaming_2.png)
Next, give your team a name, add the second interface to the team, then expand the Additional Properties and set "Teaming Mode" to `LACP`
, and finally click `OK
`.
#### Create the Virtual Switch via Powershell

We will need to create a virtual switch that will link our VMs to the Team that we created.

First, open Powershell as an admin and run the following command. Replace "vSwitch\_Name" with the name of your choice and replace "NIC\_Team\_Name" with the name of the NIC team that you created earlier:

```powershell
New-VMSwitch -Name "vSwitch_Name" -NetAdapterName "NIC_Team_Name" -AllowNetLbfoTeams $true -AllowManagementOS $true 
```

You are now ready to create your VM and configure the network for it.

#### Configure a usable IP address

For vRack, the first, penultimate, and last addresses in a given IP block are always reserved for the network address, network gateway, and network _broadcast_ respectively. This means that the first usable address is the second address in the block, as shown below:

```console
46.105.135.96 # Reserved: network address
46.105.135.97 # First usable IP
46.105.135.98
46.105.135.99
46.105.135.100
46.105.135.101
46.105.135.102
46.105.135.103
46.105.135.104
46.105.135.105
46.105.135.106
46.105.135.107
46.105.135.108
46.105.135.109 # Last usable IP
46.105.135.110 # Reserved: network gateway
46.105.135.111 # Reserved: network broadcast
```

To configure the first usable IP address, you must edit the network configuration file as shown below. In this example, we use a subnet mask of **255.255.255.240**.

:::info
The subnet mask used in this example is appropriate for our IP block. Your subnet mask may differ depending on the size of your block. When you purchase your IP block, you will receive an email notifying you of the subnet mask to use.

:::

#### Configuration example of a client VM on Ubuntu

Content of the file `/etc/netplan/vrack.yaml`:

```yaml
network:
        version: 2
        ethernets:
                eth0:
                        dhcp4: no
                        addresses:
                                - 46.105.135.97/28
                        nameservers:
                                addresses:
                                        - 213.186.33.99
                                        - 8.8.8.8
                        routes:
                                - to: 0.0.0.0/0
                                  via: 46.105.135.110
                                  on-link: true
```

## Go further

Join our [community of users](https://community.ovhcloud.com/).
