NIC 小組設定NIC Teaming settings

在本主題中,我們將概述 NIC 小組的屬性,例如團隊和負載平衡模式。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 小組屬性

小組模式Teaming modes

小組模式的選項與交換器無關,而且切換相依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).


為了獲得最佳的 NIC 小組效能,我們建議您使用動態散發的負載平衡模式。For best NIC Team performance, we recommend that you use a Load Balancing mode of Dynamic distribution.

交換器獨立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.

當您使用具有動態散發的交換器獨立模式時,系統會根據動態負載平衡演算法所修改的 TCP 埠位址雜湊來散發網路流量負載。When you use Switch Independent mode with Dynamic distribution, the network traffic load is distributed based on the TCP Ports address hash as modified by the Dynamic load balancing algorithm. 動態負載平衡演算法會重新散發流程,以優化小組成員頻寬使用量,讓個別流量傳輸可以從一個作用中的小組成員移到另一個。The Dynamic load balancing algorithm redistributes flows to optimize team member bandwidth utilization so that individual flow transmissions can move from one active team member to another. 此演算法會考慮轉散發流量可能會導致封包行程順序不好的情況,因此,它會採取步驟來將這種可能性降到最低。The algorithm takes into account the small possibility that redistributing traffic could cause out-of-order delivery of packets, so it takes steps to minimize that possibility.

切換相依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.


切換相依小組需要所有團隊成員都連接到相同的實體交換器或多底座交換器,以在多個底座之間共用交換器識別碼。Switch dependent teaming requires that all team members are connected to the same physical switch or a multi-chassis switch that shares a switch ID among the multiple chassis.

  • 靜態小組。Static Teaming. 靜態小組要求您必須手動設定交換器和主機,以識別哪些連結形成小組。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 with a short timer. 目前沒有任何選項可用來修改計時器或變更 LACP 模式。No option is presently available to modify the timer or change the LACP mode.

當您使用具有動態散發的交換器相依模式時,系統會根據動態負載平衡演算法修改的 TransportPorts 位址雜湊來散發網路流量負載。When you use Switch Dependent modes with Dynamic distribution, the network traffic load is distributed based on the TransportPorts address hash as modified by the Dynamic load balancing algorithm. 動態負載平衡演算法會重新散發流程,以優化小組成員頻寬使用率。The Dynamic load balancing algorithm redistributes flows to optimize team member bandwidth utilization. 個別的流量傳輸可以從一個作用中的小組成員移至另一個,做為動態散發的一部分。Individual flow transmissions can move from one active team member to another as part of the dynamic distribution. 此演算法會考慮轉散發流量可能會導致封包行程順序不好的情況,因此,它會採取步驟來將這種可能性降到最低。The algorithm takes into account the small possibility that redistributing traffic could cause out-of-order delivery of packets, so it takes steps to minimize that possibility.

如同所有的交換器相依設定,此參數會決定如何在小組成員之間散發輸入流量。As with all switch dependent configurations, the switch determines how to distribute the inbound traffic among the team members. 此參數預期會執行合理的作業,將流量分散到小組成員,但它完全獨立以判斷其運作方式。The switch is expected to do a reasonable job of distributing the traffic across the team members but it has complete independence to determine how it does so.

負載平衡模式Load Balancing modes

負載平衡分配模式的選項包括位址雜湊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.

使用 Windows PowerShell 指定下列雜湊函陣列件的值。Use Windows PowerShell to specify values for the following hashing function components.

  • 來源和目的地 TCP 埠,以及來源和目的地 IP 位址。Source and destination TCP ports and source and destination IP addresses. 當您選取 [位址雜湊] 做為負載平衡模式時,這是預設值。This is the default when you select Address Hash as the Load Balancing mode.

  • 僅限來源和目的地 IP 位址。Source and destination IP addresses only.

  • 僅限來源和目的地 MAC 位址。Source and destination MAC addresses only.

TCP 埠雜湊會建立最細微的流量串流散發,產生可在 NIC 小組成員之間獨立移動的較小串流。The TCP ports hash creates the most granular distribution of traffic streams, resulting in smaller streams that can be independently moved between NIC team members. 不過,您不能將 TCP 埠雜湊用於不是 TCP 或 UDP 型的流量,或從堆疊隱藏 TCP 和 UDP 埠,例如與受 IPsec 保護的流量。However, you cannot use the TCP ports hash for traffic that is not TCP or UDP-based, or where the TCP and UDP ports are hidden from the stack, such as with IPsec-protected traffic. 在這些情況下,雜湊會自動使用 IP 位址雜湊,如果流量不是 IP 流量,則會使用 MAC 位址雜湊。In these cases, the hash automatically uses the IP address hash or, if the traffic is not IP traffic, the MAC address hash is used.

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.

由於連續的交換器一律會在某個埠上看到特定的 MAC 位址,因此交換器會根據目的地 MAC (VM MAC) 位址,將輸入負載 (從交換器的流量散發到主機) 。Because the adjacent switch always sees a particular MAC address on one port, the switch distributes the ingress load (the traffic from the switch to the host) on multiple links based on the destination MAC (VM MAC) address. 當使用虛擬機器佇列 (Vmq 數量) 時,這特別有用,因為佇列可以放在預期流量抵達的特定 NIC 上。This is particularly useful when Virtual Machine Queues (VMQs) are used, because a queue can be placed on the specific NIC where the traffic is expected to arrive.

