遠端直接記憶體存取 ( RDMA ) 和交換器內嵌小組 ( 集合)Remote Direct Memory Access (RDMA) and Switch Embedded Teaming (SET)

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

本主題提供有關在 Windows Server 2016 中設定 Hyper-v 的遠端直接記憶體存取 ( RDMA 介面的資訊 ) ,以及切換內嵌小組集的相關資訊 ( ) 。This topic provides information on configuring Remote Direct Memory Access (RDMA) interfaces with Hyper-V in Windows Server 2016, in addition to information about Switch Embedded Teaming (SET).

注意

除了本主題之外,還提供下列交換器內嵌小組內容。In addition to this topic, the following Switch Embedded Teaming content is available.

使用 Hyper-v 設定 RDMA 介面Configuring RDMA Interfaces with Hyper-V

在 Windows Server 2012 R2 中,在同一部電腦上同時使用 RDMA 和 Hyper-v 作為提供 RDMA 服務的網路介面卡,不能系結至 Hyper-v 虛擬交換器。In Windows Server 2012 R2, using both RDMA and Hyper-V on the same computer as the network adapters that provide RDMA services can not be bound to a Hyper-V Virtual Switch. 這會增加在 Hyper-v 主機中安裝所需的實體網路介面卡數目。This increases the number of physical network adapters that are required to be installed in the Hyper-V host.

提示

在 Windows server 2016 之前的 Windows Server 版本中,無法在系結至 NIC 小組或 Hyper-v 虛擬交換器的網路介面卡上設定 RDMA。In editions of Windows Server previous to Windows Server 2016, it is not possible to configure RDMA on network adapters that are bound to a NIC Team or to a Hyper-V Virtual Switch. 在 Windows Server 2016 中,您可以在系結至 Hyper-v 虛擬交換器(不論是否已設定)的網路介面卡上啟用 RDMA。In Windows Server 2016, you can enable RDMA on network adapters that are bound to a Hyper-V Virtual Switch with or without SET.

在 Windows Server 2016 中,使用 RDMA 搭配或未設定時,您可以使用較少的網路介面卡。In Windows Server 2016, you can use fewer network adapters while using RDMA with or without SET.

下圖說明 Windows Server 2012 R2 和 Windows Server 2016 之間的軟體架構變更。The image below illustrates the software architecture changes between Windows Server 2012 R2 and Windows Server 2016.

架構變更

下列各節提供如何使用 Windows PowerShell 命令來啟用資料中心橋接 (DCB) 、使用 RDMA 虛擬 NIC vNIC 建立 Hyper-v 虛擬交換器 ( ) ,以及使用 SET 和 rdma Vnic 建立 Hyper-v 虛擬交換器的指示。The following sections provide instructions on how to use Windows PowerShell commands to enable Data Center Bridging (DCB), create a Hyper-V Virtual Switch with an RDMA virtual NIC (vNIC), and create a Hyper-V Virtual Switch with SET and RDMA vNICs.

啟用資料中心橋接 ( DCB)Enable Data Center Bridging (DCB)

在透過交集 Ethernet ( RoCE 版本的 rdma 使用任何 rdma 之前 ) ,您必須先啟用 DCB。Before using any RDMA over Converged Ethernet (RoCE) version of RDMA, you must enable DCB. 雖然網際網路廣域網路區域 RDMA 通訊協定 iWARP 網路並不需要 ( ) ,但測試已判定所有以乙太網路為基礎的 rdma 技術在 DCB 方面都能更有效地運作。While not required for Internet Wide Area RDMA Protocol (iWARP) networks, testing has determined that all Ethernet-based RDMA technologies work better with DCB. 基於這個原因,您應該考慮使用 DCB,即使是 iWARP RDMA 部署也是如此。Because of this, you should consider using DCB even for iWARP RDMA deployments.

下列 Windows PowerShell 範例命令示範如何啟用和設定 SMB Direct 的 DCB。The following Windows PowerShell example commands demonstrate how to enable and configure DCB for SMB Direct.

開啟 DCBTurn on DCB

Install-WindowsFeature Data-Center-Bridging

設定 SMB 直接存取的原則:Set a policy for SMB-Direct:

