0

My existing Vnet has a default subnet: 10.0.1.0/24

And I have a VM in it with IP address: 10.0.1.8

Now I want to add a gateway subnet so that I can connect web app to it, and the web app should be able to use the VM's private IP to access it.

But when I try to add a gateway subnet, I can't specify 10.0.1.0/24 because it overlaps with the default. I can't specify 10.0.0.0/24 either because the VM is not within this range.

How do I do it, then?

huysmania
  • 1,054
  • 5
  • 11
Allen Zhang
  • 2,432
  • 2
  • 20
  • 31

1 Answers1

0

You cannot add a gateway subnet that uses the same address space (10.0.1.0/24) as VNet.

If you original subnet has a smaller address space (ie: /26, /28) then you can add a gateway subnet using that format.

If you original subnet is using the whole address space (ie: /24) then a work around will be to add a new address space to the VNet and add new subnets on that address to the VNet splitting them up correctly.

Hannel
  • 1,656
  • 3
  • 10
  • 17