添加公共 IP 地址Add public IP addresses

本文将外部地址称作公共 IP 地址。In this article, we refer to external addresses as public IP addresses. 在 Azure Stack Hub 的上下文中,公共 IP 地址是可从 Azure Stack Hub 外部访问的 IP 地址。In the context of Azure Stack Hub, a public IP address is an IP address that's accessible from outside of Azure Stack Hub. 就本文来说,不管外部网络是可以通过公共 Internet 路由的网络,还是位于 Intranet 中并使用专用地址空间的网络,都没有关系,步骤是相同的。Whether that external network is public internet routable or is on an intranet and uses private address space doesn't matter for the purposes of this article, the steps are the same.

虽然可以设置多个 IP 池,但是你将无法选择要使用的 IP 池。While you can set up multiple IP pools, you won't be able to select which one to use. Azure Stack Hub 将所有 IP 池视为一个线程。Azure Stack Hub threads all IP pools as one. 创建资源时,无法选择要分配的 IP。When you create a resource, you can't pick an IP for assignment.


本文中的步骤仅适用于使用合作伙伴工具包 1809 或更高版本部署的系统。The steps in this article apply only to systems that were deployed using the partner toolkit version 1809 or later. 在版本 1809 之前部署的系统需要更新机架安装式 (TOR) 交换机访问控制列表 (ACL),才能允许新的公共 VIP 池范围。Systems that were deployed before version 1809 require the top-of-rack (TOR) switch access control lists (ACLs) to be updated to PERMIT the new public VIP pool range. 如果运行早期的交换机配置,请在 OEM 的配合下为新的公共 IP 池添加相应的“允许”ACL,或使用最新的合作伙伴工具包重新配置交换机,以防新的公共 IP 地址遭到阻止。If you are running older switch configurations, work with your OEM to either add the appropriate PERMIT ACLs for the new public IP pool or reconfigure your switch using the latest partner toolkit to prevent the new public IP addresses from being blocked.

添加公共 IP 地址池Add a public IP address pool

在完成 Azure Stack Hub 系统的初始部署以后,可以随时向 Azure Stack Hub 系统添加公共 IP 地址。You can add public IP addresses to your Azure Stack Hub system at any time after the initial deployment of the Azure Stack Hub system. 了解如何查看公共 IP 地址使用情况,确定 Azure Stack Hub 上的当前使用情况和公共 IP 地址可用性。Check out how to View public IP address consumption to see what the current usage and public IP address availability is on your Azure Stack Hub.

概括说来,向 Azure Stack Hub 添加新公共 IP 地址块的过程如下所示:At a high level, the process of adding a new public IP address block to Azure Stack Hub looks like this:

添加 IP 流

从提供程序处获取地址块Obtain the address block from your provider

首先需要做的事是获取需要添加到 Azure Stack Hub 的地址块。The first thing you'll need to do is to obtain the address block you want to add to Azure Stack Hub. 根据你从何处获取地址块,考虑提前期是多少,并在对其进行管理时考虑到在 Azure Stack Hub 中使用公共 IP 地址的速率。Depending on where you obtain your address block from, consider what the lead time is and manage this against the rate at which you're consuming public IP addresses in Azure Stack Hub.


Azure Stack Hub 会接受你提供的任何地址块,只要它是有效的地址块并且不与 Azure Stack Hub 中现有的地址范围重叠即可。Azure Stack Hub will accept any address block that you provide if it's a valid address block and doesn't overlap with an existing address range in Azure Stack Hub. 请确保获取可路由的有效地址块,并且该地址块不与 Azure Stack Hub 连接到的外部网络重叠。Please make sure you obtain a valid address block that's routable and non-overlapping with the external network to which Azure Stack Hub is connected. 向 Azure Stack Hub 添加该范围后,就不能删除它。After you add the range to Azure Stack Hub, you can't remove it.

向 Azure Stack Hub 添加 IP 地址范围Add the IP address range to Azure Stack Hub

  1. 在浏览器中,转到管理员门户仪表板。In a browser, go to your administrator portal dashboard. 对于本示例,我们将使用 https://adminportal.local.azurestack.externalFor this example, we'll use https://adminportal.local.azurestack.external.
  2. 以云操作员的身份登录到 Azure Stack Hub 管理门户。Sign in to the Azure Stack Hub administrator portal as a cloud operator.
  3. 在默认仪表板上找到“区域管理”列表,并选择要管理的区域。On the default dashboard, find the Region management list and select the region you want to manage. 本示例使用“本地”。For this example, we use local.
  4. 找到“资源提供程序”磁贴,单击网络资源提供程序。Find the Resource providers tile and click on the network resource provider.
  5. 单击“公共 IP 池用量”磁贴。Click on the Public IP pools usage tile.
  6. 单击“添加 IP 池”按钮。Click on the Add IP pool button.
  7. 提供 IP 池的名称。Provide a name for the IP pool. 所选的名称有助于轻松识别 IP 池。The name you choose helps you easily identify the IP pool. 最好是使名称与地址范围相同,但这不是必需的。It's a good practice to make the name the same as the address range, but that isn't required.
  8. 以 CIDR 表示法输入要添加的地址块。Enter the address block you want to add in CIDR notation. 例如: example:
  9. 在“地址范围(CIDR 块)”字段中提供有效的 CIDR 范围以后,“开始 IP 地址”、“结束 IP 地址”和“可用 IP 地址”字段会自动填充。When you provide a valid CIDR range in the Address range (CIDR block) field the Start IP address, End IP address and Available IP addresses fields will automatically populate. 这些字段为只读字段,并且是自动生成的,因此在不修改“地址范围”字段中的值的情况下,不能更改这些字段。They're read-only and automatically generated so you can't change these fields without modifying the value in the Address range field.
  10. 查看边栏选项卡上的信息并确认一切正确以后,请选择“确定”,以提交所做的更改并将地址范围添加到 Azure Stack Hub****。After you review the info on the blade and confirm that everything looks correct, select Ok to commit the change and add the address range to Azure Stack Hub.

后续步骤Next steps

查看缩放单元节点操作Review scale unit node actions.