New-NetQosPolicy "SMB" -NetDirectPortMatchCondition 445 -PriorityValue8021Action 3

開啟 SMB 的流程式控制制:Turn on Flow Control for SMB:

Enable-NetQosFlowControl  -Priority 3

請確定流量控制針對其他流量關閉:Make sure flow control is off for other traffic:

Disable-NetQosFlowControl  -Priority 0,1,2,4,5,6,7

將原則套用至目標介面卡:Apply policy to the target adapters:

Enable-NetAdapterQos  -Name "SLOT 2"

至少為 SMB 提供最少頻寬的30%:Give SMB Direct 30% of the bandwidth minimum:

New-NetQosTrafficClass "SMB"  -Priority 3  -BandwidthPercentage 30  -Algorithm ETS

如果您已在系統中安裝內核偵錯工具,則必須將偵錯工具設定為允許透過執行下列命令來設定 QoS。If you have a kernel debugger installed in the system, you must configure the debugger to allow QoS to be set by running the following command.

覆寫偵錯工具-根據預設,偵錯工具區塊 NetQos:Override the Debugger - by default the debugger blocks NetQos:

Set-ItemProperty HKLM:"\SYSTEM\CurrentControlSet\Services\NDIS\Parameters" AllowFlowControlUnderDebugger -type DWORD -Value 1 -Force

使用 RDMA vNIC 建立 Hyper-v 虛擬交換器Create a Hyper-V Virtual Switch with an RDMA vNIC

如果您的部署不需要設定,您可以使用下列 Windows PowerShell 命令來建立具有 RDMA vNIC 的 Hyper-v 虛擬交換器。If SET is not required for your deployment, you can use the following Windows PowerShell commands to create a Hyper-V Virtual Switch with an RDMA vNIC.

注意

使用具有支援 RDMA 之實體 Nic 的集合小組,可提供更多 RDMA 資源讓 Vnic 取用。Using SET teams with RDMA-capable physical NICs provides more RDMA resources for the vNICs to consume.

New-VMSwitch -Name RDMAswitch -NetAdapterName "SLOT 2"

新增主機 Vnic,並使其可支援 RDMA:Add host vNICs and make them RDMA capable:

Add-VMNetworkAdapter -SwitchName RDMAswitch -Name SMB_1
Enable-NetAdapterRDMA "vEthernet (SMB_1)" "SLOT 2"

確認 RDMA 功能:Verify RDMA capabilities:

Get-NetAdapterRdma

使用 SET 和 RDMA Vnic 建立 Hyper-v 虛擬交換器Create a Hyper-V Virtual Switch with SET and RDMA vNICs

若要在支援 RDMA 小組的 Hyper-v 虛擬交換器上 vnic 的 Hyper-v 主機虛擬網路介面卡上使用 RDMA capabilies ( ) ,您可以使用這些範例 Windows PowerShell 命令。To make use of RDMA capabilies on Hyper-V host virtual network adapters (vNICs) on a Hyper-V Virtual Switch that supports RDMA teaming, you can use these example Windows PowerShell commands.

New-VMSwitch -Name SETswitch -NetAdapterName "SLOT 2","SLOT 3" -EnableEmbeddedTeaming $true

新增主機 Vnic:Add host vNICs:

Add-VMNetworkAdapter -SwitchName SETswitch -Name SMB_1 -managementOS
Add-VMNetworkAdapter -SwitchName SETswitch -Name SMB_2 -managementOS

許多參數都不會將流量類別資訊傳遞到未標記的 VLAN 流量,因此請確定 RDMA 的主機介面卡是在 Vlan 上。Many switches won't pass traffic class information on untagged VLAN traffic, so make sure that the host adapters for RDMA are on VLANs. 此範例會將兩個 SMB_ * 主機虛擬配接器指派給 VLAN 42。This example assigns the two SMB_* host virtual adapters to VLAN 42.

Set-VMNetworkAdapterIsolation -ManagementOS -VMNetworkAdapterName SMB_1  -IsolationMode VLAN -DefaultIsolationID 42
Set-VMNetworkAdapterIsolation -ManagementOS -VMNetworkAdapterName SMB_2  -IsolationMode VLAN -DefaultIsolationID 42

