在 VMM 網狀架構中設定 SDN 軟體負載平衡器Set up an SDN software load balancer in the VMM fabric

重要

已不再支援此版本的 Virtual Machine Manager (VMM),建議升級至 VMM 2019This version of Virtual Machine Manager (VMM) has reached the end of support, we recommend you to upgrade to VMM 2019.

本文說明在 System Center - Virtual Machine Manager (VMM) 網狀架構中,如何部署軟體定義網路 (SDN) 軟體負載平衡器 (SLB)。This article describes how to deploy a Software Defined Networking (SDN) software load balancer (SLB) in the System Center - Virtual Machine Manager (VMM) fabric.

SLB 可以將租用戶和租用戶客戶網路的流量平均分散到各個虛擬網路資源,讓多部伺服器可以裝載相同的工作負載提供高可用性和延展性。The SLB enables even distribution of tenant and tenant customer network traffic among virtual network resources, so that multiple servers can host the same workload to provide high availability and scalability. 進一步瞭解Learn more.

您可以使用 VMM 來部署網路控制卡和軟體負載平衡器。You can use VMM to deploy a network controller and a software load balancer. 設定好 SLB 之後,您可以在 SDN 基礎結構中有效率地調控多工和 NAT 功能。After you set up the SLB, you can leverage the multiplexing and NAT capabilities in your SDN infrastructure.

注意

  • 從 VMM 2019 UR1 起,單一連線網路類型已變更為連線的網路From VMM 2019 UR1, One Connected network type is changed to Connected Network
  • VMM 2019 UR2 和更新版本支援 IPv6。VMM 2019 UR2 and later supports IPv6.

開始之前Before you start

確認下列事項:Ensure the following:

  • 規劃:在文件中,閱讀規劃軟體定義網路的相關資訊,並檢閱規劃拓撲。Planning: Read about planning a software defined network, and review the planning topology in this document. 下圖顯示 4 節點設定的範例。The diagram shows a sample 4-node setup. 這是一個具有三個網路控制卡節點 (VM) 及三個 SLB/MUX 節點的高可用性設定。The setup is highly available with Three network controller nodes (VM), and Three SLB/MUX nodes. 它所顯示的兩個租用戶是由一個虛擬網路分成兩個虛擬子網路,以模擬 Web 層和資料庫層。It shows Two tenants with One virtual network broken into Two virtual subnets to simulate a web tier and a database tier. 基礎結構和租用戶虛擬機器都可以在任何實體主機上重新散發。Both the infrastructure and tenant virtual machines can be redistributed across any physical host.
  • 網路控制卡︰您應該在 VMM 網狀架構中部署 SDN 網路控制卡,如此您具有執行中的計算和網路基礎結構,然後設定負載平衡。Network controller: You should have an SDN network controller deployed in the VMM fabric, so that you have the compute and network infrastructure running before you set up the load balancing.
  • SSL 憑證:若要匯入 SLB 服務範本,您必須準備 SSL 憑證。SSL certificate: To import the SLB service template you'll need to prepare an SSL certificate. 您在網路控制卡部署期間已經取得憑證。You made the certificate available during network controller deployment. 若要為 SLB 使用您在網路控制卡部署期間準備的憑證,請以滑鼠右鍵按一下該憑證,並以不含密碼的 .CER 格式匯出該憑證。To use the certificate you prepared in network controller deployment for SLB, right-click the certificate and export it without a password in .CER format. 將憑證放在資源庫,在您設定網路控制站時所建立的 NCCertificate.CR 資料夾中。Place it in the library, in the NCCertificate.CR folder you created when you set up the network controller.
  • 服務範本:VMM 使用服務範本來自動化 SLB 部署。Service template: VMM uses a service template to automate SLB deployment. 服務範本支援在第 1 代和第 2 代 VM 上進行多節點部署。Service templates support multi-node deployment on generation 1 and generation 2 VMs.
  • SLB VM︰所有 SLB 虛擬機器都必須執行已安裝最新修補程式的 Windows Server 2016。SLB VMs: All the SLB virtual machines must be running Windows Server 2016 with the latest patches installed.
  • HNV 網路︰確定您已建立提供者 HNV 網路作為 NC 驗證的一部分。HNV Network: Ensure that you created the Provider HNV network as part of NC validation. 深入了解Learn more.

