设置故障转移后的公共 IP 地址Set up public IP addresses after failover

公共 IP 地址允许 Internet 资源与 Azure 资源进行入站通信。Public IP addresses allow Internet resources to communicate inbound to Azure resources. 在 IP 地址已分配给 Azure 资源的情况下,公共 IP 地址还允许这些资源与 Internet 和面向公众的 Azure 服务进行出站通信。Public IP addresses also enable Azure resources to communicate outbound to Internet and public-facing Azure services with an IP address assigned to the resource.

  • 从 Internet 到资源的入站通信,如 Azure 虚拟机 (VM)、Azure 应用程序网关、Azure 负载均衡器、Azure VPN 网关等。Inbound communication from the Internet to the resource, such as Azure Virtual Machines (VM), Azure Application Gateways, Azure Load Balancers, Azure VPN Gateways, and others. 如果 VM 没有分配有公共 IP 地址,则仍可通过 Internet 与某些资源(如 VM)进行通信,前提是 VM 是负载均衡器后端池的一部分且负载均衡器分配有公共 IP 地址。You can still communicate with some resources, such as VMs, from the Internet, if a VM doesn't have a public IP address assigned to it, as long as the VM is part of a load balancer back-end pool, and the load balancer is assigned a public IP address.
  • 使用可预测的 IP 地址与 Internet 建立出站连接。Outbound connectivity to the Internet using a predictable IP address. 例如,如果某虚拟机未分配有公共 IP 地址,但其地址由 Azure 网络地址转换为可预测的公共地址,则默认情况下,该虚拟机可与 Internet 建立出站通信。For example, a virtual machine can communicate outbound to the Internet without a public IP address assigned to it, but its address is network address translated by Azure to an unpredictable public address, by default. 通过将公共 IP 地址分配给资源,可了解哪个 IP 地址用于出站连接。Assigning a public IP address to a resource enables you to know which IP address is used for the outbound connection. 尽管可预测,但地址可根据所选分配方法进行更改。Though predictable, the address can change, depending on the assignment method chosen. 有关详细信息,请参阅创建公共 IP 地址For more information, see Create a public IP address. 有关从 Azure 资源建立出站连接的详细信息,请参阅了解出站连接To learn more about outbound connections from Azure resources, see Understand outbound connections.

在 Azure 资源管理器中,公共 IP 地址是具有其自身属性的资源。In Azure Resource Manager, a Public IP address is a resource that has its own properties. 可与公共 IP 地址资源关联的部分资源包括:Some of the resources you can associate a public IP address resource with are:

  • 虚拟机网络接口Virtual machine network interfaces
  • 面向 Internet 的负载均衡器Internet-facing load balancers
  • VPN 网关VPN gateways
  • 应用程序网关数Application gateways

本文介绍如何将公共 IP 地址与 Site Recovery 配合使用。This article describes how you can use Public IP addresses with Site Recovery.

使用恢复计划分配公共 IP 地址Public IP address assignment using Recovery Plan

生产应用程序的公共 IP 地址不能在故障转移中保留 。Public IP address of the production application cannot be retained on failover. 作为故障转移过程的一部分启动的工作负载必须向其分配在目标区域可用的 Azure 公共 IP 资源。Workloads brought up as part of failover process must be assigned an Azure Public IP resource available in the target region. 此步骤可手动完成或使用恢复计划自动执行。This step can be done either manually or is automated with recovery plans. 恢复计划将计算机汇集到恢复组中。A recovery plan gathers machines into recovery groups. 它可以帮助定义一个系统性恢复过程。It helps you to define a systematic recovery process. 可以通过用于故障转移到 Azure 的 Azure 自动化 runbook 或通过脚本使用恢复计划来维持秩序,自动执行每个步骤所需的操作。You can use a recovery plan to impose order, and automate the actions needed at each step, using Azure Automation runbooks for failover to Azure, or scripts.

设置如下:The setup is as follows:

  • 创建恢复计划并根据需要将工作负载分组到计划中。Create a recovery plan and group your workloads as necessary into the plan.

使用 DNS 级别路由的公共终结点切换Public endpoint switching with DNS level Routing

Azure 流量管理器在终结点之间启用 DNS 级别路由,可帮助在灾难恢复方案中降低 RTOAzure Traffic Manager enables DNS level routing between endpoints and can assist with driving down your RTOs for a DR scenario.

了解有关使用流量管理器的故障转移方案的详细信息:Read more about failover scenarios with Traffic Manager:

  1. 使用流量管理器的本地到 Azure 故障转移On-premises to Azure failover with Traffic Manager
  2. 使用流量管理器的 Azure 到 Azure 故障转移Azure to Azure failover with Traffic Manager

设置如下:The setup is as follows:

  • 创建流量管理器配置文件Create a Traffic Manager profile.
  • 利用“优先级” 路由方法创建两个终结点 - 针对源的“主要” 终结点,针对 Azure 的“故障转移” 终结点。Utilizing the Priority routing method, create two endpoints - Primary for source and Failover for Azure. 主要终结点分配优先级 1,为故障转移终结点分配优先级 2。Primary is assigned Priority 1 and Failover is assigned Priority 2.
  • “主要” 终结点可以是 Azure外部终结点,具体取决于源环境在 Azure 内部还是外部。The Primary endpoint can be Azure or External depending on whether your source environment is inside or outside Azure.
  • “故障转移” 终结点被创建为“Azure” 终结点。The Failover endpoint is created as an Azure endpoint. 使用静态公共 IP 地址 ,因为这将是灾难事件中流量管理器的面向外部的终结点。Use a static public IP address as this will be external facing endpoint for Traffic Manager in the disaster event.

后续步骤Next steps