How add a Public IP to network adapter in virtual machine?

João Luiz Baroni 0 Reputation points
2023-02-03T19:38:11.9266667+00:00

How to assign a public IP to a network adapter of an Azure virtual machine?

How to know which is the IP gateway informed by the system and which is the netmask to be used?

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,083 questions
{count} votes

1 answer

Sort by: Most helpful
  1. kobulloc-MSFT 23,336 Reputation points Microsoft Employee
    2023-02-03T22:31:41.36+00:00

    Hello, @João Luiz Baroni !

    How do add a public IP to my VM?

    The documentation on associating a public IP address to a virtual machine is pretty spot on here:

    https://learn.microsoft.com/en-us/azure/virtual-network/ip-services/associate-public-ip-address-vm

    In essence, you'll:

    1. Navigate to the VM without a public IP address
    2. Click on Network under Settings, then click on the network interface you want to add the public IP address to (see screenshot below)
    3. Click on IP configuration under Settings, then click on an IP configuration (see screenshot below)
    4. Select Associate, then either choose an existing public IP address or create a new public IP address.
    5. Select Save. After a couple seconds, the public IP address will appear.

    Once you've added a public IP, you can go to the public IP address resource for additional information if you would like. Read the following for more information:

    Screenshots

    Select the network interface from your VM resource by going to Settings > Networking and selecting the network interface:

    Screenshot showing how to select the network interface of a virtual machine.

    Select the IP configuration from the network interface by going to Settings > IP configuration, and selecting the IP configuration:

    Screenshot showing how to select the I P configuration of a network interface.

    Select Associate and choose or create a public IP address and remember to Save:
    Screenshot showing the selected public I P.

    You can now view the IP address assigned to the IP configuration:
    Screenshot showing the newly assigned public I P.

    0 comments No comments