部署步驟Deployment steps

  1. 準備 SSL 憑證︰將憑證放入 VMM 資源庫。Prepare the SSL certificate: Put the certificate in the VMM library.
  2. 下載服務範本︰下載部署 SLB/MUX 所需的服務範本。Download the service template: Download the service template that you need to deploy the SLB/MUX.
  3. 建立傳輸邏輯網路︰您必須建立邏輯網路:Create the transit logical networks: You need to create logical networks:
    • 一個鏡像傳輸 (前端) 實體網路的邏輯網路。A logical network to mirror the transit (Frontend) physical network.
    • 私人虛擬 IP (VIP) 以及公用 VIP 網路,用來指派 VIP 給 SLB 服務。Private virtual IP (VIP) and public VIP networks, to assign VIPs to the SLB service.
  4. 建立私人和公用 VIP 邏輯網路:私人虛擬 IP (VIP) 以及公用 VIP 網路,用來指派 VIP 給 SLB 服務。Create private and public VIP logical networks: Private virtual IP (VIP) and public VIP networks, to assign VIPs to the SLB service.
  5. 匯入服務範本︰匯入和自訂 SLB 服務範本。Import the service template: Import and customize the SLB service template.
  6. 部署 SLB︰部署 SLB 做為 VMM 服務,並設定服務屬性。Deploy SLB: Deploy SLB as a VMM service, and configure the service properties.
  7. 驗證部署︰設定 SLB/MUX 執行個體與 BGP 路由器之間的 BGP 對等互連、指派公用 IP 位址給租用戶 VM 或服務,以及從網路外部存取 VM 或服務。Validate the deployment: Configure BGP peering between the SLB/MUX instance and a BGP router, assign a public IP address to a tenant VM or service, and access the VM or service from outside the network.

準備憑證Prepare the certificate

確定您在 NC 部署期間建立的 SSL 憑證已複製到 NCCertificate.CR 資料夾。Ensure that the SSL certificate that you created during the NC deployment is copied to NCCertificate.CR folder.

下載服務範本Download the service template

  1. Microsoft SDN GitHub 存放庫下載 SDN 資料夾,並將 [VMM]**** >[範本]**** > [SLB]**** 中的範本複製到 VMM 伺服器上的本機路徑。Download the SDN folder from the Microsoft SDN GitHub repository and copy the templates from VMM >Templates > SLB to a local path on the VMM server.
  2. 將內容解壓縮至本機電腦上的資料夾。Extract the contents to a folder on a local computer. 稍後您將匯入資源庫。You'll import them to the library later.

此下載包含兩個範本:The download contains Two templates:

  • SLB Production Generation 1 VM.xml 範本是用來部署第 1 代虛擬機器上的 SLB 服務。The SLB Production Generation 1 VM.xml template is for deploying the SLB Service on generation 1 virtual machines.
  • SLB Production Generation 2 VM.xml 是用來部署第 2 代虛擬機器上的 SLB 服務。The SLB Production Generation 2 VM.xml is for deploying the SLB Service on Generation 2 virtual machines.

這兩個範本預設都有三部虛擬機器,您可以在服務範本設計工具中變更此計數。Both the templates have a default count of three virtual machines which can be changed in the service template designer.

我們建議針對 SLB 部署使用簡化的 SDN 拓撲 (2 個實體網路)。We recommend to use simplified SDN topology (2 physical network) for SLB deployments. 使用簡化 SDN 拓撲範本時,略過建立傳輸邏輯網路。Skip creating transit logical network when simplified SDN topology template is used.

