locked
If I have several vnets can each vnet have the same CIDR (IP range)? RRS feed

  • Question

  • If there is more than one vnets can the vnet have the same CIDR (IP range)?  Or do they have to be completely different IP ranges?  Please review the below IP ranges?,... kind of new at this.  If you can give me a example if the recommendation is different?

    Vnet_a = 10.0.0.0/16

    Subnet_a_1 = 10.0.1.0/24

    Subnet_a_2 = 10.0.1.0/24

    XXXXXXX

    Vnet_b = 10.0.1.0/16

    Subnet_b_1 = 10.0.1.0/24

    Subnet_b_2 = 10.0.1.0/24

     


    dsk

    Tuesday, October 1, 2019 2:04 PM

Answers

  • The example you gave will not work on Azure. 

    There are 2 similar concepts, and I will address each one individually:

    1) You can have VNETs with overlapping address space. You can make as many overlapping VNETS as you would like, and they can be in the same subscription and the same region. 

    It is usually recommended not to because if you need the 2 VNETs to communicate via VNET Peering or S2S VPN, they cannot have overlapping address space. If the 2 VNETs will never need to interact in that way, they can have overlapping address space without an issue. 

    2) Subnets cannot have overlapping address space within the VNET. In the example you gave above, both Subnets in both VNETs have the same address range - 10.0.1.0/24. 

    A better way to design the address range in a VNET:

    Vnet_A: 10.0.0.0/16   (10.0.0.0 - 10.0.255.255)

    Subnet_a_1: 10.0.0.0/24  (10.0.0.0 - 10.0.0.255)

    Subnet_a_2: 10.0.1.0/24  (10.0.1.0 - 10.0.1.255)

    If VNET B needs to communicate with A at some point, we need to not have overlapping addresses. 

    Vnet_B: 10.1.0.0/16  (10.1.0.0 - 10.1.255.255)

    Subnet_b_1: 10.1.0.0/24  (10.1.0.0 - 10.1.0.255)

    Subnet_b_2: 10.1.1.0/24  (10.1.1.0 - 10.1.1.255)

    Please let me know if you have any additional questions. 

    Tuesday, October 1, 2019 8:50 PM

All replies

  • Yes, you can have same address space in different vNets.

    But i can not recommend this a best practices 

    Address block size totally depend on your requirement as general users cases you can use 24 or 23 address block.

    Here is best practices, consider DR site block as well 

    PRD CIDR   |

    10.172.0.0/23

    10.172.2.0/24

    10.172.3.0/24

    10.172.4.0/24

    10.172.5.0/24

    10.172.6.0/24

    DR CIDR 

    10.173.0.0/23

    10.173.2.0/24

    10.173.3.0/24

    10.173.4.0/24

    10.173.5.0/24

    10.173.6.0/24       

     

    Microsoft TechNet Forum Bandara

    Tuesday, October 1, 2019 4:17 PM
  • The example you gave will not work on Azure. 

    There are 2 similar concepts, and I will address each one individually:

    1) You can have VNETs with overlapping address space. You can make as many overlapping VNETS as you would like, and they can be in the same subscription and the same region. 

    It is usually recommended not to because if you need the 2 VNETs to communicate via VNET Peering or S2S VPN, they cannot have overlapping address space. If the 2 VNETs will never need to interact in that way, they can have overlapping address space without an issue. 

    2) Subnets cannot have overlapping address space within the VNET. In the example you gave above, both Subnets in both VNETs have the same address range - 10.0.1.0/24. 

    A better way to design the address range in a VNET:

    Vnet_A: 10.0.0.0/16   (10.0.0.0 - 10.0.255.255)

    Subnet_a_1: 10.0.0.0/24  (10.0.0.0 - 10.0.0.255)

    Subnet_a_2: 10.0.1.0/24  (10.0.1.0 - 10.0.1.255)

    If VNET B needs to communicate with A at some point, we need to not have overlapping addresses. 

    Vnet_B: 10.1.0.0/16  (10.1.0.0 - 10.1.255.255)

    Subnet_b_1: 10.1.0.0/24  (10.1.0.0 - 10.1.0.255)

    Subnet_b_2: 10.1.1.0/24  (10.1.1.0 - 10.1.1.255)

    Please let me know if you have any additional questions. 

    Tuesday, October 1, 2019 8:50 PM