Guide

Team network cards with SET

Switch Embedded Teaming, or SET, joins two network cards into one virtual switch. Management, cluster and VM traffic all run over the pair, and carry on if one card fails.

15 minutesRun as the local Administrator at the server's console
What improves

Management, cluster and VM traffic carry on if a network card fails.

Why it matters

A host with one card for management is cut off the moment that card or its cable fails.

How you do it

Create a team switch from two cards, add management and cluster cards on it, then set their addresses.

Work at the console

The server has no management address until this guide is finished, so you cannot do it over a remote connection. Sign in as the local Administrator. A domain admin in Protected Users cannot sign in while the server cannot reach a domain controller.

What you are building

ItemExampleVLANAddress
Team switchCON-SET-01, from cards SET-1 and SET-2TrunkNone
Management cardvEthernet (Mgmt)3010.0.30.31/24, gateway 10.0.30.1
Cluster cardvEthernet (Cluster)7010.0.70.11/24

The management and cluster cards are virtual. They sit on the team, so each one keeps working if either real card fails.

Before this guide

The server needs its two team cards, as in Add team and storage network cards, and the Hyper-V role, as in Install the Hyper-V and clustering roles.

Create the team switch

CON-HV-01
New-VMSwitch -Name 'CON-SET-01' -NetAdapterName 'SET-1','SET-2' -EnableEmbeddedTeaming $true -AllowManagementOS $false | Out-Null
Set-VMSwitchTeam -Name 'CON-SET-01' -LoadBalancingAlgorithm HyperVPort
PartMeaning
EnableEmbeddedTeamingBuilds the team inside the switch. No separate team has to be created first.
AllowManagementOS $falseStops Windows adding a default management card. You add named ones in the next step.
HyperVPortSpreads traffic across the cards by virtual card. It is the usual choice for a Hyper-V host.

Add the management and cluster cards

CON-HV-01
Add-VMNetworkAdapter -ManagementOS -SwitchName 'CON-SET-01' -Name 'Mgmt'
Add-VMNetworkAdapter -ManagementOS -SwitchName 'CON-SET-01' -Name 'Cluster'
Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName 'Mgmt'    -Access -VlanId 30
Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName 'Cluster' -Access -VlanId 70

Windows shows them as vEthernet (Mgmt) and vEthernet (Cluster).

Set the addresses

CON-HV-01
New-NetIPAddress -InterfaceAlias 'vEthernet (Mgmt)' -IPAddress 10.0.30.31 -PrefixLength 24 -DefaultGateway 10.0.30.1 | Out-Null
Set-DnsClientServerAddress -InterfaceAlias 'vEthernet (Mgmt)' -ServerAddresses 10.0.20.10, 10.0.20.11

New-NetIPAddress -InterfaceAlias 'vEthernet (Cluster)' -IPAddress 10.0.70.11 -PrefixLength 24 | Out-Null
Set-DnsClient -InterfaceAlias 'vEthernet (Cluster)' -RegisterThisConnectionsAddress $false

Only the management card has a gateway and registers in DNS.

Check it

CON-HV-01
Get-VMSwitchTeam -Name 'CON-SET-01' | Format-List Name, TeamingMode, LoadBalancingAlgorithm, @{n='Members';e={$_.NetAdapterInterfaceDescription -join ', '}}
Get-NetIPAddress -AddressFamily IPv4 | Where-Object { $_.InterfaceAlias -notlike 'Loopback*' -and $_.IPAddress -notlike '169.254*' } |
    Sort-Object InterfaceAlias | Format-Table InterfaceAlias, IPAddress, PrefixLength -AutoSize
(Test-NetConnection 10.0.20.10 -Port 389 -WarningAction SilentlyContinue).TcpTestSucceeded
CheckWhat you want
TeamSwitchIndependent, HyperVPort, two members.
AddressesThe management, cluster and two storage addresses.
Last lineTrue. The server reaches a domain controller through the team.

If the last line says False, wait 30 seconds and run it again. A new address takes a moment to start working.

Check the second host can reach the first

When you have done both hosts, test from the second one:

CON-HV-02
Test-Connection 10.0.70.11 -Count 2 -Quiet   # cluster network
Test-Connection 10.0.30.31 -Count 2 -Quiet   # management network

Both should say True. A cluster needs the hosts to reach each other on both.

Test the team by failing a card

Start this on the server. It prints a line every three seconds for two minutes.

CON-HV-01
$end = (Get-Date).AddMinutes(2)
while ((Get-Date) -lt $end) {
    $s1 = (Get-NetAdapter 'SET-1').Status
    $s2 = (Get-NetAdapter 'SET-2').Status
    $dc = Test-Connection 10.0.20.10 -Count 1 -Quiet
    $hv = Test-Connection 10.0.70.12 -Count 1 -Quiet
    "{0:HH:mm:ss}  SET-1: {1,-12} SET-2: {2,-12} DC: {3,-5} Other host: {4}" -f (Get-Date), $s1, $s2, $dc, $hv
    Start-Sleep -Seconds 3
}

While it runs, take one team card away. On a physical server, pull its network cable. If the server is a VM, disconnect the card on the machine it runs on:

Hyper-V host
Disconnect-VMNetworkAdapter -VMName 'CON-HV-01' -Name 'SET-1'

SET-1 should change to Disconnected while both tests stay True. One missed line at the moment of the switch is acceptable. After half a minute, put it back:

Hyper-V host
Connect-VMNetworkAdapter -VMName 'CON-HV-01' -Name 'SET-1' -SwitchName 'CON-LAN'
Get-VMNetworkAdapterVlan -VMName 'CON-HV-01' | Format-Table @{n='Card';e={$_.ParentAdapter.Name}}, OperationMode, AllowedVlanIdList -AutoSize

The card should come back as a Trunk with its VLANs, and the watcher should show both cards Up again. Then repeat with SET-2, so you know either card can carry the load alone.

Changing an existing server

If the server already has a management address on an ordinary card, remove it first so it can move to the team:

CON-HV-01
Remove-NetIPAddress -InterfaceAlias 'Mgmt' -Confirm:$false
Remove-NetRoute -InterfaceAlias 'Mgmt' -Confirm:$false

Storage connections on the storage cards are not affected and stay up throughout.

Done when

Check

The team has two members, the server has its management and cluster addresses on virtual cards, and it reaches a domain controller.

Your progress is kept in this browser only.