在主機 Vnic 上啟用 RDMA:Enable RDMA on Host vNICs:

Enable-NetAdapterRDMA "vEthernet (SMB_1)","vEthernet (SMB_2)" "SLOT 2", "SLOT 3"

確認 RDMA 功能;確定這些功能不是零:Verify RDMA capabilities; ensure that the capabilities are non-zero:

Get-NetAdapterRdma | fl *

切換內嵌團隊 (設定) Switch Embedded Teaming (SET)

本節概述 Windows Server 2016 中的交換器內嵌小組 (設定) ,其中包含下列各節。This section provides an overview of Switch Embedded Teaming (SET) in Windows Server 2016, and contains the following sections.

設定總覽SET Overview

SET 是替代的 NIC 小組解決方案,可在 ( ) Windows Server 2016 中包含 Hyper-v 和軟體定義網路 SDN 堆疊的環境中使用。SET is an alternative NIC Teaming solution that you can use in environments that include Hyper-V and the Software Defined Networking (SDN) stack in Windows Server 2016. SET 可將某些 NIC 小組功能整合到 Hyper-v 虛擬交換器。SET integrates some NIC Teaming functionality into the Hyper-V Virtual Switch.

設定可讓您在一或多個實體 Ethernet 網路介面卡之間進行分組,以組成一或多個以軟體為基礎的虛擬網路介面卡。SET allows you to group between one and eight 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.

設定成員網路介面卡必須全部安裝在相同的實體 Hyper-v 主機中,才能放置在小組中。SET member network adapters must all be installed in the same physical Hyper-V host to be placed in a team.

注意

只有 Windows Server 2016 中的 Hyper-v 虛擬交換器支援使用 SET。The use of SET is only supported in Hyper-V Virtual Switch in Windows Server 2016. 您無法在 Windows Server 2012 R2 中部署 SET。You cannot deploy SET in Windows Server 2012 R2 .

您可以將組合的 Nic 連線到相同的實體交換器或不同的實體交換器。You can connect your teamed NICs to the same physical switch or to different physical switches. 如果您將 Nic 連線至不同的交換器,這兩個交換器都必須位於相同的子網上。If you connect NICs to different switches, both switches must be on the same subnet.

下圖描述設定的架構。The following illustration depicts SET architecture.

設定架構

因為 SET 已整合到 Hyper-v 虛擬交換器中,所以您無法在虛擬機器中使用 SET (VM) 。Because SET is integrated into the Hyper-V Virtual Switch, you cannot use SET inside of a virtual machine (VM). 不過,您可以在 Vm 中使用 NIC 小組。You can, however use NIC Teaming within VMs.

如需詳細資訊,請參閱 虛擬機器中的 NIC 小組 (vm) For more information, see NIC Teaming in Virtual Machines (VMs).

此外,SET 架構也不會公開小組介面。In addition, SET architecture does not expose team interfaces. 相反地,您必須設定 Hyper-v 虛擬交換器埠。Instead, you must configure Hyper-V Virtual Switch ports.

設定可用性SET Availability

SET 適用于所有包含 Hyper-v 和 SDN 堆疊的 Windows Server 2016 版本。SET is available in all versions of Windows Server 2016 that include Hyper-V and the SDN stack. 此外,您可以使用 Windows PowerShell 命令和遠端桌面連線,從執行支援工具之用戶端作業系統的遠端電腦管理設定。In addition, you can use Windows PowerShell commands and Remote Desktop connections to manage SET from remote computers that are running a client operating system upon which the tools are supported.

設定的支援 NicSupported NICs for SET

您可以使用已 ( ) 在 windows Server 2016 的集合團隊中通過 Windows 硬體認證和商標 WHQL 測試的任何 Ethernet NIC。You can use any Ethernet NIC that has passed the Windows Hardware Qualification and Logo (WHQL) test in a SET team in Windows Server 2016. 設定要求所有屬於設定小組成員的網路介面卡都必須相同, ( 亦即相同的製造商、相同的型號、相同的固件和驅動程式 ) 。SET requires that all network adapters that are members of a SET team must be identical (i.e., same manufacturer, same model, same firmware and driver). 在小組中的一到八張網路介面卡設定支援。SET supports between one and eight network adapters in a team.

