Understanding IP addresses
A VNet in Azure can have private and public IP addresses. Private IP addresses are only accessible from within the VNet, though public IP addresses can be accessed from the internet as well. You can access private IP addresses from a VPN gateway or an ExpressRoute connection. Both private and public IP addresses can be static or dynamic, but when you create a new VNet, the IP address is static by default. You can change the IP address to static from the Azure portal, PowerShell, or command-line interface (CLI). The following are the two states of an IP address:
- Dynamic: Dynamic IP addresses are assigned by Azure automatically and are selected from the configured subnet's address range from the virtual network where the Azure resource resides. The IP address is assigned to the Azure resource upon creation or start. The IP address will be released when the resource is stopped and deallocated (when you stop the VM from the Azure portal, the VM is...