建立傳輸邏輯網路Create the transit logical network

  1. 開啟 [建立邏輯網路精靈]****,然後鍵入 [名稱]**** 和選擇性描述。Open the Create logical network Wizard, and type a Name and optional description.
  2. 在 [設定] 中,選取 [一個已連線的網路]。In Settings, select One Connected Network. 選取 [建立具有相同名稱的 VM 網路]**** 方塊以允許虛擬機器直接存取此邏輯網路,和 [由網路控制卡管理]****。Select Create a VM network with the same name box to allow virtual machines to access this logical network directly, and Managed by the network controller.
  • 針對 VMM 2019 UR1 和更新版本,請在設定中,選取 [連線的網路],然後選取 [由網路控制卡管理]。For VMM 2019 UR1 and later, in Settings, select Connected Network, and select Managed by the Network Controller.
  1. 在 [網站]**** 中,為您的子網路新增網站資訊。In Network Site, add the network site information for your subnet.
  2. 檢閱 [摘要]**** 資訊,並完成邏輯網路精靈。Review the Summary information and complete the logical network wizard.

建立傳輸邏輯網路的 IP 位址集區Create an IP address pool for the transit logical network

這是將 DIP 指派給 SLB/MUX 虛擬機器和 BGP 對等虛擬機器 (若有部署) 的 IP 位址集區。This is the IP address pool where DIPs are assigned to the SLB/MUX virtual machines and BGP Peer virtual machine (if deployed).

這是將 DIP 指派給 SLB/MUX 虛擬機器和 BGP 對等虛擬機器 (若有部署) 的 IP 位址集區。This is the IP address pool where DIPs are assigned to the SLB/MUX virtual machines and BGP Peer virtual machine (if deployed). 從 VMM 2019 UR1 起,您可以使用建立邏輯網路精靈來建立 IP 位址集區。From VMM 2019 UR1, you can create IP address pool using Create Logical Network wizard.

注意Note:

  • 請確定您是使用對應傳輸網路 IP 位址空間的 IP 位址範圍。Ensure you use the IP address range that corresponds to your transit network IP address space. 請不要在您即將建立的 IP 集區中包含子網路的第一個 IP 位址。Don't include the first IP address of your subnet in the IP pool you are about to create. 例如,如果您可用的子網路是從 .1 到 .254,請讓範圍從 .2 開始。For example, if your available subnet is from .1 to .254, start your range at .2.
  • 建立傳輸邏輯網路之後,請確定您將此邏輯網路與您在網路控制卡部署期間所建立的管理交換器上行連接埠設定檔相關聯。After you create the Transit logical network, ensure you associate this logical network with the Management switch uplink port profile you created during the network controller deployment.

建立 IP 位址集區Create the IP address pool:

  1. 以滑鼠右鍵按一下邏輯網路 > [建立 IP 集區]****。Right-click the logical network > Create IP Pool.

  2. 提供 IP 集區的 [名稱]**** 和選擇性描述,並確定已選取正確的邏輯網路。Provide a Name and optional description for the IP Pool and ensure that the correct logical network is selected.

  3. 在 [網站]**** 中,選取此 IP 位址集區將服務的子網路。In Network Site, select the subnet that this IP address pool will service. 如果您的 HNV 提供者網路有多個子網路,則必須為每個子網路建立一個靜態 IP 位址集區。If you have more than one subnet as part of your HNV provider network, you need to create a static IP address pool for each subnet. 如果您只有一個網站 (例如,範例拓撲),則您只要按一下 [下一步]**** 即可。If you have only one site (for example, like the sample topology) then you can just click Next.

  4. 在 [IP 位址範圍]**** 中,設定開始和結束 IP 位址。In IP Address range configure the starting and ending IP address. 請不要使用可用子網路的前三個 IP 位址。Don't use the first three IP addresses of your available subnet. 例如,如果您可用的子網路為 .1 到 .254,請讓您的範圍從 .4 之後開始。For example, if your available subnet is from .1 to .254, start your range at .4 or greater.

  5. 接著,設定預設閘道位址。Next, configure the default gateway address. 按一下 [預設閘道]**** 方塊旁的 [插入]****,輸入位址並使用預設計量。Click Insert next to the Default gateways box, type the address and use the default metric. 選擇性設定 DNS 和 WINS。Optionally configure DNS and WINS.

  6. 檢閱 [摘要] 資訊,然後按一下 [完成]**** 即可完成精靈。Review the summary information and click Finish to complete the wizard.

    注意:請確定您將邏輯網路與管理交換器上行連接埠設定檔產生關聯。Note: Ensure you associate the logical network with the management switch uplink port profile.

