What should be the first IP of the Virtual machine for a given subnet range?

Rajesh Swarnkar 851 Reputation points
2023-04-25T12:35:54.0533333+00:00

Hi I have a subnet in which I need to deploy a VM (through Terraform Code). But I am not sure what should be the fisrt IP address of the VM in the given subnet as mentioned below:

  • Subnet CIDR: 10.201.49.0/26
  • IP of VM: 10.201.49.1 I believe the below IPs should be reserved but please clarify:
  • 10.201.49.0, 10.201.49.1, 10.201.49.2, 10.201.49.3 and 10.201.49.63
    User's image
Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,585 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Luca Lionetti 3,136 Reputation points
    2023-04-25T12:57:19.8+00:00

    HI @Rajesh Swarnkar Yes. Azure reserves the first four and last IP address for a total of 5 IP addresses within each subnet. For example, the IP address range of 192.168.1.0/24 has the following reserved addresses:

    • 192.168.1.0 : Network address
    • 192.168.1.1 : Reserved by Azure for the default gateway
    • 192.168.1.2, 192.168.1.3 : Reserved by Azure to map the Azure DNS IPs to the VNet space
    • 192.168.1.255 : Network broadcast address.

    So in your case with subnet 10.201.49.0/26, those are the ip reserved: 10.201.49.0 Network address 10.201.49.1 Reserved by Azure for the default gateway 10.201.49.2-10.201.49.3 Reserved by Azure to map the Azure DNS IPs to the VNet space 10.201.49.63 Network broadcast address. Hope this helps Cheers Luca

    0 comments No comments