設定與 Windows Server 網路技術的相容性SET Compatibility with Windows Server Networking Technologies

SET 與 Windows Server 2016 中的下列網路技術相容。SET is compatible with the following networking technologies in Windows Server 2016.

  • 資料中心橋接 ( DCB)Datacenter bridging (DCB)

  • Hyper-v 網路虛擬化-NV-GRE 和 VxLAN 都支援 Windows Server 2016。Hyper-V Network Virtualization - NV-GRE and VxLAN are both supported in Windows Server 2016.

  • 接收端總和檢查碼 ( 會卸載 IPv4、IPv6、TCP ) -如果有任何集合的小組成員支援,就會支援這些專案。Receive-side Checksum offloads (IPv4, IPv6, TCP) - These are supported if any of the SET team members support them.

  • 遠端直接記憶體存取 ( RDMA)Remote Direct Memory Access (RDMA)

  • 單一根目錄 i/o 虛擬化 ( sr-iov)Single root I/O virtualization (SR-IOV)

  • 傳輸端總和檢查碼 ( 會卸載 IPv4、IPv6、TCP ) -如果所有的集合成員都支援這些設定,則支援這些專案。Transmit-side Checksum offloads (IPv4, IPv6, TCP) - These are supported if all of the SET team members support them.

  • 虛擬機器佇列 ( VMQ)Virtual Machine Queues (VMQ)

  • 虛擬接收端調整 ( RSS)Virtual Receive Side Scaling (RSS)

設定與 Windows Server 2016 中的下列網路技術不相容。SET is not compatible with the following networking technologies in Windows Server 2016.

  • 802.1 x 驗證。802.1X authentication. 802.1 x 可延伸驗證通訊協定 ( EAP 封 ) 包會 - 在設定的情況下,由 hyper-v 虛擬交換器自動卸載。802.1X Extensible Authentication Protocol (EAP) packets are automatically dropped by Hyper-V Virtual Switch in SET scenarios.

  • IPsec 工作卸載 ( IPsecTO ) 。IPsec Task Offload (IPsecTO). 這是大部分網路介面卡不支援的舊版技術,而且它存在的位置預設為停用。This is a legacy technology that is not supported by most network adapters, and where it does exist, it is disabled by default.

  • ( ) 在主機或原生作業系統中使用 QoSpacer.exe。Using QoS (pacer.exe) in host or native operating systems. 這些 QoS 案例不是 Hyper-v - 案例,因此技術不會交集。These QoS scenarios are not Hyper-V scenarios, so the technologies do not intersect. 此外,QoS 可供使用,但預設不會啟用-您必須刻意啟用 QoS。In addition, QoS is available but not enabled by default - you must intentionally enable QoS.

  • 接收端聯合 ( RSC ) 。Receive side coalescing (RSC). Hyper-v 虛擬交換器會自動停用 RSC - 。RSC is automatically disabled by Hyper-V Virtual Switch.

  • 接收端調整 ( RSS ) 。Receive side scaling (RSS). 因為 Hyper-v 使用 VMQ 和 VMMQ 的佇列,所以當您建立虛擬交換器時,一律會停用 RSS。Because Hyper-V uses the queues for VMQ and VMMQ, RSS is always disabled when you create a virtual switch.

  • TCP Chimney 卸載。TCP Chimney Offload. 此技術預設為停用。This technology is disabled by default.

  • 虛擬機器 QoS ( VM-qos ) 。Virtual Machine QoS (VM-QoS). VM QoS 可供使用,但預設為停用。VM QoS is available but disabled by default. 如果您在設定的環境中設定 VM QoS,QoS 設定將會導致無法預期的結果。If you configure VM QoS in a SET environment, the QoS settings will cause unpredictable results.

設定模式和設定SET Modes and Settings

與 NIC 小組不同的是,當您建立集合小組時,無法設定小組名稱。Unlike NIC Teaming, when you create a SET team, you cannot configure a team name. 此外,NIC 小組也支援使用待命介面卡,但設定中不支援。In addition, using a standby adapter is supported in NIC Teaming, but it is not supported in SET. 當您部署 SET 時,所有網路介面卡都處於作用中狀態,而且沒有處於待命模式。When you deploy SET, all network adapters are active and none are in standby mode.

