NIC Teaming in Windows Server 2012 – Part 2: PowerShell Method

This is the second in a two-part series on NIC Teaming in Windows Server 2012.  Part 1 focused on the GUI method (using Server Manager.)  Part 2 focuses on using PowerShell.

Depending on its configuration, NIC Teaming provides the following benefits:

  • bandwidth aggregation – If you team 2 NICs, you have the capability to double your network throughput.
  • resisiliancy to a dropped network connection – Our data centre has duplicate network infrastructure that connects to all servers: an A network and a B network.  When network maintenance needs to be performed it is done on each network separately: when maintenanice is performed on the A network, the B network stays online.  Each server has a Team that consists of a NIC on the A network and a NIC on the B network to avoid loss of connectivity when one of the networks goes down temporarily for maintenance.

In older Windows operating systems in order to create a NIC team you had to use software provided by the NIC vendor.  Server 2012 brings this functionality into the OS.  With NIC Teaming functionality now built into Windows, the process is much simpler, consistent (does not matter what vendor has manufactured the NICs), and is supported by Microsoft (since Teaming using vendor software is not supported by Microsoft, PSS would often request a Team be broken to verify the Team is not causing any issues.)

 

Creating a NIC Team Using PowerShell

  1. Determine the names of each NIC that you want to add to the team.  This can be done from Network Connections.
    01
  2. Launch PowerShell (Run as Administrator.)
  3. Run the following cmdlet, replacing the values of the -Name and -TeamMembers parameters for your own values:
    New-NetLbfoTeam -Name “Team 1” -TeamMembers “Ethernet 3″,”Ethernet 4” -TeamingMode LACP -LoadBalancingAlgorithm TransportPorts -Confirm:$false Notes on Parameters:
    -TeamMembers accepts a coma-separated list of NIC names
    -Confirm:false prevents the confirmation prompt from appearing
    -TeamNICName (an optional parameter) can be used to name the Virtual/Teamed NIC.  If this parameter is not used, the Team name will also be used for the name of the Virtual/Teamed NIC.
    02
  4. A new Virtual/Team NIC will appear in Network Connections.
    03
  5. Use the following PowerShell cmdlet to set the IP config of the Virtual/Team NIC, replacing the example values for each paramter with your own values:
    New-NetIPAddress -InterfaceAlias “Team 1” -AddressFamily IPv4 -IPAddress 1.2.3.4 -DefaultGateway 1.2.3.1 -PrefixLength 28

    Note: The PrefixLength parameter relates to the subnet mask.  In this example, the PrefixLength is set to 28 because the subnet mask is 255.255.255.240 (it is a /28 network.)
  6. Use the following PowerShell cmdlet to set the DNS servers for the Virtual/Team NIC, replacing the example values for each paramter with your own values:
    Set-DnsClientServerAddress -InterfaceAlias “Team 1” -ServerAddresses “128.83.185.40”,”128.83.185.41″

Additional NIC Teaming Cmdlets

Additional PowerShell cmdlets dealing with NIC teaming are available on the following techNet article:

http://technet.microsoft.com/en-us/library/jj130849.aspx

NIC Teaming in Windows Server 2012 – Part 1: GUI Method

This is the first in a two-part series on NIC Teaming in Windows Server 2012.  Part 1 focuses on the GUI method (using Server Manager.)  Part 2 will focus on using PowerShell.

Depending on its configuration, NIC Teaming provides the following benefits

  • bandwidth aggregation – If you team 2- 1 GB NICs, you have the capability to double your network throughput.
  • resisiliancy to a dropped network connection – Our data centre has duplicate network infrastructure that connects to all servers: an A network and a B network.  When network maintenance needs to be performed (firmware updates on switches, etc.) it is done on each network separately: when maintenanice is performed on the A side, the B side stays online.  Each server has a Team that consists of a NIC on the A network and a NIC on the B network.

In older Windows operating systems in order to create a NIC team you had to use software provided by the NIC vendor.  Server 2012 brings this functionality into the OS.  With NIC Teaming functionality now built into Windows, the process is much simpler, consistent (does not matter what vendor has manufactured the NICs), and is supported by Microsoft (since Teaming using vendor software is not supported by Microsoft, PSS would often request a Team be broken to verify the Team is not causing any issues.)

 

Creating a NIC Team Using Server Manager

  1. Launch Server Manager.
  2. Select Local Server.
    (You can actually configure a NIC Team on one – or more – remote servers by selecting All Servers and then adding servers to the console.)
  3. Click on the (Disabled or Enabled) link next to NIC Teaming.
    01b
  4. The NIC Teaming window will appear.
    02
  5. At the top right of the Teams pane, select New Team from the Tasks menu.
    03
  6. A second NIC Teaming window will appear.
    1. Provide a Name for the Team.
    2. Select the NICs that you want to add to the Team.
    3. Click on the expand arrow next to Additional Properties.
    4. Select a Teaming Mode.
    5. Select a Load Balancing Mode.
    6. Click OK to close this window.
      05
  7. A new Virtual/Team NIC will appear in Network Connection.  configure TCP/IP for this NIC as you would any other NIC.
    07

To edit the properties or delete a NIC Team, select the Team in the Teams pane and select Properties or Edit from the Tasks menu.
08