Availability zone with same IP address

%3CLINGO-SUB%20id%3D%22lingo-sub-1843292%22%20slang%3D%22en-US%22%3EAvailability%20zone%20with%20same%20IP%20address%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1843292%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3ECan%20Azure%20support%20in%20a%20different%20availability%20zone%20with%20a%20same%20IP%20address%3F%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EThanks.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1843530%22%20slang%3D%22en-US%22%3ERe%3A%20Availability%20zone%20with%20same%20IP%20address%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1843530%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F853903%22%20target%3D%22_blank%22%3E%40ariffisariff%3C%2FA%3E%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAvailability%20Zone%20(AZ)%20in%20Azure%20is%20a%20construct%20that%20allows%20for%20high%20availability%20design.%20AZs%20are%26nbsp%3Bunique%20physical%20locations%20within%20a%20region.%20Each%20zone%20is%20made%20up%20of%20one%20or%20more%20datacenters%20equipped%20with%20independent%20power%2C%20cooling%2C%20and%20networking.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EVirtual%20Networks%20(when%20created)%20span%20the%20entire%20region.%20In%20other%20words%2C%20it%20is%20stretched%20to%20all%20AZs%20within%20the%20region%2C%20allowing%20you%20to%20use%20one%20address%20space%20and%20%22spread%22%20your%20Compute%20resources%20(typically%20Azure%20VMs)%20to%20multiple%20zones%2C%20but%20they%20are%20still%20connected%20to%20the%20same%20VNet.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20not%20sure%2C%20if%20this%20answers%20your%20question%2C%20but%20AZ%20is%20not%20a%20networking%20feature%2C%20it%20is%20a%20physical%20boundary%20of%20buildings%2C%20equipment%2C%20and%20hardware%2C%20helping%20you%20to%20design%20and%20build%20more%20resilient%20applications%20and%20services.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1845530%22%20slang%3D%22en-US%22%3ERe%3A%20Availability%20zone%20with%20same%20IP%20address%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1845530%22%20slang%3D%22en-US%22%3EAs%20David%20explained%20AZ%20is%20for%20high%20Availability%20seperated%20by%20a%20physical%20boundry%20within%20the%20region.%20But%20definitely%20no%202%20compute%20resources%20within%202%20AZs%20have%20the%20same%20internal%20IP.%20Because%20all%20the%20Compute%20resource%20has%20its%20own%20internal%20IP%20addresses.%20But%20you%20can%20have%20Public%20IP%20to%20be%20the%20same%20across%20VMs%20within%202%20different%20AZs.%3CBR%20%2F%3EIn%20that%20case%3A%3CBR%20%2F%3E1.%20For%20inbound%20-%20use%20Load%20Balancer%20or%20Application%20Gateway(only%20in%20layer%207)%3CBR%20%2F%3E2.%20For%20outbound%20-%20use%20NAT%20Gateway%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fvirtual-network%2Fnat-gateway-resource%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fvirtual-network%2Fnat-gateway-resource%3C%2FA%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1847118%22%20slang%3D%22en-US%22%3ERe%3A%20Availability%20zone%20with%20same%20IP%20address%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1847118%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F10907%22%20target%3D%22_blank%22%3E%40David%20Pazdera%3C%2FA%3E%26nbsp%3BHi%20David.%20Thanks%20for%20the%20explanation.%20Are%20there%20any%20chances%20that%20I%20can%20provision%202%20new%20VM%20within%20AZ%20with%20the%20same%20IP%20address%3F%20I%20have%20this%20question%20coming%20because%20based%20on%20my%20testing%2C%20the%20only%20configuration%20that%20I%20can%20configure%20the%20AZ%20to%201%20or%202%20or%203%20zones%20which%20I%20can't%20technically%20configure%20to%20edit%20the%20IP%20address.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20only%20my%20understanding%20now%20is%20when%20I%20spawn%20a%20new%20VM%20in%20one%20region%2C%20I%20can%20select%20how%20many%20AZ%20(1%2C%202%20or%203).%20My%20objective%20is%20simple%2C%20I%20have%20one%20application%20where%20I%20want%20to%20make%20it%20redundant%20for%20HA.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETraditionally%2C%20for%20HA%2C%20I%20need%20to%20spawn%202%20VMs%20with%20a%20different%20IP%20address%20in%20the%20separate%20data%20centre%20and%20configure%20it%20for%20HA.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Hi,

Can Azure support in a different availability zone with a same IP address?


Thanks.

5 Replies

Hi @ariffisariff,

 

Availability Zone (AZ) in Azure is a construct that allows for high availability design. AZs are unique physical locations within a region. Each zone is made up of one or more datacenters equipped with independent power, cooling, and networking.

 

Virtual Networks (when created) span the entire region. In other words, it is stretched to all AZs within the region, allowing you to use one address space and "spread" your Compute resources (typically Azure VMs) to multiple zones, but they are still connected to the same VNet.

 

I am not sure, if this answers your question, but AZ is not a networking feature, it is a physical boundary of buildings, equipment, and hardware, helping you to design and build more resilient applications and services.

As David explained AZ is for high Availability seperated by a physical boundry within the region. But definitely no 2 compute resources within 2 AZs have the same internal IP. Because all the Compute resource has its own internal IP addresses. But you can have Public IP to be the same across VMs within 2 different AZs.
In that case:
1. For inbound - use Load Balancer or Application Gateway(only in layer 7)
2. For outbound - use NAT Gateway
https://docs.microsoft.com/en-us/azure/virtual-network/nat-gateway-resource

@David Pazdera Hi David. Thanks for the explanation. Are there any chances that I can provision 2 new VM within AZ with the same IP address? I have this question coming because based on my testing, the only configuration that I can configure the AZ to 1 or 2 or 3 zones which I can't technically configure to edit the IP address.

 

The only my understanding now is when I spawn a new VM in one region, I can select how many AZ (1, 2 or 3). My objective is simple, I have one application where I want to make it redundant for HA. 

 

Traditionally, for HA, I need to spawn 2 VMs with a different IP address in the separate data centre and configure it for HA. 

@David Pazdera Hi David. Thanks for the explanation. Are there any chances that I can provision 2 new VM within AZ with the same IP address? I have this question coming because based on my testing, the only configuration that I can configure the AZ to 1 or 2 or 3 zones which I can't technically configure to edit the IP address.

 

The only my understanding now is when I spawn a new VM in one region, I can select how many AZ (1, 2 or 3). My objective is simple, I have one application where I want to make it redundant for HA. 

 

Traditionally, for HA, I need to spawn 2 VMs with a different IP address in the separate data centre and configure it for HA. 

Hi @ariffisariff ,

 

If your goal is to make your application redundant, then using availability zones (or availability sets) is the right approach, but instead of trying to assign the same IP address to both machines (which is not technically possible, if they both are in the same VNet), you would typically have a load balancer (could be for example an Azure Load Balancer or Application Gateway) with a 'virtual IP address' (also referred to as 'fronted IP') and configure your clients to communicate with the VIP, rather than internal IPs of your VMs. Then you can configure your load balancer to distribute network traffic to your VMs (backend pool) based on rules and health of your backend pool (using probes).

 

Check this overview to learn more: https://docs.microsoft.com/en-us/azure/load-balancer/load-balancer-overview

 

This guide explains how to distribute traffic to VMs in different zones: https://docs.microsoft.com/en-us/azure/load-balancer/tutorial-load-balancer-standard-public-zone-red...