建立私人和公用 VIP 邏輯網路Create private and public VIP logical networks

您需要私人 VIP 位址集區以指派 VIP 和公用 VIP 給 SLB 管理員服務。You need a private VIP address pool to assign a VIP, and a public VIP, to the SLB Manager service. 請注意,兩者的建立程序很相似,但有一些差異。Note that the procedure for creating both is similar but there are some differences.

建立私人 VIPCreate a private VIP:

  1. 啟動 [建立邏輯網路精靈]****。Start the Create logical network Wizard. 輸入此網路的 [名稱] 和選擇性描述。Type a Name and optional description for this network.
  1. 在 [設定] 中選取 [一個已連線的網路]。In Settings, select One Connected Network. 選取 [建立具有相同名稱的 VM 網路以允許虛擬機器直接存取此邏輯網路]****。Select Create a VM network with the same name to allow virtual machines to access this logical network directly. 選取 [由網路控制站管理]****。Select Managed by the network controller.
  1. 在 [設定] 中選取 [一個已連線的網路]。In Settings, select One Connected Network. 選取 [建立具有相同名稱的 VM 網路以允許虛擬機器直接存取此邏輯網路]****。Select Create a VM network with the same name to allow virtual machines to access this logical network directly. 選取 [由網路控制站管理]****。Select Managed by the network controller. 針對 UR1 和更新版本,請在設定中,選取 [連線的網路],然後選取 [由網路控制卡管理]。For UR1 and later, in Settings, select connected Network and select Managed by the network controller. 私密 VIPPrivate VIP
  1. 在 [網站]**** 中,為您的私人 VIP 邏輯網路新增網路站台資訊。In Network Site, add the network site information for your private VIP logical network.
  2. 檢閱 [摘要] 的資訊並完成精靈。Review the Summary information and complete the wizard.

建立公用 VIPCreate a public VIP:

  1. 啟動 [建立邏輯網路精靈]****。Start the Create logical network Wizard. 輸入此網路的 [名稱] 和選擇性描述。Type a Name and optional description for this network.
  1. 在 [設定] 中,選取 [一個已連線的網路]。In Settings, select One Connected Network. 選取 [建立具有相同名稱的 VM 網路以允許虛擬機器直接存取此邏輯網路]****。Select Create a VM network with the same name to allow virtual machines to access this logical network directly. 選取 [由網路控制卡管理]**** 和 [公用 IP 位址網路]****。Select Managed by the network controller and Public IP Address Network.
  1. 在 [設定] 中選取 [一個已連線的網路]。In Settings, select One Connected Network. 選取 [建立具有相同名稱的 VM 網路以允許虛擬機器直接存取此邏輯網路]****。Select Create a VM network with the same name to allow virtual machines to access this logical network directly. 選取 [由網路控制站管理]****。Select Managed by the network controller.

    針對 UR1 和更新版本,請在設定中,選取 [連線的網路],然後選取 [由網路控制卡管理] 和 [公用 IP 位址網路]。For UR1 and later, in Settings, select connected Network and select both Managed by the network controller and Public IP address network.

    公用 VIP

  1. 在 [網站]**** 中,為您的公用 VIP 邏輯網路新增網站資訊。In Network Site, add the network site information for your public VIP logical network.
  2. 檢閱 [摘要] 的資訊並完成精靈。Review the Summary information and complete the wizard.

