In my previous post “ https://robertsmit.wordpress.com/2013/02/04/team-in-windows-2012-dos-and-donts/ “ I showed how to create a Windows server 2012 nic team. But what can you do with it ?
suppose you have multiple servers running windows server 2012 and they all have 4 10gb Nic’s this is a nice playground.
In my demo I have only 2 1gb nic’s but the samples are the same for any server.
Sample copy with nic teaming
What do we need to setup a Windows server 2012 with a hyper-v cluster ( I used the GUI version ) datacenter edition.
We can do the installation with a GUI or by PowerShell. I do a Mix GUI/posh
first we need to have the hyper-v and the Failover cluster feature installed
If you don’t know how to start
go to PowerShell ISE if you want.
or just the plain PowerShell
This will show you a list of all the components you can install or have been installed
I do not know the name of the feature so I looked it up.
Install-WindowsFeature -Name Failover-Clustering
Install-WindowsFeature –Name Hyper-V -IncludeManagementTools –Restart
I have already done this so no reboot is needed.
Well the TEAM you could do this by GUI or with Posh
One fine tip If you use PowerShell keep your nic names simple no “ local area connection “ 1,2,3,4 etc. in the GUI you can click but is PowerShell you have to type and I know we are lazy.
Create the Team in PowerShell
New-NetLbfoTeam Team1 NIC1SW1,NIC2SW2 -TeamingMode SwitchIndependent -LoadBalancingAlgorithm HyperVPort -a
the –a is Accept else you get a yes or no .
Now that the team is there We can create a virtual switch that can hold our network adapters
New-VMSwitch “VirtualSwitch” -MinimumBandwidthMode Weight -NetAdapterName “Team01” -AllowManagementOS 0
-AllowManagementOS 0 means no lan connection
Edit 18-12-2013 So If you do want a network connection use 1
Now We create a virtual nic that connect us to the LAN or management
Add-VMNetworkAdapter -ManagementOS -Name “LAN” -SwitchName “VirtualSwitch”
As You can see the Vnic is added to the adapter list
As we compare both adapters you can see that the Team holds only the Virtual switch protocol and the LAN hold an IP
But what about QoS yes you will see a lot of different points on the web and all different yes you can set this.
Here is a nice link Microsoft also published some best practices for QoS.
Keep in mind that the Weight off all your nic’s should be 100
Don’t do DCB and Minimum Bandwidth rules on the same NICs, You can set this on every VM if you like or on the adapter. But ask your self do you need this ?
Live migration network needs the most power.
This is how you set this : these are just samples test before you set this is IMHO
Set-VMSwitch “VirtualSwitch -DefaultFlowMinimumBandwidthWeight 50
Set-VMNetworkAdapter -ManagementOS -Name “LiveMigration” -MinimumBandwidthWeight 20
Set-VMNetworkAdapter -ManagementOS -Name “CSV” -MinimumBandwidthWeight 50
Set-VMNetworkAdapter -ManagementOS -Name “Management” -MinimumBandwidthWeight 30
I do not set this It is up to you
To create more Adapters it goes like this :
Add-VMNetworkAdapter -ManagementOS -Name “Management” -SwitchName “VirtualSwitch”
Add-VMNetworkAdapter -ManagementOS -Name “LiveMigration” -SwitchName “VirtualSwitch”
Add-VMNetworkAdapter -ManagementOS -Name “CSV” -SwitchName “VirtualSwitch”
And if you want to use a VLAN on these adapter yes you can :
Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName “Management” -Access -VlanId 111
Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName “LiveMigration” -Access -VlanId 15
Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName “CSV” -Access -VlanId 11
The default value for the -ManagementOS is True. This means that these three interfaces now show up in you
GUI with the names vEthernet (Management), vEthernet (Live Migration) and vEthernet (Cluster).
To separate the traffic between the interfaces we assign each vNIC its own VLAN.
Now that we have set and created the Vswitch and the Vnic’s we can get some info about this config
Get-VMNetworkAdapter -ManagementOS -Name * | ft Name, VMName, MinimumBandwidthWeight, BandwidthPercentage, IsManagementOS
Get-Help Set-VMNetworkAdapter -Full
Get-Help Set-VMNetworkAdapterVlan -Full
Get-Help New-VMSwitch -Full
Get-Help Set-VMSwitch –Full
these command should give you a lot of info about these commands
or update-help get all the latest versions.
Get-VMSwitch |fl *
Now you will get a full list of all the settings
Set the IP adress
Yes but how to set this easy but there are multiple ways. and by gui if you like.
New-NetIPAddress -PrefixLength 8 -InterfaceIndex 68 -IPAddress 22.214.171.124
With the above settings you can list all the adapters and find the InterfaceIndex to set the IP adress
Get-VMNetworkAdapter -ManagementOS |where name -eq “csv” |fl *
Or just list one adapter
New-NetIPAddress -PrefixLength 8 -InterfaceIndex 68 -IPAddress 126.96.36.199 can set the IP but also this
New-NetIPAddress -InterfaceAlias “vEthernet (nlb01)” -IPAddress 188.8.131.52 -PrefixLength “24” -DefaultGateway 184.108.40.206
So there are multiple ways to set the IP based on InterfaceAlias or InterfaceIndex
And DNS settings : Set-DnsClientServerAddress -InterfaceAlias “vEthernet (nlb01)” -ServerAddresses 220.127.116.11, 18.104.22.168
and if you don’t want a gateway
New-NetIPAddress -InterfaceAlias “iSCSI01” -IPAddress 192.168.100.11 -PrefixLength “24”
Cluster Creation Using all the Virtual nics
Now that all the network adapters are in place and all the nics have an IP address nicely named we can create our cluster I will do this quickly I created so many post on how to create a windows server 2012 cluster.
Open the FCM I do the Validation a few warnings and yes I know.
Verifying that a node does not have multiple adapters connected to the same subnet.
Adapters vEthernet (LAN) and vEthernet (Management) on node I5NODE02.mvp.local have IP addresses on the same subnet.
Adapters vEthernet (ISCSI02) and vEthernet (ISCSI01) on node I5NODE02.mvp.local have IP addresses on the same subnet.
Adapters vEthernet (NLB02) and vEthernet (NLB01) on node I5NODE02.mvp.local have IP addresses on the same subnet.
I ignore the Warnings for now.
Now that my cluster is ready and I see all the NICs but they are named cluster network 1 to 5 yes you can rename this. And I advice this to do just to find the Nic easily don’t mesh up the wrong network.
just go to the properties of the nic and rename it
One thing left configure your live migration settings.
If you look at the VM network adapter here you can set the Bandwidth.