NIC 小組與設定之間的另一個主要差異是,NIC 小組可以選擇三種不同的小組模式,而設定只支援 切換獨立 模式。Another key difference between NIC Teaming and SET is that NIC Teaming provides the choice of three different teaming modes, while SET supports only Switch Independent mode. 使用切換獨立模式時,設定小組成員所連接的參數不會察覺設定小組是否存在,也不會決定如何將網路流量散發到設定小組成員,而是由集合團隊將輸入的網路流量分散到集合的小組成員。With Switch Independent mode, the switch or switches to which the SET Team members are connected are unaware of the presence of the SET team and do not determine how to distribute network traffic to SET team members - instead, the SET team distributes inbound network traffic across the SET team members.

當您建立新的集合小組時,您必須設定下列小組屬性。When you create a new SET team, you must configure the following team properties.

  • 成員介面卡Member adapters

  • 負載平衡模式Load balancing mode

成員介面卡Member adapters

當您建立集合小組時,您必須指定最多8個與 Hyper-v 虛擬交換器系結的相同網路介面卡,例如設定的小組成員介面卡。When you create a SET team, you must specify up to eight identical network adapters that are bound to the Hyper-V Virtual Switch as SET team member adapters.

負載平衡模式Load Balancing mode

設定小組負載平衡分配模式的選項是 Hyper-v 埠動態The options for SET team Load Balancing distribution mode are Hyper-V Port and Dynamic.

Hyper-v 埠Hyper-V Port

Vm 會連線至 Hyper-v 虛擬交換器上的埠。VMs are connected to a port on the Hyper-V Virtual Switch. 針對設定的小組使用 Hyper-v 埠模式時,會使用 Hyper-v 虛擬交換器埠和相關聯的 MAC 位址來分割集合小組成員之間的網路流量。When using Hyper-V Port mode for SET teams, the Hyper-V Virtual Switch port and the associated MAC address are used to divide network traffic between SET team members.

注意

當您搭配使用 SET 與封包直接時,小組模式 交換器是獨立 的,且需要負載平衡模式 hyper-v 埠When you use SET in conjunction with Packet Direct, the teaming mode Switch Independent and the load balancing mode Hyper-V Port are required.

由於連續的交換器一律會在指定的埠上看見特定的 MAC 位址,因此交換器會將輸入負載 (從切換至主機) 到主機的流量,以找出 MAC 位址所在的埠。Because the adjacent switch always sees a particular MAC address on a given port, the switch distributes the ingress load (the traffic from the switch to the host) to the port where the MAC address is located. 這在使用虛擬機器佇列 (VMQs) 時特別有用,因為您可以將佇列放在預期流量抵達的特定 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.

動態Dynamic

此負載平衡模式提供下列優點。This load balancing mode provides the following advantages.

  • 輸出負載是根據 TCP 埠和 IP 位址的雜湊來散發。Outbound loads are distributed based on a hash of the TCP Ports and IP addresses. 動態模式也會即時重新平衡負載,讓指定的輸出流程可以在設定的小組成員之間來回移動。Dynamic mode also re-balances loads in real time so that a given outbound flow can move back and forth between SET team members.

  • 輸入負載的散發方式與 Hyper-v 埠模式相同。Inbound loads are distributed in the same manner as the Hyper-V port 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 - for example 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 uncommon 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.

(VMQs) 設定和虛擬機器佇列SET and Virtual Machine Queues (VMQs)

VMQ 並將工作妥善設定在一起,而且您應該在每次使用 Hyper-v 並設定時啟用 VMQ。VMQ and SET work well together, and you should enable VMQ whenever you are using Hyper-V and SET.

注意

SET 一律會顯示所有已設定之小組成員的可用佇列總數。SET always presents the total number of queues that are available across all SET team members. 在 NIC 小組中,這稱為「佇列的總計」模式。In NIC Teaming, this is called Sum-of-Queues mode.

大部分的網路介面卡都有可用於接收端調整 ( RSS ) 或 VMQ 的佇列,但不能同時使用兩者。Most network adapters have queues that can be used for either Receive Side Scaling (RSS) or VMQ, but not both at the same time.

