Azure Network Interface
A Network Interface (NIC) is an interconnection between a Virtual Machine and the underlying software network. An Azure Virtual Machine (VM) has one or more network interfaces (NIC) attached to it. Any NIC can have one or more static or dynamic public and private IP addresses assigned to it.
Configuring the network interface
Virtual network & subnets: we can attach a network interface to a VNet and Subnet, and once we deployed a NIC into a VNet, we can’t change it.
IP configuration: Public and private IP addresses will be assigned at the NIC level. Primary & secondary IP configurations
NSG & Routes: We can apply zero or one network security group and one or more routes to a network interface.
IP Forwarding: This setting must be enabled for every network interface that is attached to the virtual machine.
DNS servers- We can specify which DNS server the Azure DHCP servers assign a network interface.
It is a unique reference that identifies each computer using the Internet Protocol to communicate over a network.
There are two ways to define an IP address:
|Private IP Addressing||Public IP addressing|
|Private IPv4 addresses enable a virtual machine to communicate with other resources in a virtual network or other connected networks.||When we assign a public IP address to an Azure resource that supports public IP addresses, which enables Inbound communication from the internet to the resource, resources like Azure VMs and Outbound connectivity to the internet using a predictable IP address is called a public IP address.|
|When we select the dynamic addresses, Azure automatically assigns the next available address from the address space of the subnet you selected.||The dynamic addresses are released when a public IP address resource will be dissociated from a resource it is associated to.|
|When we select static addresses, we must manually assign an available IP address from within the address space of the subnet you selected.||Static IP addresses are assigned to the machine when a public IP address is created.|
We can specify a DNS domain name label for a public IP resource, which creates a mapping for domainnamelabel.location.cloudapp.azure.com to the public IP address in the Azure-managed DNS servers.
Internal DNS hostname resolution (for VMs)
All Azure VM’s are configured with Azure-managed DNS servers by default unless you want to set custom DNS servers explicitly, and these Azure managed DNS servers provide internal name resolution for VM’s that reside with the same VNet. So if we want to RDP from one virtual machine to another virtual machine, you actually can use the name of the machine in stuff Private IP address.
Configure multiple NICs and IP addresses for a VM
Step 1: Click on Create resource button and type-in network interface. Then click on Network Interface and create.
Step 2: Now, fill the required details and click on create.
Step 3: Your Network Interface will be created and ready to embed.
Step 4: Again, go to the home page and create a public IP address.
Step 5: Now, fill the required details and click on create.
Step 6: You have now both the NIC and IP address ready to use with the virtual machine.