5.1.2. Configure IP Addressing
💡 First Principle: Configuring IP addressing is the fundamental act of providing a network identity to Azure resources, enabling controlled and secure communication both internally within a VNet and externally with the internet.
Scenario: You need to deploy a new Virtual Machine that will host a public-facing web server. It needs a public IP address for internet access, but also a private IP address for communication with backend resources.
This task delves into the practical application of IP address management. You'll explore how to:
- Configure Public and Private IP Addresses: Assign appropriate IP addresses for internal and external communication.
- Configure Network Interfaces (NICs): Connect VMs to the virtual network and define their network identity.
Mastering these concepts is crucial for the AZ-104 exam, as it assesses your ability to implement foundational IP networking.
Why care: addressing errors look like outages. A server whose public IP changed after deallocation no longer matches its DNS record, and a VM whose IP address is set manually inside the guest operating system can lose connectivity, because Azure delivers a NIC's addresses through DHCP. Think of the NIC as the VM's phone line: the private IP is the internal extension any resource in the virtual network can dial, and a public IP is an optional outside number attached to that line for traffic to and from the internet.
⚠️ Common Pitfall: Using dynamic public IP addresses for servers that need to be consistently reachable from the internet (e.g., via a DNS A record). A dynamic public IP is released when the VM is stopped (deallocated) and can change when it starts again, breaking the DNS record. Dynamic allocation exists only on the retired Basic SKU — Standard public IPs are always static.
Key Trade-Offs:
- Static vs. Dynamic IP: Static IPs provide a consistent address but may incur a small cost even when unassigned. Basic-SKU dynamic IPs are released when the resource is deallocated but are not predictable; Standard-SKU addresses are always static and continue to bill while allocated.
Reflection Question: How does configuring both public and private IP addresses for your Azure resources, along with proper NIC configuration, fundamentally enable controlled and secure connectivity while balancing accessibility and security?