不過,如果主機只有幾個 Vm,則此模式可能不夠細微,而無法達到良好平衡的散發。However, if the host has only a few VMs, this mode might not be granular enough to achieve a well-balanced distribution. 此模式也一律會限制單一 VM (也就是從單一交換器埠) 到單一介面上可用之頻寬的流量。This mode will also always limit a single VM (i.e., the traffic from a single switch port) to the bandwidth that is available on a single interface. NIC 小組會使用 Hyper-v 虛擬交換器埠做為識別碼,而不是使用來源 MAC 位址,因為在某些情況下,VM 可能會在交換器埠上設定一個以上的 MAC 位址。NIC Teaming uses the Hyper-V Virtual Switch Port as the identifier instead of using the source MAC address because, in some instances, a VM might be configured with more than one MAC address on a switch port.


使用動態時,輸出負載是根據 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.

在此模式中的輸出負載,會根據 flowlets 的概念進行動態平衡。The outbound loads in this mode are dynamically balanced based on the concept of flowlets. 正如人類語音在單字和句子的結尾處自然中斷,TCP 流量 (TCP 通訊串流) 也會發生自然的中斷。Just as human speech has natural breaks at the ends of words and sentences, TCP flows (TCP communication streams) also have naturally occurring breaks. 兩個這類中斷之間的 TCP 流程部分稱為「flowlet」。The portion of a TCP flow between two such breaks is referred to as a flowlet.

當動態模式演算法偵測到已遇到的 flowlet 界限時(例如,當 TCP 流程中發生了足夠長度的中斷時),演算法會自動將流程重新平衡至另一個小組成員(如果適用的話)。When the dynamic mode algorithm detects that a flowlet boundary has been encountered - such as when a break of sufficient length has occurred in the TCP flow - the algorithm automatically rebalances the flow to another team member if appropriate. 在某些情況下,演算法可能也會定期重新平衡不包含任何 flowlets 的流程。In some circumstances the algorithm might also periodically rebalance flows that do not contain any flowlets. 因此,TCP 流程與小組成員之間的親和性可能會隨時變更,因為動態平衡演算法會運作,以平衡小組成員的工作負載。Because of this, the affinity between TCP flow and team member can change at any time as the dynamic balancing algorithm works to balance the workload of the team members.

無論小組是以「獨立交換器」或其中一個「切換相依」模式來設定,建議您最好使用動態分配模式來達到最佳效能。Whether the team is configured with Switch Independent or one of the Switch Dependent modes, it is recommended that you use Dynamic distribution mode for best performance.

當 NIC 小組只有兩個小組成員、以交換器獨立模式設定,並已啟用作用中/待命模式、有一個使用中的 NIC,另一個設定為待命時,此規則就會發生例外狀況。There is an exception to this rule when the NIC Team has just two team members, is configured in Switch Independent mode, and has Active/Standby mode enabled, with one NIC active and the other configured for Standby. 透過此 NIC 小組設定,位址雜湊散發提供的效能會比動態散發更好。With this NIC Team configuration, Address Hash distribution provides slightly better performance than Dynamic distribution.

待命介面卡設定Standby adapter setting

待命介面卡的選項為 [無] (所有介面卡作用中) 或您在 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 設定為待命介面卡時,所有其他未選取的小組成員都是作用中,而且在作用中的 NIC 失敗之前,介面卡不會傳送或處理任何網路流量。When you configure a NIC as a Standby adapter, all other unselected team members are Active, and no network traffic is sent to or processed by the adapter until an Active NIC fails. 在作用中的 NIC 失敗之後,待命 NIC 會變成作用中,並處理網路流量。After an Active NIC fails, the Standby NIC becomes active and processes network traffic. 當所有小組成員還原至服務時,待命小組成員會回到待命狀態。When all team members get restored to service, the standby team member returns to standby status.

如果您有兩個 NIC 的小組,而且您選擇將一個 NIC 設定為待命介面卡,則會失去與兩個作用中 Nic 並存的頻寬匯總優點。If you have a two-NIC team and you choose to configure one NIC as a Standby adapter, you lose the bandwidth aggregation advantages that exist with two active NICs. 您不需要指定待命介面卡即可達到容錯功能;當 NIC 小組中至少有兩張網路介面卡時,容錯一律會出現。You do not need to designate a Standby Adapter to achieve fault tolerance; fault tolerance is always present whenever there are at least two network adapters in a NIC Team.

主要小組介面屬性Primary Team interface property

若要存取 [主要小組介面] 對話方塊,您必須按一下下圖中反白顯示的連結。To access the Primary Team Interface dialog box, you must click the link that is highlighted in the illustration below.


按一下反白顯示的連結之後,就會開啟下列 [新的小組介面] 對話方塊。After you click the highlighted link, the following New Team Interface dialog box opens.

[新增小組介面] 對話方塊

如果您使用 Vlan,可以使用此對話方塊來指定 VLAN 號碼。If you are using VLANs, you can use this dialog box to specify a VLAN number.

無論您是否使用 Vlan,都可以為 NIC 小組指定 NIC 名稱。Whether or not you are using VLANs, you can specify a NIC name for the NIC Team.