某些 VMQ 設定似乎是 RSS 佇列的設定,但實際上是根據目前正在使用的功能,在 RSS 和 VMQ 使用的一般佇列上的設定。Some VMQ settings appear to be settings for RSS queues but are really settings on the generic queues that both RSS and VMQ use depending on which feature is presently in use. 每個 NIC 在其 advanced 屬性中都有和的值 *RssBaseProcNumber *MaxRssProcessorsEach NIC has, in its advanced properties, values for *RssBaseProcNumber and *MaxRssProcessors.

以下是一些 VMQ 設定,可提供更好的系統效能。Following are a few VMQ settings that provide better system performance.

  • 在理想的情況下,每個 NIC 都應該將 *RssBaseProcNumber 設定為大於或等於兩個 (2) 的偶數。Ideally each NIC should have the *RssBaseProcNumber set to an even number greater than or equal to two (2). 這是因為第一個實體處理器(核心 0 ( 邏輯處理器0和 1 ) )通常會執行大部分的系統處理,因此應該將網路處理操縱從此實體處理器之外。This is because the first physical processor, Core 0 (logical processors 0 and 1), typically does most of the system processing so the network processing should be steered away from this physical processor.

注意

某些機器架構的每個實體處理器都不會有兩個邏輯處理器,因此針對這類機器,基底處理器應大於或等於1。Some machine architectures don't have two logical processors per physical processor, so for such machines the base processor should be greater than or equal to 1. 如果有疑問,請假設您的主機在每個實體處理器架構中使用2個邏輯處理器。If in doubt, assume your host is using a 2 logical processor per physical processor architecture.

  • 小組成員的處理器應該是其實際、非重迭的範圍。The team members' processors should be, to the extent that it's practical, non-overlapping. 例如,在 ( 具有2個 10Gbps nic 小組的4核心主機8邏輯處理器中 ) ,您可以將第一個設定為使用2的基底處理器並使用4個核心; 第二個設定為使用基本處理器6,並使用2個核心。For example, in a 4-core host (8 logical processors) with a team of 2 10Gbps NICs, you could set the first one to use base processor of 2 and to use 4 cores; the second would be set to use base processor 6 and use 2 cores.

設定 Hyper-v 網路虛擬化 HNV (& V) ()SET and Hyper-V Network Virtualization (HNV)

SET 與 Windows Server 2016 中的 Hyper-v 網路虛擬化完全相容。SET is fully compatible with Hyper-V Network Virtualization in Windows Server 2016. HNV 管理系統提供設定驅動程式的資訊,可讓您以針對 HNV 流量優化的方式來分散網路流量負載。The HNV management system provides information to the SET driver that allows SET to distribute the network traffic load in a manner that is optimized for the HNV traffic.

設定和即時移轉SET and Live Migration

Windows Server 2016 支援即時移轉。Live Migration is supported in Windows Server 2016.

MAC 位址在傳輸的封包上使用MAC Address Use on Transmitted Packets

當您設定具有動態負載分佈的集合小組時,來自單一 VM 等單一來源的封包 ( ) 會同時分散到多個小組成員。When you configure a SET team with dynamic load distribution, the packets from a single source (such as a single VM) are simultaneously distributed across multiple team members.

若要防止交換器混淆並防止 MAC flapping 警示,請在相似化為小組成員以外的小組成員上,設定以不同 MAC 位址取代來源 MAC 位址。To prevent the switches from getting confused and to prevent MAC flapping alarms, SET replaces the source MAC address with a different MAC address on the frames that are transmitted on team members other than the affinitized team member. 因此,每個小組成員都會使用不同的 MAC 位址,而且除非發生失敗,否則會防止 MAC 位址衝突。Because of this, each team member uses a different MAC address, and MAC address conflicts are prevented unless and until failure occurs.

在主要 NIC 上偵測到失敗時,設定小組軟體會開始使用已選擇作為暫時性相似化為小組成員之小組成員上的 VM MAC 位址 ( ,亦即,現在會以 vm 介面形式出現在交換器上的成員。 )When a failure is detected on the primary NIC, the SET teaming software starts using the VM's MAC address on the team member that is chosen to serve as the temporary affinitized team member (i.e., the one that will now appear to the switch as the VM's interface).

