Примечание
Для доступа к этой странице требуется авторизация. Вы можете попробовать войти или изменить каталоги.
Для доступа к этой странице требуется авторизация. Вы можете попробовать изменить каталоги.
In this tutorial, you learn how to migrate your outbound connectivity from default outbound access to a NAT gateway. You learn how to change your outbound connectivity from load balancer outbound rules to a NAT gateway. You reuse the IP address from the outbound rule configuration for the NAT gateway.
Azure NAT Gateway is the recommended method for outbound connectivity. A NAT gateway is a fully managed and highly resilient Network Address Translation (NAT) service. A NAT gateway doesn't have the same limitations of Source Network Address Translation (SNAT) port exhaustion as default outbound access. A NAT gateway replaces the need for outbound rules in a load balancer for outbound connectivity.
For more information about Azure NAT Gateway, see What is Azure NAT Gateway?
В этом руководстве описано, как:
- Migrate default outbound access to a NAT gateway.
- Migrate load balancer outbound connectivity and IP address to a NAT gateway.
Предпосылки
Учетная запись Azure с активной подпиской. Создайте учетную запись бесплатно .
Стандартный общедоступный балансировщик нагрузки в вашей подписке. The load balancer must have a separate frontend IP address and outbound rules configured. Дополнительные сведения о создании Azure Load Balancer см. в документе Краткое руководство. Создание общедоступной подсистемы балансировки нагрузки с помощью портала Azure для распределения нагрузки между виртуальными машинами.
- The load balancer name used in the examples is myLoadBalancer.
Примечание.
Azure NAT Gateway provides outbound connectivity for standard internal load balancers. For more information on integrating a NAT gateway with your internal load balancers, see Tutorial: Integrate a NAT gateway with an internal load balancer using Azure portal.
Migrate default outbound access
In this section, you learn how to change your outbound connectivity method from default outbound access to a NAT gateway.
Войдите на портал Azure.
В поле поиска в верхней части портала введите сетевой шлюз NAT. Выберите Шлюзы NAT.
In NAT gateways, select + Create.
В разделе Создание шлюза NAT введите или выберите следующие значения на вкладке Основные сведения.
Настройки Ценность Сведения о проекте Подписка Выберите подписку. Группа ресурсов Выберите Создать новое.
Введите myResourceGroup.
Нажмите кнопку ОК.Instance details Имя шлюза NAT Enter myNATgateway. Регион Select the region of your virtual network. In this example, it's West Europe. Зона доступности Оставьте значение по умолчанию Нет. Idle timeout (minutes) Введите 10. Откройте вкладку Исходящий IP-адрес или щелкните Далее: Исходящий IP-адрес внизу страницы.
In Public IP addresses in the Outbound IP tab, select Create a new public IP address.
In Add a public IP address, enter myNATgatewayIP in Name. Нажмите ОК.
Откройте вкладку Подсеть или нажмите Далее: Подсеть в нижней части страницы.
In the pull-down box for Virtual network, select your virtual network.
In Subnet name, select the checkbox next to your subnet.
Select the Review + create tab, or select Review + create at the bottom of the page.
Выберите Создать.
Migrate load balancer outbound connectivity
In this section, you learn how to change your outbound connectivity method from outbound rules to a NAT gateway. You keep the same frontend IP address used for the outbound rules. You remove the outbound rule’s frontend IP configuration then create a NAT gateway with the same frontend IP address. A public load balancer is used throughout this section.
Remove outbound rule frontend IP configuration
You remove the outbound rule and the associated frontend IP configuration from your load balancer. The load balancer name used in this example is myLoadBalancer.
Войдите на портал Azure.
В поле поиска в верхней части портала введите Подсистема балансировки нагрузки. В результатах поиска выберите Подсистема балансировки нагрузки.
Выберите myLoadBalancer или свою подсистему балансировки нагрузки.
In myLoadBalancer, select Frontend IP configuration in Settings.
Note the IP address in Frontend IP configuration that you wish to migrate to a NAT gateway. You'll need this information in the next section. In this example, it's myFrontendIP-outbound.
Select Delete next to the IP configuration you wish to remove. In this example, it's myFrontendIP-outbound.
Выберите команду Удалить.
In Delete myFrontendIP-outbound, select the check box next to I have read and understood that this frontend IP configuration as well as the associated resources listed above will be deleted.
Выберите команду Удалить. This procedure deletes the frontend IP configuration and the outbound rule associated with the frontend.
Создание шлюза NAT
In this section, you create a NAT gateway with the IP address previously used for outbound rule and assign it to your precreated subnet within your virtual network. The subnet name for this example is myBackendSubnet.
В поле поиска в верхней части портала введите сетевой шлюз NAT. Выберите Шлюзы NAT.
In NAT gateways, select + Create.
В разделе Создание шлюза NAT введите или выберите следующие значения на вкладке Основные сведения.
Настройки Ценность Сведения о проекте Подписка Выберите подписку. Группа ресурсов Выберите Создать новое.
Введите myResourceGroup.
Нажмите кнопку ОК.Instance details Имя шлюза NAT Enter myNATgateway. Регион Select the region of your virtual network. In this example, it's West Europe. Зона доступности Оставьте значение по умолчанию Нет. Idle timeout (minutes) Введите 10. Откройте вкладку Исходящий IP-адрес или щелкните Далее: Исходящий IP-адрес внизу страницы.
In Public IP addresses in the Outbound IP tab, select the IP address you noted from the previous section. In this example, it's myPublicIP-outbound.
Откройте вкладку Подсеть или нажмите Далее: Подсеть в нижней части страницы.
In the pull-down box for Virtual network, select your virtual network.
In Subnet name, select the checkbox for your subnet. In this example, it's myBackendSubnet.
Select the Review + create tab, or select Review + create at the bottom of the page.
Выберите Создать.
Очистка ресурсов
If you're not going to continue to use this application, delete the NAT gateway with the following steps:
В меню слева выберите Группы ресурсов.
Выберите группу ресурсов myResourceGroup.
Выберите команду Удалить группу ресурсов.
Введите myResourceGroup и выберите Удалить.
Следующий шаг
В этой статье вы узнали, как:
Migrate default outbound access to a NAT gateway.
Migrate load balancer outbound connectivity and IP address to a NAT gateway.
For more information about NAT gateway and the connectivity benefits it provides, see Design virtual networks with NAT gateway.
Advance to the next article to learn how to integrate a NAT gateway with a public load balancer: