Is there a way to force azure VM to keep the same IP address?

We have an azure virtual network with a web role, an employee role and a dedicated virtual machine. We are currently using the VM name in the database connection string. I thought it would be better to update the connection string to use a private ip address to skip name resolution, mydbserver.cloudapp.net - 10.0.0.1.

Since all virtual machines must use DHCP, is there a chance that the private ip will change? If so, then anyway, to address this? Thanks

+4
source share
2 answers

In a virtual network, the SQL Server virtual network will have a fixed IP address.

From the Windows Azure Virtual Network Overview :

Permanent Private IP Addresses: VNet virtual machines will have a stable private IP address. We assign an IP address from the address range that you specify, and offer an endless DHCP lease on it. So the IP address will remain with the virtual machine for the duration of its life.

+3
source

to be more secure, you can set a static vnet IP that ensures it never changes: http://windowsitpro.com/windows-azure/set-azure-vm-static-ip-address

+1
source

Source: https://habr.com/ru/post/1486677/


All Articles