Here are the steps and explanations for ensuring that all hosts deployed to subnet3-2 connect to the internet by using the same static public IP address:
To use the same static public IP address for multiple hosts, you need to create a NAT gateway and associate it with subnet3-2. A N AT gateway is a resourc e that performs network address translation ( N AT) for outbound traffic from a subnet 1 . It allows you to use a single public IP address for multiple private IP addre sses 2 .
To create a NAT gateway, you need to go to the Azure portal and select Create a resource. Search for NAT gateway , select NAT gat eway , then select Create 3 .
On the Create a NAT gateway page, enter or sele ct the following information and accept the defaults for the remaining settings:
Subscription: Select your subscription name
Resource group: Select your resource group
Name: Type a unique name for your NAT gateway
Region: Select the same region as your vir tual network
Public IP address: Select Create new and type a name for your public IP address. Select Sta ndard a s the SKU an d Static as the assignment method 4 .
Se lect Review + create and then select Create to c reate your NAT gatewa y 3 .
To associate the NAT gateway with subnet3-2, you need to go to the Virtual networks service in the Azure portal and select your virtual network.
On the Virtual network page, select Subnet s under Settings, and then select subnet3-2 from the list.
On the Edit subnet page, under NAT gateway, select your NAT gateway from the drop-down list. Then select Save.