
Public IP addresses have a nominal charge, and there's a maximum number that can be used per subscription. Assigning a public IP address to a NIC is optional.

To provide the identifier of the public IP address that you previously created, use az network nic create with the -public-ip-address parameter.įor information on deploying a networking interface using a template, see Network Interface in a Virtual Network with Public IP Address. Use New-AzNetworkInterface with the -PublicIpAddressId parameter to provide the identifier of the public IP address that you previously created. If you want to create a VM with more than one NIC, you must create it with a different method. The portal creates a VM with only one NIC. When you create a VM in the Azure portal, a network interface is automatically created for you. This table lists the methods that you can use to create a network interface. Each NIC attached to a VM is assigned a MAC address that doesn't change until the VM is deleted. You can change the subnet a VM is connected to after it's created. Each NIC must be connected to a VNet that exists in the same Azure location and subscription as the NIC. Multiple NICs allow a VM to connect to different subnets.Įach NIC attached to a VM must exist in the same location and subscription as the VM. You can create a VM with multiple NICs, and add or remove NICs through the lifecycle of a VM. To learn about the number of NICs each virtual machine size supports, see VM sizes. A virtual machine can have more than one NIC, depending on the size of the VM you create. A virtual machine must have at least one NIC. You create these resources to support communication with a virtual machine:Īdditionally, consider these optional resources:Ī network interface (NIC) is the interconnection between a virtual machine and a virtual network.

You can create a virtual network before you create a virtual machine or you can create the virtual network as you create a virtual machine. Each set of virtual machines is assigned to separate subnets in the virtual network. In the following figure, virtual machines are represented as web servers and application servers. It's important to plan before creating resources and make sure you understand the limits of networking resources. Decide how your virtual machines are intended to be accessed on the virtual network. When you create a virtual machine (VM), you create a virtual network or use an existing one.