建立私人和公用 VIP 網路的 IP 位址集區Create IP address pools for the private and public VIP networks

  1. 以滑鼠右鍵按一下私人 VIP 邏輯網路 > [建立 IP 集區]****。Right-click the private VIP logical network > Create IP Pool.
  2. 提供 IP 集區的 [名稱]**** 和選擇性描述,並確定已選取正確的邏輯網路。Provide a Name and optional description for the IP Pool and ensure that the correct logical network is selected.
  3. 接受預設的網路站台,然後按一下 [下一步]。Accept the default network site, and click Next.
  1. 在 [IP 位址範圍]**** 中,設定開始和結束 IP 位址。In IP Address range configure the starting and ending IP address.

    注意

    請不要使用可用子網路的第一個 IP 位址。Don't use the first IP address of your available subnet. 例如,如果您可用的子網路是從 .1 到 .254,請讓您的範圍從 .2 之後開始。For example, if your available subnet is from .1 to .254, start your range at .2 or greater.

  1. 在 [IP 位址範圍]**** 中,設定開始和結束 IP 位址。In IP Address range configure the starting and ending IP address. 如果您使用的是 IPv6 位址空間,請指定 IPv6 位址集區。Specify IPv6 address pool if you are using IPv6 address space.

    注意

    請不要使用可用子網路的第一個 IP 位址。Don't use the first IP address of your available subnet. 例如,如果您可用的子網路是從 .1 到 .254,請讓您的範圍從 .2 之後開始。For example, if your available subnet is from .1 to .254, start your range at .2 or greater. 若要指定 VIP 範圍,請不要使用縮寫的 IPv6 位址格式:請使用 2001:db8:0:200:0:0:0:7 格式,而不要使用 2001:db8:0:200::7。To specify the VIP range, don’t use the shortened form of IPv6 address; Use 2001:db8:0:200:0:0:0:7 format instead of 2001:db8:0:200::7.

    單一 VIP 範圍內允許的位址數目上限為 1024。The maximum number of addresses allowed in a single VIP range is 1024.

  1. 在 [保留給負載平衡器 VIP 的 IP 位址]**** 中,輸入子網路中的 IP 位址範圍。In IP addresses reserved for load balancer VIPs, type the IP address range in the subnet. 此範圍應符合您指定的開始和結束位址。It should match the start and end addresses you specified.
  2. 您不需要提供閘道、DNS 或 WINS 資訊,因為此集區用來透過網路控制站配置 VIP 的 IP 位址。You don't need to provide gateway, DNS or WINS information because this pool is used to allocate IP addresses for VIPs through the network controller only. 按一下 [下一步]**** 以跳過這些畫面。Click Next to skip these screens. 輸入位址,並使用預設計量。type the address and use the default metric. 選擇性設定 DNS 和 WINS。Optionally configure DNS and WINS.
  3. 檢閱 [摘要] 資訊,然後按一下 [完成]**** 即可完成精靈。Review the summary information and click Finish to complete the wizard.
  4. 為公用 VIP 邏輯網路重複程序,但是這次輸入公用網路的 IP 位址範圍。Repeat the procedure for the public VIP logical network, this time type the IP address range for the public network.

匯入服務範本Import the service template