這種變更只適用于即將在 VM 的相似化為小組成員上傳送的流量,並以 VM 的 MAC 位址作為來源 MAC 位址。This change only applies to traffic that was going to be sent on the VM's affinitized team member with the VM's own MAC address as its source MAC address. 其他流量會繼續以在失敗前所使用的任何來源 MAC 位址來傳送。Other traffic continues to be sent with whatever source MAC address it would have used prior to the failure.

以下是根據小組的設定方式來描述設定小組 MAC 位址取代行為的清單:Following are lists that describe SET teaming MAC address replacement behavior, based on how the team is configured:

  • 使用 Hyper-v 埠散發的交換器獨立模式In Switch Independent mode with Hyper-V Port distribution

    • 每個 vmSwitch 埠都會相似化為至小組成員Every vmSwitch port is affinitized to a team member

    • 每個封包都會在通訊埠相似化為的小組成員上傳送Every packet is sent on the team member to which the port is affinitized

    • 未完成來源 MAC 更換No source MAC replacement is done

  • 使用動態散發的交換器獨立模式In Switch Independent mode with Dynamic distribution

    • 每個 vmSwitch 埠都會相似化為至小組成員Every vmSwitch port is affinitized to a team member

    • 所有 ARP/NS 封包都會傳送到埠所相似化為的小組成員All ARP/NS packets are sent on the team member to which the port is affinitized

    • 在相似化為小組成員的小組成員上傳送的封包未完成來源 MAC 位址取代Packets sent on the team member that is the affinitized team member have no source MAC address replacement done

    • 在相似化為小組成員以外的小組成員上傳送的封包將會完成來源 MAC 位址取代Packets sent on a team member other than the affinitized team member will have source MAC address replacement done

管理集合小組Managing a SET team

建議您使用 System Center Virtual Machine Manager ( VMM ) 來管理設定的小組,不過您也可以使用 Windows PowerShell 來管理設定。It is recommended that you use System Center Virtual Machine Manager (VMM) to manage SET teams, however you can also use Windows PowerShell to manage SET. 下列各節提供可用來管理設定的 Windows PowerShell 命令。The following sections provide the Windows PowerShell commands that you can use to manage SET.

如需有關如何使用 VMM 建立集合團隊的詳細資訊,請參閱 System Center VMM 程式庫主題中的「設定邏輯交換器」一節, 建立邏輯交換器For information on how to create a SET team using VMM, see the section "Set up a logical switch" in the System Center VMM library topic Create logical switches.

建立集合小組Create a SET team

您必須在建立 Hyper-v 虛擬交換器時,使用 新的-VMSwitch Windows PowerShell 命令來建立集合團隊。You must create a SET team at the same time that you create the Hyper-V Virtual Switch by using the New-VMSwitch Windows PowerShell command.

當您建立 Hyper-v 虛擬交換器時,您必須在命令語法中包含新的 EnableEmbeddedTeaming 參數。When you create the Hyper-V Virtual Switch, you must include the new EnableEmbeddedTeaming parameter in your command syntax. 在下列範例中,會建立名為 TeamedvSwitch 的 hyper-v 交換器和內嵌小組,以及兩個初始團隊成員。In the following example, a Hyper-V switch named TeamedvSwitch with embedded teaming and two initial team members is created.

New-VMSwitch -Name TeamedvSwitch -NetAdapterName "NIC 1","NIC 2" -EnableEmbeddedTeaming $true

NetAdapterName 的引數是 nic 的陣列,而不是單一 nic 時,Windows PowerShell 會假設 EnableEmbeddedTeaming 參數。The EnableEmbeddedTeaming parameter is assumed by Windows PowerShell when the argument to NetAdapterName is an array of NICs instead of a single NIC. 因此,您可以透過下列方式修改先前的命令。As a result, you could revise the previous command in the following way.

New-VMSwitch -Name TeamedvSwitch -NetAdapterName "NIC 1","NIC 2"

如果您想要使用單一小組成員建立具有集合功能的參數,讓您可以在稍後加入小組成員,您必須使用 EnableEmbeddedTeaming 參數。If you want to create a SET-capable switch with a single team member so that you can add a team member at a later time, then you must use the EnableEmbeddedTeaming parameter.

