在主機電腦或 VM 上建立新的 NIC 小組Create a new NIC Team on a host computer or VM

適用於:Windows Server (半年度管道)、Windows Server 2016Applies to: Windows Server (Semi-Annual Channel), Windows Server 2016

在本主題中,您會在主機電腦或 Hyper-v 虛擬機器中建立新的 NIC 小組, (VM) 執行 Windows Server 2016。In this topic, you create a new NIC Team on a host computer or in a Hyper-V virtual machine (VM) running Windows Server 2016.

網路設定需求Network configuration requirements

建立新的 NIC 小組之前,您必須部署具有兩個網路介面卡的 Hyper-v 主機,以連線至不同的實體交換器。Before you can create a new NIC Team, you must deploy a Hyper-V host with two network adapters that connect to different physical switches. 您也必須使用來自相同 IP 位址範圍的 IP 位址來設定網路介面卡。You must also configure the network adapters with IP addresses that are from the same IP address range.

在 VM 中建立 NIC 小組的實體交換器、Hyper-v 虛擬交換器、區域網路 (LAN) 和 NIC 小組需求如下:The physical switch, Hyper-V Virtual Switch, local area network (LAN), and NIC Teaming requirements for creating a NIC Team in a VM are:

  • 執行 Hyper-v 的電腦必須有兩個以上的網路介面卡。The computer running Hyper-V must have two or more network adapters.

  • 如果將網路介面卡連接到多個實體交換器,實體交換器必須位於相同的第2層子網。If connecting the network adapters to multiple physical switches, the physical switches must be on the same Layer 2 subnet.

  • 您必須使用 Hyper-v 管理員或 Windows PowerShell 來建立兩個外部 Hyper-v 虛擬交換器,每個都連接到不同的實體網路介面卡。You must use Hyper-V Manager or Windows PowerShell to create two external Hyper-V Virtual Switches, each connected to a different physical network adapter.

  • VM 必須連接到您所建立的兩個外部虛擬交換器。The VM must connect to both external virtual switches you create.

  • Windows Server 2016 中的 NIC 小組支援在 Vm 中有兩個成員的團隊。NIC Teaming, in Windows Server 2016, supports teams with two members in VMs. 您可以建立更大的小組,但不支援。You can create larger teams, but there is no support.

  • 如果您要在 VM 中設定 NIC 小組,您必須選取 [交換器獨立] 和 [_位址雜湊_的負載平衡模式]分組模式If you are configuring a NIC Team in a VM, you must select a Teaming mode of Switch Independent and a Load balancing mode of Address Hash.

步驟 1:Step 1. 設定實體和虛擬網路Configure the physical and virtual network

在此程式中,您會建立兩個外部 Hyper-v 虛擬交換器、將 VM 連線至交換器,然後設定與交換器的 VM 連線。In this procedure, you create two external Hyper-V Virtual Switches, connect a VM to the switches, and then configure the VM connections to the switches.

必要條件Prerequisites

您必須具有Administrators的成員資格或同等許可權。You must have membership in Administrators, or equivalent.

程序Procedure

  1. 在 Hyper-v 主機上,開啟 [Hyper-v 管理員],然後在 [動作] 底下,按一下 [虛擬交換器管理員]。On the Hyper-V host, open Hyper-V Manager, and under Actions, click Virtual Switch Manager.

虛擬交換器管理員

  1. 在 [虛擬交換器管理員] 中,確認已選取 [外部],然後按一下 [建立虛擬交換器]。In Virtual Switch Manager, make sure External is selected, and then click Create Virtual Switch.