將服務範本匯入到 VMM 資源庫。Import the service template into the VMM library. 在此範例中,我們將匯入第 2 代範本。For this example, we'll import the generation 2 template.

  1. 按一下 [程式庫] > [匯入範本]。Click Library > Import Template.

  2. 瀏覽至您的服務範本資料夾,選取 SLB Production Generation 2 VM.xml 檔案。Browse to your service template folder, select the SLB Production Generation 2 VM.xml file.

  3. 當您匯入服務範本時,請更新您環境的參數。Update the parameters for your environment as you import the service template. 請注意,資源庫資源已在網路控制站部署期間匯入。Note that the library resources were imported during network controller deployment.

    • WinServer.vhdx:選取您稍早在網路控制卡部署期間準備並匯入的虛擬硬碟映像。WinServer.vhdx: Select the virtual hard drive image that you prepared and imported earlier, during the network controller deployment.
    • NCCertificate.cr:此資源庫資源包含用來設定網路控制卡的指令碼。NCCertificate.CR: This library resource contains scripts used to set up the network controller. 對應至 VMM 資源庫中的 NCCertificate.cr 資源庫資源。Map to the NCCertificate.cr library resource in the VMM library.
    • EdgeDeployment.CR:對應至 VMM 程式庫中的 EdgeDeployment.cr 程式庫資源。EdgeDeployment.CR: Map to the EdgeDeployment.cr library resource in the VMM library.
  4. 請記住,您應該已經將先前建立的 .CER 憑證複製到 NCCertificate.CR 資料夾。Remember that you should have copied the .CER certificate that you previously created to the NCCertificate.CR folder.

  5. 檢閱 [摘要]**** 頁面上的詳細資料,然後按一下 [匯入]****。On the Summary page, review the details and click Import.

    注意︰您可以自訂服務範本。Note: You can customize the service template. 深入了解Learn more.

部署 SLB 服務Deploy the SLB service

現在要部署 SLB/MUX 服務執行個體。Now deploy an SLB/MUX service instance.

  1. 選取 SLB Production Generation 2 VM.xml 服務範本 > [設定部署]****。Select the SLB Production Generation 2 VM.xml service template > Configure Deployment. 輸入服務執行個體的 [名稱] 和選擇性目的地。Type a Name and optional destination for the service instance. 目的地必須對應至包含您所設定之主機的主機群組。The destination must map to a host group that contains the hosts you've configured.

  2. 在 [網路設定]**** 區段中,將 TransitNetwork 對應到您的傳輸 VM 網路,將 ManagementNetwork 對應到您的管理 VM 網路。In the Network Settings section, map TransitNetwork to your transit VM network and ManagementNetwork to your management VM network.

    注意

    • 當您使用簡化的拓撲範本時,傳輸網路不適用。Transit network is not applicable when you are using simplified topology templates.
    • 對應完成之後,就會出現 [部署服務]**** 對話方塊。The Deploy Service dialog appears after mapping is complete. 虛擬機器執行個體一開始為紅色是正常的。It is normal for the virtual machine instances to be initially Red. 按一下 [重新整理預覽]****,自動為虛擬機器尋找適合的主機。Click Refresh Preview to automatically find suitable hosts for the virtual machine.
  3. 在 [設定部署]**** 視窗的左側,依照下表所述進行設定:On the left of the Configure Deployment window, configure the settings as detailed in the following table:

    設定Setting 需求Requirement 描述Description
    傳輸網路Transit network 必要Required 您的傳輸 VM 網路。Your transit VM network.
    LocalAdminLocalAdmin 必要Required 在您的環境中,選取將會在虛擬機器上作為本機系統管理員使用的執行身分帳戶。Select a Run As Account in your environment, which will be used as the local Administrator on the virtual machines. 使用者名稱應該是 Administrator。The user name should be Administrator.
    管理網路Management network 必要Required 選擇您為主機管理所建立的管理 VM 網路。Choose the management VM network that you created for host management.
    MgmtDomainAccountMgmtDomainAccount 必要Required 選取有權限將 SLB/MUX 虛擬機器加入與網路控制卡相關聯之 Active Directory 網域的執行身分帳戶。Select a Run As Account with permissions to add the SLB/MUX virtual machines to the Active Directory domain associated with the network controller. 這可以是您在部署網路控制站時,於 MgmtDomainAccount 中所使用的相同帳戶。This can be the same account you used in MgmtDomainAccount while deploying the network controller.
    MgmtDomainFQDNMgmtDomainFQDN 必要Required Active Directory 網域的 FQDN,SLB/MUX 虛擬機器將會加入這個網域。FQDN for the Active directory domain that the SLB/MUX virtual machines will join.
    SelfSignedConfigurationSelfSignedConfiguration 必要Required 如果您使用的是自我簽署憑證,請指定 TrueSpecify True if the certificate you are using is self-signed.
  4. 進行這些設定之後,請按一下 [部署服務]**** 以開始服務部署工作。After you configure these settings, click Deploy Service to begin the service deployment job. 部署時間將會視您的硬體而定,但是通常介於 30 到 60 分鐘之間。Deployment times will vary depending on your hardware but are typically between 30 and 60 minutes.

  5. 如果您並非使用大量授權的 VHDX,或是如果 VHDX 沒有來自回應檔案的產品金鑰,則部署將會在 SLB/MUX VM 佈建期間停在 [產品金鑰]**** 頁面。If you are not using a volume licensed VHDX, or if the VHDX doesn't have the product key from an answer file, then deployment will stop at the Product Key page, during SLB/MUX VM provisioning. 您必須手動存取 VM 桌面,然後略過或輸入產品金鑰。You need to manually access the VM desktop, and either skip or enter the product key.

  6. 當服務部署作業完成時,請確認您的服務出現在 [VM 和服務] > [服務] > [服務的 VM 網路資訊] 中。When the service deployment job is complete, verify that your service appears in VMs and Services > Services > VM Network Information for Services. 以滑鼠右鍵按一下服務,確認 [屬性]**** 中的狀態為 [已部署]****。Right-click the service and verify that the state is Deployed in Properties.

