Assign a public IP to a virtual machine
Applies to: Azure Local, versions 23H2 and 22H2; Windows Server 2022, Windows Server 2019, Windows Server 2016
This article describes how to use Windows Admin Center to assign a Software Defined Networking (SDN) public IP address to a virtual machine (VM) in Azure Local. By assigning a public IP address to a VM, you enable the VM to communicate with external networks, thereby enhancing its capabilities and extending its connectivity.
Assigning a public IP address to a VM offers the following key benefits:
- Enhanced accessibility from outside the Azure Local instance. Assigning a public IP address to a VM enables direct inbound and outbound accessibility from the VM network adapter.
- Eliminate network address translation (NAT). With a public IP address, the VM can communicate directly with external networks without the need for NAT.
- Enable Internet Control Message Protocol (ICMP) access. By assigning a public IP address to a VM, you can enable the use of ICMP.
- Testing and validation. Assigning a public IP address to a VM allows you to verify that your SDN deployment is working properly with the routing protocol, such as Border Gateway Protocol (BGP).
Take a few minutes to watch the video about how to assign a public IP address to a VM in Azure Local.
Before you start assigning public IP address to a VM, make sure the following prerequisites are in place:
An existing Azure Local instance.
Windows Admin Center installed on a management computer and registered with Azure.
Software-Defined Networking (SDN) deployed in Azure Local.
A public IP address that you can assign to your VM.
Follow these steps to assign a public IP address to a VM:
In Windows Admin Center, under Tools, scroll down and select Virtual Machines.
The Inventory tab on the right lists all VMs available on the current node or the system. Select the specific VM to which you want to assign a public IP address and then select Settings.
Under Settings, select Networks to manage network adapter settings, including adding, removing, or modifying them.
If the VM already has a network adapter and an IP address, you can skip to the next step. Otherwise, follow these steps to add a network adapter and an IP address:
- Select Add network adapter.
- Select the appropriate virtual switch from the dropdown list.
- Select the appropriate isolation mode, network, and subnet.
- Select Add IP address and enter an IP address in the IP address field.
From the Public IP address dropdown list, select your preconfigured public IP address.
Select Save network settings to apply the new configuration.
After you assign a public IP address to a VM, the IP address doesn't show when you run Ipconfig
on the VM.
Instead, follow these steps to verify the public IP address configuration:
- In Windows Admin Center, under Tools, scroll down and select Virtual Machines.
- On the Inventory tab, select the VM to which you assigned a public IP address, and then select Settings.
- Under Settings, select Networks.
- Look for the network adapter to which you assigned the public IP address. The assigned public IP address should now be displayed for that specific network adapter.
If you encounter any issues while assigning the public IP address, check the following:
Make sure the public IP address isn't being used by another device in your network.
Ensure that the virtual switch you selected during the network adapter setup is correctly configured.
Verify that you have the necessary permissions to make changes in Azure Local and Windows Admin Center.
Check your SDN configuration. If there are issues with your SDN, they may prevent you from assigning a public IP address.