建立虛擬交換器

  1. 在 [虛擬交換器內容] 中,輸入虛擬交換器的名稱,並視需要新增附注In Virtual Switch Properties, type a Name for the virtual switch, and add Notes as needed.

  2. 在 [連線類型] 的 [外部網路] 中,選取您要連接虛擬交換器的實體網路介面卡。In Connection type, in External network, select the physical network adapter to which you want to attach the virtual switch.

  3. 為您的部署設定其他切換屬性,然後按一下 [確定]Configure additional switch properties for your deployment, and then click OK.

  4. 重複先前的步驟,以建立第二個外部虛擬交換器。Create a second external virtual switch by repeating the previous steps. 將第二個外部交換器連接到不同的網路介面卡。Connect the second external switch to a different network adapter.

  5. 在 [Hyper-v 管理員] 的 [虛擬機器] 底下,以滑鼠右鍵按一下您要設定的 VM,然後按一下 [設定]。In Hyper-V Manager, under Virtual Machines, right-click the VM that you want to configure, and then click Settings.

[VM設定] 對話方塊隨即開啟。The VM Settings dialog box opens.

  1. 確定 VM 未啟動。Ensure that the VM is not started. 如果已啟動,請在設定 VM 之前先執行關閉。If it is started, perform a shutdown before configuring the VM.

  2. 在 [硬體] 中,按一下 [網路介面卡]。In Hardware, click Network Adapter.