部署之後,請確認服務出現在 [所有主機] > [服務] > [服務的 VM 網路資訊] 中。After deployment, verify that the service appears in All Hosts > Services > VM Network Information for Services. 以滑鼠右鍵按一下 SLB MUX 服務 > [屬性]****,確認狀態為 [已部署]****。Right-click the SLB MUX service > Properties, and verify that the state is Deployed. 如果 SLB/MUX 部署失敗,請確定刪除失敗的服務執行個體,然後再試一次部署 SLB。If the SLB/MUX deployment fails, ensure you delete the failed service instance, before you try to deploy the SLB, once again.

如果您想要相應縮小或擴充部署的軟體負載平衡器服務執行個體,請閱讀此部落格If you want to scale-in or scale-out a deployed software load balancer service instance, read this blog.

注意

部署 SLB 服務之後,請在連線到所有 SLB MUX VM 上傳輸 VM 網路的虛擬網路介面卡上,停用 DNS 註冊。After the SLB service is deployed, disable DNS registration on the virtual network adapter, connected to the transit VM network on all the SLB MUX VMs.

設定 SLB 角色和 SLB/MUX 屬性Configure the SLB role and SLB/MUX properties

注意︰請確定您已建立 HNV PA 邏輯網路,再繼續進行。Note: Before you proceed, ensure you created the HNV PA Logical Network.

既然已經部署服務,您可以設定其屬性。Now that the service is deployed, you can configure its properties. 您必須將部署的 SLB 服務執行個體與網路控制卡相關聯,然後在 SLB/MUX 執行個體和 TOR 交換器或 BGP 路由器對等之間設定 BGP 對等互連。you'll need to associate the SLB service instance that you deployed with network controller, and then configuring BGP peering between the SLB/MUX instance and a TOR switch or a BGP router peer.

  1. 按一下 [網狀架構] > [網路服務]。Click Fabric > Network Service. 以滑鼠右鍵按一下 [網路控制卡] 服務 > [屬性]。Right-click the network controller service > Properties.
  2. 選取 [服務]**** 索引標籤 > [負載平衡器角色]**** > [相關聯的服務]**** > [瀏覽]****。Select the Services tab > Load Balancer Role > Associated Service > Browse.
  3. 選取您稍早建立的 SLB/MUX 服務執行個體。Select the SLB/MUX service instance you created earlier. 選取執行身分帳戶。Select a Run As Account.
  4. 針對 [管理 IP 位址]****,請使用您稍早建立之私人 VIP 集區中的 IP 位址。For the Management IP address, use an IP address from the private VIP pool you created earlier. 選擇性地指定要從輸出 NAT 排除的 IP 位址範圍。Optionally specify the IP address ranges to be excluded from the outbound NAT. 在 [SLBM VIP 集區]**** 下,選取私人與公用 VIP 集區以發行到 NC。Under SLBM VIP Pools, select both the private and public VIP pools for publishing to NC.
  5. 在精靈中,按一下 [負載平衡器角色]**** 底下所列的 SLB/MUX 執行個體。Click the SLB/MUX instance listed under Load Balancer Role in the wizard. 輸入您資料中心的本機 ASN,以及 SLB/MUX 可以對等互連之裝置或 BGP 對等的詳細資料。Type the local ASN for your datacenter and details for the devices or BGP peers the SLB/MUX can peer with.
  6. 按一下 [確定] 。Click OK.

