Implementing Subnets
Inside a VNet, subnets allow you to segment your IP address ranges in which to place your resources. Resources in a single subnet get an IP address from the subnet IP address range. Resources in subnets within the same VNet can talk to each other. A VNet can have one or more subnets. Traffic can be filtered between subnets via either Network Security Groups (NSGs) or UDRs. It is also important to know that Azure reserves five IP addresses within each subnet that cannot be used. The reason for this is that these IPs are reserved for the network address, the Azure default gateway, Azure DNS, and the network broadcast address. An example of this is the following.
Say there is a 10.1.1.0/24
subnet; the following addresses are reserved:
10.1.1.0
: This is reserved for the network address10.1.1.1
: This is reserved for the default gateway10.1.1.2
and10.1.1.3
: These are reserved by Azure to map DNS IPs to the VNet space10.1.1.255
: This is reserved...