網路介面卡

  1. 在 [網路介面卡內容] 中,選取您在先前步驟中建立的其中一個虛擬交換器,然後按一下 [ 套用]。In Network Adapter properties, select one of the virtual switches that you created in previous steps, and then click Apply.

    選取虛擬交換器

  2. 在 [硬體] 中,按一下以展開 [網路介面卡] 旁的加號 (+) 。In Hardware, click to expand the plus sign (+) next to Network Adapter.

  3. 按一下 [ Advanced Features ],使用圖形化使用者介面啟用 NIC 小組。Click Advanced Features to enable NIC Teaming by using the graphical user interface.

    提示

    您也可以使用 Windows PowerShell 命令來啟用 NIC 小組:You can also enable NIC Teaming with a Windows PowerShell command:

    Set-VMNetworkAdapter -VMName <VMname> -AllowTeaming On
    

    a.a. 選取 [動態] 做為 MAC 位址。Select Dynamic for MAC address.

    b.b. 按一下以選取 [受保護的網路]。Click to select Protected network.

    c.c. 按一下以選取 [啟用此網路介面卡成為客體作業系統中的小組的成員]。Click to select Enable this network adapter to be part of a team in the guest operating system.

    d.d. 按一下 [確定] 。Click OK.

    將網路介面卡新增至小組

  4. 若要新增第二個網路介面卡,請在 [Hyper-v 管理員] 的 [虛擬機器中,以滑鼠右鍵按一下相同的 VM,然後按一下 [設定]。To add a second network adapter, in Hyper-V Manager, in Virtual Machines, right-click the same VM, and then click Settings.

    [VM設定] 對話方塊隨即開啟。The VM Settings dialog box opens.

  5. 在 [新增硬體] 中,按一下 [網路介面卡],然後按一下 [新增]。In Add Hardware, click Network Adapter, and then click Add.

新增網路介面卡

  1. 在 [網路介面卡內容] 中,選取您在先前步驟中建立的第二個虛擬交換器,然後按一下 [ 套用]。In Network Adapter properties, select the second virtual switch that you created in previous steps, and then click Apply.

套用虛擬交換器

  1. 在 [硬體] 中,按一下以展開 [網路介面卡] 旁的加號 (+) 。In Hardware, click to expand the plus sign (+) next to Network Adapter.

  2. 按一下 [ Advanced Features],向下流覽至 [ NIC小組],然後按一下以選取 [啟用此網路介面卡成為客體作業系統中的小組的成員]。Click Advanced Features, scroll down to NIC Teaming, and click to select Enable this network adapter to be part of a team in the guest operating system.

  3. 按一下 [確定] 。Click OK.

那麼!Congratulations! 您已設定實體和虛擬網路。You have configured the physical and virtual network. 現在您可以繼續建立新的 NIC 小組。Now you can proceed to creating a new NIC Team.

步驟 2:Step 2. 建立新的 NIC 小組Create a new NIC Team

當您建立新的 NIC 小組時,必須設定 NIC 小組屬性:When you create a new NIC Team, you must configure the NIC Team properties:

  • 球隊名稱Team name

  • 成員介面卡Member adapters

  • 小組模式Teaming mode

  • 負載平衡模式Load balancing mode

  • 待命介面卡Standby adapter

您也可以選擇性地設定主要小組介面,並設定虛擬 LAN (VLAN) 號碼。You can also optionally configure the primary team interface and configure a virtual LAN (VLAN) number.

如需這些設定的詳細資訊,請參閱NIC 小組設定For more details on these settings, see NIC Teaming settings.

必要條件Prerequisites

您必須具有Administrators的成員資格或同等許可權。You must have membership in Administrators, or equivalent.

程序Procedure

  1. 在 [伺服器管理員] 中,按一下 [本機伺服器]****。In Server Manager, click Local Server.

  2. 在 [屬性] 窗格的第一個資料行中,找出 [ NIC小組],然後按一下 [停用] 連結。In the Properties pane, in the first column, locate NIC Teaming, and then click the Disabled link.

    [ NIC小組] 對話方塊隨即開啟。The NIC Teaming dialog box opens.

    [NIC 小組] 對話方塊

  3. 在 [介面卡和介面] 中,選取您要新增至 NIC 小組的一或多個網路介面卡。In Adapters and Interfaces, select the one or more network adapters that you want to add to a NIC Team.

  4. 按一下 [工作],然後按一下 [****加入至新小組]。Click TASKS, and click Add to New Team.

    [新增小組] 對話方塊隨即開啟,並顯示網路介面卡和小組成員。The New team dialog box opens and displays network adapters and team members.

  5. 在 [小組名稱] 中,輸入新 NIC 小組的名稱,然後按一下 [其他屬性]。In Team name, type a name for the new NIC Team, and then click Additional properties.

  6. 在 [其他屬性] 中,選取 [值]:In Additional properties, select values for:

    • 小組模式Teaming mode. 小組模式的選項與交換器無關,而且切換相依The options for Teaming mode are Switch Independent and Switch Dependent. 交換器相依模式包含靜態小組和**連結匯總控制通訊協定 (LACP) **。The Switch Dependent mode includes Static Teaming and Link Aggregation Control Protocol (LACP).

      • 獨立切換。Switch Independent. 使用交換器獨立模式時,NIC 小組成員所連線的交換器或交換器不會察覺到 NIC 小組的存在,也不會決定如何將網路流量分散到 NIC 小組成員-相反地,NIC 小組會將輸入網路流量分散到多個 NIC 小組成員。With Switch Independent mode, the switch or switches to which the NIC Team members are connected are unaware of the presence of the NIC team and do not determine how to distribute network traffic to NIC Team members - instead, the NIC Team distributes inbound network traffic across the NIC Team members.

      • 切換相依。Switch Dependent. 使用交換器相依模式時,NIC 小組成員所連線的交換器會決定如何在 NIC 小組成員之間散發輸入網路流量。With Switch Dependent modes, the switch to which the NIC Team members are connected determines how to distribute the inbound network traffic among the NIC Team members. 交換器具有完全獨立性,可決定如何將網路流量分散到多個 NIC 小組成員。The switch has complete independence to determine how to distribute the network traffic across the NIC Team members.

        靜態小組Static Teaming 需要您手動設定交換器和主機,以識別哪些連結形成小組。Requires you to manually configure both the switch and the host to identify which links form the team. 因為這是靜態設定的解決方案,所以沒有額外的通訊協定可協助交換器和主機找出不正確的插入纜線或其他可能導致小組無法執行的錯誤。Because this is a statically configured solution, there is no additional protocol to assist the switch and the host to identify incorrectly plugged cables or other errors that could cause the team to fail to perform. 伺服器等級的交換器通常會支援這個模式。This mode is typically supported by server-class switches.
        **連結匯總控制通訊協定 (LACP) **Link Aggregation Control Protocol (LACP) 與靜態小組不同的是,LACP 小組模式會以動態方式識別主機與交換器之間連線的連結。Unlike Static Teaming, LACP Teaming mode dynamically identifies links that are connected between the host and the switch. 這個動態連線能夠自動建立小組,理論上,但在實務上,您只需透過傳輸或接收來自對等實體的 LACP 封包,就能擴充和減少小組。This dynamic connection enables the automatic creation of a team and, in theory but rarely in practice, the expansion and reduction of a team simply by the transmission or receipt of LACP packets from the peer entity. 所有伺服器類別參數都支援 LACP,而全部都需要網路操作員在交換器埠上以系統管理的方式啟用 LACP。All server-class switches support LACP, and all require the network operator to administratively enable LACP on the switch port. 當您設定 LACP 的小組模式時,NIC 小組一律會以 LACP 的主動模式運作。When you configure a Teaming mode of LACP, NIC Teaming always operates in LACP's Active mode. 根據預設,NIC 小組會使用短暫的計時器 (3 秒) ,但您可以 (90 秒) 來設定長計時器 Set-NetLbfoTeamBy default, NIC Teaming uses a short timer (3 seconds), but you can configure a long timer (90 seconds) with Set-NetLbfoTeam.

    • 負載平衡模式Load balancing mode. 負載平衡分配模式的選項包括位址雜湊Hyper-v 埠動態The options for Load Balancing distribution mode are Address Hash, Hyper-V Port, and Dynamic.

      • 位址雜湊。Address Hash. 使用位址雜湊時,此模式會根據封包的位址元件建立雜湊,然後指派給其中一個可用的介面卡。With Address Hash, this mode creates a hash based on address components of the packet, which then get assigned to one of the available adapters. 通常,這種機制本身就足以在可用的介面卡上建立合理的平衡。Usually, this mechanism alone is sufficient to create a reasonable balance across the available adapters.

      • Hyper-v 通訊埠。Hyper-V Port. 使用 Hyper-v 通訊埠,在 Hyper-v 主機上設定的 NIC 小組會提供 Vm 獨立的 MAC 位址。With Hyper-V Port, NIC Teams configured on Hyper-V hosts give VMs independent MAC addresses. Vm 的 MAC 位址或已連線到 Hyper-v 交換器的 VM 會用來分割 NIC 小組成員之間的網路流量。The VMs MAC address or the VM ported connected to the Hyper-V switch, can be used to divide network traffic between NIC Team members. 您無法使用 Hyper-v 埠負載平衡模式來設定在 Vm 內建立的 NIC 小組。You cannot configure NIC Teams that you create within VMs with the Hyper-V Port load balancing mode. 相反地,請使用位址雜湊模式。Instead, use the Address Hash mode.

      • 效果.Dynamic. 使用動態時,輸出負載是根據 TCP 通訊埠和 IP 位址的雜湊來散發。With Dynamic, outbound loads are distributed based on a hash of the TCP ports and IP addresses. 動態模式也會即時重新平衡載入,讓指定的輸出流程可以在小組成員之間來回移動。Dynamic mode also rebalances loads in real time so that a given outbound flow may move back and forth between team members. 相反地,輸入負載會以與 Hyper-v 埠相同的方式進行散發。Inbound loads, on the other hand, get distributed the same way as Hyper-V Port. 簡言之,動態模式會利用位址雜湊和 Hyper-v 埠的最佳層面,而且是最高效能的負載平衡模式。In a nutshell, Dynamic mode utilizes the best aspects of both Address Hash and Hyper-V Port and is the highest performing load balancing mode.

    • 待命介面卡Standby adapter. 待命介面卡的選項為 [無] (所有介面卡作用中) 或您在 NIC 小組中選取做為待命介面卡的特定網路介面卡。The options for Standby Adapter are None (all adapters Active) or your selection of a specific network adapter in the NIC Team that acts as a Standby adapter.

    提示

    如果您要在虛擬機器中設定 NIC 小組 (VM) ,您必須選取 [交換器獨立] 和 [位址雜湊 ] 的負載平衡模式的小組模式If you are configuring a NIC Team in a virtual machine (VM), you must select a Teaming mode of Switch Independent and a Load balancing mode of Address Hash.

  7. 如果您想要設定主要小組介面名稱,或將 VLAN 號碼指派給 NIC 小組,請按一下 [主要小組介面] 右邊的連結。If you want to configure the primary team interface name or assign a VLAN number to the NIC Team, click the link to the right of Primary team interface.

    [新增小組介面] 對話方塊隨即開啟。The New team interface dialog box opens.

    新增小組介面

  8. 視您的需求而定,執行下列其中一項:Depending on your requirements, do one of the following:

    • 提供 tNIC 介面名稱。Provide a tNIC interface name.

    • 設定 VLAN 成員資格:按一下 [特定 VLAN ],然後輸入 vlan 資訊。Configure VLAN membership: click Specific VLAN and type the VLAN information. 例如,如果您想要將此 NIC 小組新增至會計 VLAN 編號44,請輸入 Accounting 44-VLAN。For example, if you want to add this NIC Team to the accounting VLAN number 44, Type Accounting 44 - VLAN.

  9. 按一下 [確定] 。Click OK.

那麼!Congratulations! 您已在主機電腦或 VM 上建立新的 NIC 小組。You've created a new NIC Team on a host computer or VM.

  • Nic小組:在本主題中,我們將概述 Windows Server 2016 中的網路介面卡 (NIC) 小組。NIC Teaming: In this topic, we give you an overview of Network Interface Card (NIC) Teaming in Windows Server 2016. NIC 小組可讓您將一和32實體 Ethernet 網路介面卡分成一或多個以軟體為基礎的虛擬網路介面卡。NIC Teaming allows you to group between one and 32 physical Ethernet network adapters into one or more software-based virtual network adapters. 這些虛擬網路介面卡可在網路介面卡故障時,提供快速的效能與容錯。These virtual network adapters provide fast performance and fault tolerance in the event of a network adapter failure.

  • NIC 小組 MAC 位址使用和管理:當您使用「交換器獨立模式」和「位址雜湊」或「動態」負載分佈來設定 NIC 小組時,小組會在輸出流量上使用主要 NIC 小組成員的媒體存取控制 (MAC) 位址。NIC Teaming MAC address use and management: When you configure a NIC Team with switch independent mode and either address hash or dynamic load distribution, the team uses the media access control (MAC) address of the primary NIC Team member on outbound traffic. 主要 NIC 小組成員是由一組初始小組成員的作業系統選取的網路介面卡。The primary NIC Team member is a network adapter selected by the operating system from the initial set of team members.

  • Nic 小組設定:在本主題中,我們將概述 nic 團隊的屬性,例如團隊和負載平衡模式。NIC Teaming settings: In this topic, we give you an overview of the NIC Team properties such as teaming and load balancing modes. 我們也會提供有關待命介面卡設定和主要小組介面屬性的詳細資料。We also give you details about the Standby adapter setting and the Primary team interface property. 如果您的 NIC 小組中至少有兩張網路介面卡,則不需要指定待命介面卡來容錯。If you have at least two network adapters in a NIC Team, you do not need to designate a Standby adapter for fault tolerance.

  • 針對nic 小組進行疑難排解:在本主題中,我們會討論針對 nic 小組進行疑難排解的方法,例如硬體、實體交換器的安全性,以及使用 Windows PowerShell 來停用或啟用網路介面卡。Troubleshooting NIC Teaming: In this topic, we discuss ways to troubleshoot NIC Teaming, such as hardware, physical switch securities, and disabling or enabling network adapters using Windows PowerShell.