SLB 服務執行個體現在與 SLBM 服務相關聯,而且您應該會看到 SLB/MUX 虛擬機器執行個體,以及所有列於 [負載平衡器角色]**** 底下的設定。The SLB service instance is now associated with the SLBM service, and you should see the SLB/MUX virtual machine instance with all the settings listed under the Load Balancer role.

驗證部署Validate the deployment

部署 SLB/MUX 之後,您可以在 SLB/MUX 執行個體和 BGP 路由器之間設定 BGP 對等互連,將公用 IP 位址指派給租用戶虛擬機器或服務,然後從網路外部存取租用戶虛擬機器或服務,藉此驗證該部署。After you deploy the SLB/MUX, you can validate the deployment by configuring BGP peering between the SLB/MUX instance and a BGP router, assigning a public IP address to a tenant virtual machine or Service, and accessing the tenant virtual machine or service from outside the network.

請使用下列程序驗證Use the following procedure to validate:

  1. 在精靈中輸入外部路由器詳細資料。Enter your external router details in the wizard. 例如:For example:

    IP 位址

  2. 按一下 [確定]**** 以完成 SLB/MUX 服務執行個體設定。Click OK to complete the SLB/MUX service instance configuration.

  3. 檢查 [工作]**** 視窗,確認已成功完成 [使用必要的設定來更新網狀架構角色]**** 和 [將服務執行個體與網狀架構角色相關聯]**** 工作。Check the Jobs window to verify that the Update Fabric Role with required configuration, and Associate service instance with fabric role jobs have completed successfully.

  4. 若要完成 BGP 對等互連作業,您必須設定 BGP 與路由器上的 SLB/MUX 執行個體進行對等互連。To complete the BGP peering operation, you need to configure BGP to peer with your SLB/MUX instance on the router. 如果您使用硬體路由器,您必須參考廠商的文件,以取得如何為該裝置設定 BGP 對等互連的相關資訊。If you use a hardware router, you need to consult your vendor’s documentation regarding how to setup BGP peering for that device.

    您也需要知道您稍早部署之 SLB/MUX 執行個體的 IP 位址。You also need to know the IP address of the SLB/MUX instance that you deployed earlier. 如果需要,您可以登入 SLB MUX 虛擬機器,從命令提示字元執行 ipconfig /all,或是從 VMM 主控台取得 IP 位址。To do this, you can either log on to the SLB MUX virtual machine and run ipconfig /all from the command prompt, or you can get the IP address from the VMM console.

    注意︰輸入傳輸網路的 IP。Note: Enter an IP from the transit network.

  5. 如果在對等互連完成之後要建立新的 VIP 集區,則必須使用 VMM 主控台公告所有 VIP 位址集區。If you create a new VIP pool after peering is complete, you need to advertise all the VIP address pools using the VMM console.

驗證之後,您可以開始使用 SLB 來進行負載平衡。After you validate, you can start using the SLB for load balancing. 如需相關資訊,請參閱load balance network traffic為網路流量進行負載平衡設定 NAT 規則For related information, see load balance network traffic and configure NAT rules.

從 SDN 網狀架構移除軟體負載平衡器Remove the software load balancer from the SDN fabric

使用這些步驟,以從 SDN 網狀架構移除 SLB。Use these steps to remove the SLB from the SDN fabric.

後續步驟Next steps

建立 RAS 閘道Create a RAS gateway