New-VMSwitch -Name TeamedvSwitch -NetAdapterName "NIC 1" -EnableEmbeddedTeaming $true

加入或移除集合小組成員Adding or removing a SET team member

VMSwitchTeam 命令包含 NetAdapterName 選項。The Set-VMSwitchTeam command includes the NetAdapterName option. 若要變更集合團隊中的小組成員,請在 [ NetAdapterName ] 選項之後,輸入所需的小組成員清單。To change the team members in a SET team, enter the desired list of team members after the NetAdapterName option. 如果 TeamedvSwitch 原本是使用 nic 1 和 nic 2 建立的,則下列範例命令會刪除設定的小組成員 "nic 2",並加入新的集合小組成員 "nic 3"。If TeamedvSwitch was originally created with NIC 1 and NIC 2, then the following example command deletes SET team member "NIC 2" and adds new SET team member "NIC 3".

Set-VMSwitchTeam -Name TeamedvSwitch -NetAdapterName "NIC 1","NIC 3"

移除集合小組Removing a SET team

您可以移除包含集合小組的 Hyper-v 虛擬交換器,以移除集合團隊。You can remove a SET team only by removing the Hyper-V Virtual Switch that contains the SET team. 如需有關如何移除 Hyper-v 虛擬交換器的詳細資訊,請使用 移除-VMSwitch 主題。Use the topic Remove-VMSwitch for information on how to remove the Hyper-V Virtual Switch. 下列範例會移除名為 SETvSwitch 的虛擬交換器。The following example removes a Virtual Switch named SETvSwitch.

Remove-VMSwitch "SETvSwitch"

變更集合小組的負載分佈演算法Changing the load distribution algorithm for a SET team

VMSwitchTeam Cmdlet 有 LoadBalancingAlgorithm 選項。The Set-VMSwitchTeam cmdlet has a LoadBalancingAlgorithm option. 此選項會採用兩個可能值的其中一個: HyperVPortDynamicThis option takes one of two possible values: HyperVPort or Dynamic. 若要設定或變更切換內嵌團隊的負載分配演算法,請使用此選項。To set or change the load distribution algorithm for a switch-embedded team, use this option.

在下列範例中,名為 TeamedvSwitch 的 VMSwitchTeam 會使用 動態 負載平衡演算法。In the following example, the VMSwitchTeam named TeamedvSwitch uses the Dynamic load balancing algorithm.

Set-VMSwitchTeam -Name TeamedvSwitch -LoadBalancingAlgorithm Dynamic

關聯實體團隊成員的虛擬介面Affinitizing virtual interfaces to physical team members

設定可讓您在虛擬介面(也就是 ( Hyper-v 虛擬交換器埠 ) 和團隊中的其中一個實體 nic)之間建立親和性。SET allows you to create an affinity between a virtual interface (i.e., Hyper-V Virtual Switch port) and one of the physical NICs in the team.

例如,如果您建立了兩個適用于 SMB Direct 的主機 Vnic - ,如使用 SET 和 RDMA Vnic 建立 Hyper-v 虛擬交換器一節中所述,您可以確定這兩個 vnic 使用不同的小組成員。For example, if you create two host vNICs for SMB-Direct, as in the section Create a Hyper-V Virtual Switch with SET and RDMA vNICs, you can ensure that the two vNICs use different team members.

新增至該區段中的腳本,您可以使用下列 Windows PowerShell 命令。Adding to the script in that section, you can use the following Windows PowerShell commands.

Set-VMNetworkAdapterTeamMapping -VMNetworkAdapterName SMB_1 –ManagementOS –PhysicalNetAdapterName “SLOT 2”
Set-VMNetworkAdapterTeamMapping -VMNetworkAdapterName SMB_2 –ManagementOS –PhysicalNetAdapterName “SLOT 3”

本主題將在 Windows Server 2016 NIC 和交換器 Embedded 小組使用者指南的章節4.2.5 中深入探討。This topic is examined in more depth in section 4.2.5 of the Windows Server 2016 NIC and Switch Embedded Teaming User Guide.