5.1.2.2. Configure Network Interfaces
š” First Principle: A network interface (NIC) is the fundamental component that connects a virtual machine to a virtual network, providing its network identity and enabling all communication.
Scenario: You have a web server Virtual Machine and a database Virtual Machine. The web server needs a public IP address for internet access and both VMs need private IP addresses for internal communication. You also need to apply specific Network Security Group rules directly to the web server's network interface, and enhance its network performance.
What It Is: A NIC is the software component that represents a network card for your Azure Virtual Machine.
Key NIC Properties:
- IP Configurations: Assign primary and secondary private IP addresses and optionally a public IP.
- DNS Servers: Specify custom DNS servers at the NIC level.
- Network Security Group (NSG): Apply NSGs directly to the NIC for fine-grained filtering.
- IP Forwarding: Enable for network virtual appliances (e.g., firewalls, routers).
- Accelerated Networking: Activate to reduce latency and improve throughput using SR-IOV.
NIC Management Overview:
- Create: Deploy a NIC via the Azure portal, CLI, or ARM templates.
- Attach/Detach: Add or remove NICs from VMs.
- Modify: Update NIC properties at any time.
ā ļø Common Pitfall: Not enabling Accelerated Networking on supported VM sizes. This leaves significant network performance on the table for no reason.
Key Trade-Offs:
- Single NIC vs. Multiple NICs: A single NIC is simpler to manage. Multiple NICs can be used for network segmentation (e.g., separating management traffic from application traffic) but add complexity.
Reflection Question: How does configuring a Network Interface (NIC) with appropriate IP configurations, NSG associations, and Accelerated Networking fundamentally serve as the essential bridge for VM connectivity, security, and performance in Azure environments?