← Back to Articles         
Azure Networking: IPv4, Subnetting and CIDR Guide

Azure Networking: IPv4, Subnetting and CIDR Guide

Published on 16 Oct 2026 26 min read Microsoft AZURE
Azure Networking
 

Azure Networking Fundamentals: IP Addresses, IPv4, Subnetting, CIDR and IP Address Classes — Complete Guide

Azure Networking | Beginner to Intermediate | AZ-900 & AZ-104 | Networking Fundamentals

What You'll Learn

In this article, we'll explore the networking concepts you need before configuring Azure Virtual Networks (VNets), subnets, Network Security Groups (NSGs), and virtual machines.

By the end of this guide, you'll understand:

  1. What an IP address is and how devices communicate over networks.

  2. IPv4 and IPv6 addressing, including their differences.

  3. Binary numbers, bits, bytes, and octets.

  4. How IPv4 addresses are represented using 32 bits.

  5. Public IP addresses, private IP addresses, and NAT.

  6. Private IPv4 address ranges defined by RFC 1918.

  7. IP address classes A, B, C, D, and E.

  8. CIDR notation and subnet masks.

  9. How to calculate network addresses, broadcast addresses, and usable host addresses.

  10. How to divide a large network into smaller subnets.

  11. How Azure reserves IP addresses within each subnet.

  12. How to calculate IP ranges using online subnet calculators.

  13. How Azure VNets use address spaces and subnets.

  14. Common subnetting mistakes and networking best practices.

  15. Important Azure networking interview questions and answers.

 
 

Azure Networking Fundamentals – IP Addresses, Binary, Public & Private IP, IP Classes, and CIDR

I'll explain your attached content in the same order as the original, using simple English, everyday examples, calculations, and plain-text diagrams. The goal is to understand the concepts even without prior networking knowledge.

What You'll Learn

By the end of this lesson, you will understand:

  1. What an IP address is and why devices need one.

  2. What bits, bytes, binary numbers, and octets are.

  3. How an IPv4 address contains 32 bits.

  4. The difference between public and private IP addresses.

  5. How private devices access the internet using NAT.

  6. What IP address classes A, B, C, D, and E are.

  7. What CIDR notation means and why it is important.

  8. How to calculate IP address ranges and subnet sizes.

  9. How to check IP addresses and subnet calculations in Azure Portal.

Before we begin: This lesson is conceptual. You don't need to create any Azure resources or spend money. The Azure Portal exercises are only for observation.

 

Part 1 – What Is an IP Address?

1.1 What is an IP address?

An IP address (Internet Protocol address) is a numerical address used to identify and communicate with a device on a network.

Think about your home address.

Suppose someone wants to send a courier to your house. The courier company needs your address to deliver the parcel.

Similarly, when one computer wants to send information to another computer, it needs an IP address to identify where to send that information.

Real-life example

Imagine you have three devices connected to your home Wi-Fi.

              Home Wi-Fi Router
                      |
          +-----------+-----------+
          |           |           |
          v           v           v
        Laptop      Mobile      Smart TV
          |           |           |
     192.168.1.2 192.168.1.3 192.168.1.4

Each device has its own IP address within the home network.

For example:

  • Laptop: 192.168.1.2

  • Mobile: 192.168.1.3

  • Smart TV: 192.168.1.4

When the router receives data intended for your laptop, it uses the destination IP address to help deliver that data to the correct device.

Key point: An IP address works like a postal address for network communication.

1.2 What is IPv4?

There are two major versions of IP addressing:

  • IPv4 – Internet Protocol version 4.

  • IPv6 – Internet Protocol version 6.

IPv4 is the focus of this lesson because it is widely used in Azure networking.

An IPv4 address looks like:

10.0.1.5

It contains four numbers separated by dots.

       10  .  0  .  1  .  5
        |     |     |     |
        v     v     v     v
      Part1 Part2 Part3 Part4

Each part can contain a number between 0 and 255.

For example:

IP address

Valid?

Reason

10.0.1.5

Yes

All four numbers are valid

192.168.1.10

Yes

All numbers are between 0 and 255

10.0.1.300

No

300 is greater than 255

192.168.1

No

Only three parts

172.16.0.100

Yes

Valid IPv4 format

This representation is called dotted decimal notation.

Why only 0 to 255?

Because each part of an IPv4 address contains 8 binary bits.

Let's understand that next.

 

Part 2 – Bits, Bytes and Binary

2.1 What is a bit?

A bit is the smallest unit of information used by computers.

A bit can contain only two values:

0 = OFF
1 = ON

Think about an electrical switch.

Switch OFF  = 0
Switch ON   = 1

Computers represent information using combinations of these two values.

This number system is called binary.

2.2 What is a byte?

A byte contains 8 bits.

Example:

1 bit:

1

8 bits = 1 byte:

1 0 1 0 0 1 1 0

In IP addressing, a byte is also called an octet.

Therefore:

1 Bit    = 0 or 1

8 Bits   = 1 Byte

1 Byte   = 1 Octet

2.3 Understanding binary numbers

We normally use decimal numbers.

The decimal number system uses digits from 0 to 9.

Computers use binary numbers, containing only 0 and 1.

Each bit position has a particular value.

Bit position

7

6

5

4

3

2

1

0

Value

128

64

32

16

8

4

2

1

These values are powers of 2.

Example: Convert binary 00001010 to decimal

Value:   128  64  32  16   8   4   2   1
Binary:    0   0   0   0   1   0   1   0
                            |       |
                            8   +   2

Result = 10

We add only the values whose corresponding binary bit is 1.

Therefore:

Binary:  00001010
Decimal: 10

Another example:

Binary:  00000101

Values:  4 + 1

Decimal: 5

2.4 Why is the maximum value 255?

One byte contains 8 bits.

Each bit has two possibilities: 0 or 1.

Therefore:

\[ 2^8 = 256 \]

This means one byte can represent 256 different numbers.

Since counting starts from zero:

Minimum value = 0
Maximum value = 255

Total values  = 256

The maximum binary value is:

Binary: 11111111

128 + 64 + 32 + 16 + 8 + 4 + 2 + 1

= 255

That is why each part of an IPv4 address must be between 0 and 255.

2.5 Why is IPv4 called a 32-bit address?

IPv4 contains four octets.

Each octet contains 8 bits.

Therefore:

\[ 4 \times 8 = 32\text{ bits} \]

Let's use the address 10.0.1.5.

Decimal

Binary

10

00001010

0

00000000

1

00000001

5

00000101

The complete binary representation is:

IPv4 Address:

10       .0        .1        .5

Binary:

00001010.00000000.00000001.00000101

   8 bits   8 bits   8 bits   8 bits

              Total = 32 bits

Computers and networking equipment process IP addresses as binary values. We use dotted decimal notation because it is easier to read.

Key points:

  • IPv4 contains 32 bits.

  • IPv4 contains four octets.

  • Each octet contains 8 bits.

  • Each octet can represent values from 0 to 255.

 

Part 3 – Public IP vs Private IP

There are two important categories of IPv4 addresses used in networking:

  1. Public IP addresses.

  2. Private IP addresses.

3.1 What is a public IP address?

A public IP address is an address used for communication over the public internet.

Public IP addresses are globally unique within their applicable allocation and routing scope.

Real-life example

Suppose you create a website on an Azure Virtual Machine.

The VM might have a public IP address such as:

20.84.10.25

A user on the internet can connect to that address, provided the necessary networking and security rules allow access.

          User's Laptop
                |
                |
             Internet
                |
                v
       Public IP Address
          20.84.10.25
                |
                v
          Azure VM
          Web Server

Public IP addresses are useful for:

  • Public websites.

  • Public-facing APIs.

  • VPN endpoints.

  • Remote access to Azure VMs.

Important: A web application doesn't necessarily need its own public IP. It can also be accessed through another public-facing service, such as a load balancer.

3.2 What is a private IP address?

A private IP address is used for communication inside a private network.

Private IP addresses are not directly routable over the public internet.

Real-life example

Your laptop may have:

192.168.1.10

Your mobile may have:

192.168.1.11

These addresses are used within your home network.

Another person in a different city could also have a laptop using 192.168.1.10.

This is allowed because the devices belong to separate private networks.

        House A                    House B
           |                          |
        Router                     Router
           |                          |
        Laptop                     Laptop
           |                          |
     192.168.1.10               192.168.1.10

        Same IP address
        Different networks
        No direct conflict

3.3 Three reserved private IP ranges

There are three private IPv4 address ranges defined by RFC 1918.

Private IP range

CIDR

Total addresses

10.0.0.0 – 10.255.255.255

10.0.0.0/8

16,777,216

172.16.0.0 – 172.31.255.255

172.16.0.0/12

1,048,576

192.168.0.0 – 192.168.255.255

192.168.0.0/16

65,536

Examples

10.0.0.5 – Private IP.

172.20.1.10 – Private IP.

192.168.1.100 – Private IP.

172.32.1.10 – Not within the reserved private ranges.

In Azure, the 10.0.0.0/16 address space is a common choice for a Virtual Network (VNet).

A VNet is a private network you create in Azure to connect resources such as VMs.

3.4 What is NAT (Network Address Translation)?

Now consider an important question.

Your laptop has a private IP address:

192.168.1.50

Private IP addresses cannot be routed directly over the public internet.

Then how can your laptop access Google, YouTube, or other websites?

The answer is NAT – Network Address Translation.

Simple explanation

Your home router has access to a public IP address.

When your laptop sends a request to the internet, the router translates the laptop's private source IP into a public IP for internet communication.

When the response returns, the router uses its translation information to send it back to the correct device.

        Your Laptop
        192.168.1.50
        (Private IP)
              |
              | Request to website
              v
         Home Router
         NAT Process
              |
              | Private IP translated
              | to Public IP
              v
          Internet
              |
              v
          Web Server
          20.50.1.10
              |
              | Response
              v
          Home Router
          NAT Process
              |
              v
         Your Laptop
         192.168.1.50

Your laptop does not need its own public IP address to browse the internet.

How does this work in Azure?

The same basic concept applies to Azure networking.

            Azure VNet
          10.0.0.0/16
                |
                v
             Azure VM
            10.0.0.4
            Private IP
                |
                v
          NAT / Public
          Egress Service
                |
                v
             Internet

The attached lesson describes outbound internet access as available without additional configuration. In current Azure networking, however, you should explicitly plan the outbound method, such as a NAT Gateway, rather than assume every private VM automatically has internet access.

A public IP is a separate Azure resource, not an address allocated from the VNet's private address space.

3.5 Hands-on: View public and private IPs in Azure

If you already have an Azure VM, you can view both IP addresses.

  1. Open the Azure Portal.

  2. Search for Virtual machines.

  3. Select your VM, such as ubuntu-demo-vm01.

  4. Open the Overview page.

  5. Look for Public IP address and Private IP address.

  6. Open Networking to see the attached network interface.

Example:

Property

Example

Purpose

Public IP

20.84.10.25

Access through the internet

Private IP

10.0.0.4

Communication within the private Azure network

The public IP can be used to SSH into a Linux VM when access is configured and permitted.

The private IP is used for communication within the VNet and connected networks.

 

Part 4 – IP Address Classes (A, B, C, D, E)

4.1 What are IP address classes?

In the early days of the internet, IPv4 addresses were divided into fixed categories called classes.

This system was known as classful addressing.

The five classes were:

Class

First octet

Default mask

Prefix

Purpose

A

1–126

255.0.0.0

/8

Very large networks

B

128–191

255.255.0.0

/16

Medium networks

C

192–223

255.255.255.0

/24

Small networks

D

224–239

—

—

Multicast

E

240–255

—

—

Reserved / experimental

Class A example

10.0.0.0

Default Mask:
255.0.0.0

Prefix:
/8

Class A networks were designed to accommodate very large numbers of addresses.

Class B example

172.16.0.0

Default Mask:
255.255.0.0

Prefix:
/16

Class B networks supported medium-sized address allocations.

Class C example

192.168.1.0

Default Mask:
255.255.255.0

Prefix:
/24

A traditional Class C-sized network contains 256 total addresses, typically 254 usable host addresses.

Class D and E

Class D is used for multicast addressing.

Multicast means sending information to a selected group of receivers.

Class E is reserved for experimental or special purposes.

What about 127.0.0.1?

The range 127.0.0.0/8 is reserved for loopback.

A commonly used address is:

127.0.0.1

This is called localhost.

It represents your own computer.

For example, when running an ASP.NET Core application locally, you might access it using:

http://localhost:5000

The communication remains on your own machine.

4.2 Why was classful addressing a problem?

Imagine a company needs 300 IP addresses.

A Class C network was too small because it offered only 254 usable host addresses.

The next available class was Class B, which contained 65,536 total addresses.

Company requirement:

300 IP addresses

Class C:
254 usable hosts
Not enough

Class B:
65,536 total addresses
Far more than required

A large number of addresses would remain unused.

This caused inefficient allocation of IPv4 addresses.

To solve this problem, CIDR was introduced in 1993.

4.3 Are IP classes still used today?

Modern Azure networking uses CIDR rather than classful addressing.

However, engineers still sometimes refer informally to Class A, B, and C-sized networks.

Learning the classes helps you understand the historical background of private IP ranges and subnet masks.

 

Part 5 – CIDR (Classless Inter-Domain Routing)

This is one of the most important networking concepts in Azure.

5.1 What is CIDR?

CIDR stands for Classless Inter-Domain Routing.

It allows us to divide IP address space into networks of different sizes.

Instead of being restricted to old Class A, B, or C allocations, we can select an address range appropriate for our needs.

Example:

10.0.1.0/24

Here:

  • 10.0.1.0 represents the network address.

  • /24 is the prefix length.

  • The prefix tells us how many bits belong to the network portion.

5.2 Understanding /24

Remember that IPv4 contains 32 bits.

When we write /24, it means:

Total IPv4 bits = 32

Network bits    = 24
Host bits       = 8

Diagram:

          IPv4 Address (32 bits)
                     |
         +-----------+-----------+
         |                       |
         v                       v
     Network Bits             Host Bits
        24 Bits                 8 Bits

   11111111.11111111.11111111.00000000
   |________________________| |______|
           Network             Hosts

The first 24 bits identify the network.

The remaining 8 bits allow addresses within that network.

5.3 What is a subnet mask?

A subnet mask identifies which bits belong to the network and which bits belong to the host portion.

For /24, the subnet mask is:

Binary:

11111111.11111111.11111111.00000000

Decimal:

255.255.255.0

Therefore:

10.0.1.0/24

is equivalent to

Network: 10.0.1.0
Mask:    255.255.255.0

They express the same network boundary information.

Common subnet masks

CIDR

Subnet mask

/8

255.0.0.0

/16

255.255.0.0

/20

255.255.240.0

/24

255.255.255.0

/26

255.255.255.192

/28

255.255.255.240

/29

255.255.255.248

/30

255.255.255.252

/32

255.255.255.255

5.4 How to calculate the number of IP addresses

The formula is:

\[ \text{Total IP addresses} = 2^{(32-\text{CIDR prefix})} \]

Example 1: /24

CIDR = /24

32 - 24 = 8

2^8 = 256

Total IP addresses = 256.

Example 2: /16

CIDR = /16

32 - 16 = 16

2^16 = 65,536

Total IP addresses = 65,536.

Example 3: /28

CIDR = /28

32 - 28 = 4

2^4 = 16

Total IP addresses = 16.

5.5 CIDR reference table

CIDR

Host bits

Total IP addresses

Typical use

/8

24

16,777,216

Large address block

/16

16

65,536

Azure VNet

/20

12

4,096

Large subnet

/24

8

256

Common subnet

/26

6

64

Azure Bastion subnet

/28

4

16

Small subnet

/29

3

8

Very small subnet

/30

2

4

Traditional point-to-point network

/32

0

1

Single IP address

Notice an important pattern.

/24 = 256 IP addresses
/25 = 128 IP addresses
/26 =  64 IP addresses
/27 =  32 IP addresses
/28 =  16 IP addresses
/29 =   8 IP addresses
/30 =   4 IP addresses

Every time the prefix increases by 1, the number of addresses is divided by 2.

 

Part 6 – Network Address, Broadcast Address and Usable Hosts

When we create a subnet, not every IP address can be assigned to a device.

In traditional IPv4 networking, two addresses have special purposes.

6.1 Network address

The first address identifies the network itself.

Example:

192.168.1.0/24

The network address is:

192.168.1.0

6.2 Broadcast address

The last address in a traditional IPv4 subnet is the broadcast address.

It is used to send information to all devices on that subnet.

For:

192.168.1.0/24

The broadcast address is:

192.168.1.255

6.3 Usable IP addresses

Let's examine the complete /24 range.

Network: 192.168.1.0/24

192.168.1.0
     |
     | Network Address
     |
192.168.1.1
     |
     | Usable Host Addresses
     |
192.168.1.254
     |
192.168.1.255
     |
     | Broadcast Address

The calculation is:

Total IP addresses = 256

Network address    = 1
Broadcast address  = 1

Usable hosts       = 256 - 2

                   = 254

This calculation applies to a conventional /24 IPv4 subnet.

What happens in Azure?

Azure reserves five addresses in each IPv4 subnet.

For example:

Azure Subnet: 10.0.1.0/24

Total IP addresses = 256

Azure Reserved     = 5

Available IPs      = 251

Azure reserves the first four and the last address in each subnet.

We'll cover the exact purposes of those reserved addresses in the next Azure VNet and subnet lesson.

 

Part 7 – The 256 Minus the Mask Trick

This is a useful shortcut for calculating subnet ranges without converting every address into binary.

7.1 The basic formula

Block Size = 256 - Subnet Mask Octet

Use the relevant octet where the subnet boundary occurs.

The block size tells us where the next subnet starts.

7.2 Example 1: /26

Given:

Network: 10.0.1.64/26

Subnet Mask:
255.255.255.192

Calculate:

256 - 192 = 64

Block size = 64.

Therefore, /26 blocks within 10.0.1.x start at:

10.0.1.0
10.0.1.64
10.0.1.128
10.0.1.192

Each block contains 64 addresses.

For 10.0.1.64/26:

Network Address : 10.0.1.64

First Host      : 10.0.1.65

Last Host       : 10.0.1.126

Broadcast       : 10.0.1.127

Next Network    : 10.0.1.128

In Azure, the usable IP count is 64 − 5 = 59.

7.3 Example 2: /28

Given:

Network: 10.0.1.0/28

Subnet Mask:
255.255.255.240

Calculate:

256 - 240 = 16

Block size = 16.

The subnet boundaries are:

10.0.1.0
10.0.1.16
10.0.1.32
10.0.1.48
10.0.1.64
...

For 10.0.1.0/28:

Network Address : 10.0.1.0

First Host      : 10.0.1.1

Last Host       : 10.0.1.14

Broadcast       : 10.0.1.15

Next Network    : 10.0.1.16

Traditional usable hosts = 14.

Azure available addresses = 11.

7.4 Example 3: /24

Given:

Network: 10.0.1.0/24

Subnet Mask:
255.255.255.0

Calculate:

256 - 0 = 256

The entire last octet belongs to the address range.

First Address: 10.0.1.0

Last Address:  10.0.1.255

Next Network:  10.0.2.0

Total addresses = 256.

Quick comparison

CIDR

Block size

Example range

/24

256

10.0.1.0 – 10.0.1.255

/26

64

10.0.1.64 – 10.0.1.127

/28

16

10.0.1.0 – 10.0.1.15

Key point: The shortcut makes it easier to identify subnet boundaries, especially for /24 through /30.

 

Part 8 – Hands-On: Calculate CIDR in Azure Portal

You can see Azure calculate IP address ranges automatically.

This exercise doesn't require you to create a resource.

Step 1: Open Azure Portal

Visit portal.azure.com.

Search for Virtual networks.

Step 2: Start creating a VNet

Click + Create.

Enter a resource group and VNet name to proceed through the configuration pages.

Step 3: Open the IP Addresses tab

Find the VNet address space.

For example:

10.0.0.0/16

Azure shows the total address count:

65,536 IP addresses

Step 4: Add a subnet

Select the option to add a subnet.

Try different CIDR prefix lengths.

CIDR

Total addresses shown

/24

256

/28

16

/26

64

Observe how the Azure Portal calculates the number of addresses and adjusts valid subnet boundaries.

Step 5: Cancel

Once you've finished exploring, click Cancel or leave the creation workflow without submitting it.

No resource is created, so there is nothing to clean up.

 

Final Summary – Important Concepts

Concept

Simple meaning

IP address

Address used to identify and communicate with a network device

IPv4

A 32-bit IP address

Bit

A binary digit: 0 or 1

Byte

Group of 8 bits

Octet

Another name for 8 bits in IP addressing

Public IP

Address used for communication over the public internet

Private IP

Address used inside private networks

NAT

Translates IP addresses for network communication

IP classes

Historical method of categorizing IPv4 networks

CIDR

Flexible method of defining IP address blocks

Subnet mask

Identifies network and host bits

Network address

Identifies the subnet

Broadcast address

Last address in a traditional IPv4 subnet, used for broadcasts

Azure reserved IPs

Five addresses reserved per Azure IPv4 subnet

Example: How everything connects in Azure

                    Azure Cloud
                         |
                         v
                Virtual Network (VNet)
                    10.0.0.0/16
                         |
              +----------+----------+
              |                     |
              v                     v
          Subnet A               Subnet B
        10.0.1.0/24            10.0.2.0/24
              |                     |
              v                     v
           Azure VM              Azure VM
           10.0.1.4              10.0.2.4
              |                     |
              +----------+----------+
                         |
                         v
              Outbound NAT Service
                         |
                         v
                      Internet

In this example:

  • 10.0.0.0/16 is the VNet's address space, containing 65,536 addresses.

  • 10.0.1.0/24 is one subnet containing 256 addresses.

  • 10.0.2.0/24 is another subnet containing 256 addresses.

  • Each Azure VM receives a private IP address from its subnet.

  • An appropriately configured outbound service allows private VMs to reach the internet.

The most important concepts to understand before learning Azure VNets and subnets are IPv4's 32-bit structure, public versus private IP addresses, CIDR prefix lengths, subnet masks, and how to calculate the number of IP addresses in a subnet.

These concepts form the foundation for Azure Virtual Networks, subnets, Network Security Groups, routing, and NAT Gateways.

Conclusion

Understanding IP addressing and subnetting is essential before working with Azure Virtual Networks.

IPv4, binary numbers, subnet masks, and CIDR notation form the foundation for designing reliable network architectures.

By learning how to calculate network boundaries, determine usable IP addresses, and allocate non-overlapping subnets, you can make better decisions when deploying Azure virtual machines, application servers, databases, and networking services.

The most important Azure-specific rule to remember is that Azure reserves five IPv4 addresses in every ordinary VNet subnet. Always account for these reservations when planning your network capacity.

What's Next?

Azure Virtual Network (VNet): Address Spaces, Subnets and Network Security Groups

In the next article, we'll apply these concepts by creating a VNet, dividing its address space into subnets, deploying resources, and configuring NSG rules to control network traffic.

Official References

Decimal to Binary Converter - https://www.binaryhexconverter.com/decimal-to-binary-converter

CIDR to IPv4 Conversion - https://www.ipaddressguide.com/cidr

Visual Subnet Calculator - https://www.davidc.net/sites/default/subnets/subnets.html

Azure Networking Fundamentals – Important Interview Questions & Answers

Topics Covered: IP Address, IPv4, Binary, Public & Private IP, NAT, IP Classes, CIDR, Subnet Mask, Network Address, Broadcast Address, and Azure IP Addressing.

Priority:

  • 🔴 High – Must Know

  • 🟡 Medium – Good to Know

Group 1: IP Address & IPv4 Fundamentals

1. 🔴 What is an IP address, and why is it required?

An IP (Internet Protocol) address identifies a device on a network and helps route data to the correct destination. It works like a postal address for network communication.

2. 🔴 What is IPv4, and why is it called a 32-bit address?

IPv4 is Internet Protocol version 4. It uses 32 bits divided into four octets (8 bits each), represented as 192.168.1.10.

3. 🟡 What is the difference between IPv4 and IPv6?

IPv4 uses 32-bit addresses, while IPv6 uses 128-bit addresses. IPv6 was introduced to overcome IPv4 address exhaustion.

4. 🔴 What are bits, bytes, and octets in IP addressing?

A bit represents 0 or 1. A byte contains 8 bits, and an octet is another name for 8 bits in IP addressing.

5. 🔴 Why does each IPv4 octet range from 0 to 255?

Each octet contains 8 bits, providing \(2^8 = 256\) possible values. Since counting starts at 0, the maximum value is 255.

 

Group 2: Public IP, Private IP & NAT

6. 🔴 What is the difference between a public IP and a private IP?

Public IP

Private IP

Used on the public internet

Used within private networks

Globally unique for public routing

Can be reused across different private networks

Supports internet-facing communication

Not directly routable over the internet

Example: 20.84.10.25

Example: 10.0.0.4

7. 🔴 What are the three private IPv4 address ranges?

Range

CIDR

10.0.0.0 – 10.255.255.255

/8

172.16.0.0 – 172.31.255.255

/12

192.168.0.0 – 192.168.255.255

/16

These ranges are defined by RFC 1918 and are commonly used in private networks, including Azure VNets.

8. 🔴 What is NAT, and why is it required?

NAT (Network Address Translation) translates private IP addresses into public IP addresses for internet communication. It allows multiple private devices to access the internet without requiring individual public IP addresses.

9. 🔴 Can an Azure VM access the internet without a public IP?

Yes. An Azure VM with a private IP can access the internet through an outbound connectivity solution such as Azure NAT Gateway, without having its own public IP.

10. 🔴 Can an Azure VM have both public and private IP addresses?

Yes. The private IP is used for internal VNet communication, while the public IP enables internet-facing connectivity when security rules permit it.

 

Group 3: IP Address Classes

11. 🔴 What are the five IPv4 address classes?

Class

First octet

Default CIDR

Purpose

A

1–126

/8

Large networks

B

128–191

/16

Medium networks

C

192–223

/24

Small networks

D

224–239

—

Multicast

E

240–255

—

Reserved / experimental

12. 🟡 Why was classful addressing replaced by CIDR?

Classful addressing allocated fixed-size networks, resulting in significant IP address wastage. CIDR introduced flexible network sizes to improve address utilization.

13. 🟡 What is a loopback IP address?

127.0.0.1 is a loopback address, commonly called localhost. It allows a computer to communicate with itself for testing and development.

 

Group 4: CIDR & Subnet Mask

14. 🔴 What is CIDR, and why is it used?

CIDR (Classless Inter-Domain Routing) defines IP address blocks using flexible prefix lengths such as /16, /24, and /28. It improves IP address allocation and subnet planning.

15. 🔴 What does 10.0.1.0/24 mean?

10.0.1.0 is the network address, and /24 means the first 24 bits identify the network. The remaining 8 bits provide 256 total IP addresses.

16. 🔴 What is a subnet mask, and how is it related to CIDR?

A subnet mask separates the network and host portions of an IP address. For example, /24 corresponds to 255.255.255.0.

17. 🔴 How do you calculate the number of IP addresses in a CIDR block?

Formula:

\[ \text{Total IPs}=2^{(32-\text{Prefix})} \]

Examples:

CIDR

Calculation

Total IPs

/16

2¹⁶

65,536

/24

2⁸

256

/26

2⁶

64

/28

2⁴

16

18. 🔴 What is the difference between /16, /24, and /28?

CIDR

Network bits

Host bits

Total IPs

/16

16

16

65,536

/24

24

8

256

/28

28

4

16

A larger CIDR prefix means a smaller address block.

19. 🔴 What happens when the CIDR prefix increases by one?

The number of available addresses is reduced by half. For example, /24 provides 256 addresses, /25 provides 128, and /26 provides 64.

 

Group 5: Network, Broadcast & Usable IP Addresses

20. 🔴 What are network and broadcast addresses?

The network address is the first IP in a subnet and identifies the network. The broadcast address is the last IP in a traditional IPv4 subnet and is used to communicate with all devices on that subnet.

21. 🔴 How many usable IP addresses are available in a traditional /24 subnet?

A /24 subnet contains 256 addresses. After excluding the network and broadcast addresses, 254 usable host addresses remain.

22. 🔴 How many usable IP addresses are available in an Azure /24 subnet?

Azure reserves five IP addresses per IPv4 subnet. Therefore, a /24 subnet contains 256 total addresses and 251 available addresses.

23. 🔴 How do you quickly calculate a subnet's address range?

Use the formula 256 − subnet mask octet to determine the block size.

Example: /26 has mask 255.255.255.192.

256 - 192 = 64

Subnet ranges:
10.0.1.0   - 10.0.1.63
10.0.1.64  - 10.0.1.127
10.0.1.128 - 10.0.1.191
10.0.1.192 - 10.0.1.255
 

Group 6: Azure Networking – Scenario-Based Questions

24. 🔴 You created an Azure VNet with 10.0.0.0/16. How many IP addresses does it contain?

A /16 address block contains 65,536 total IP addresses. This address space can be divided into smaller subnets for different Azure resources.

25. 🔴 You created an Azure subnet with 10.0.1.0/28. How many IP addresses can Azure resources use?

A /28 subnet contains 16 total IP addresses. Azure reserves five, leaving 11 available IP addresses.

26. 🔴 An Azure VM has a private IP of 10.0.0.4 but no public IP. Can you connect to it directly from the internet?

No. Private IP addresses are not directly routable over the public internet. You need an appropriate connectivity solution, such as Azure Bastion, a VPN, or a configured public endpoint.

27. 🔴 Can two Azure VMs have the same private IP address?

Yes, if they are in separate, non-connected private networks. However, IP address conflicts must be avoided within the same network and across connected networks.

28. 🟡 How can you identify the public and private IP addresses of an Azure VM?

Open Azure Portal → Virtual Machines → Select VM → Overview. The page displays the VM's public IP (if assigned) and private IP address.

 

Most Important Questions for Quick Revision

Focus on these 12 high-priority questions before an Azure networking interview.

Question

Key answer

1. What is an IP address?

Identifies a network device

2. Why is IPv4 32-bit?

Four octets × 8 bits

3. Public IP vs Private IP?

Internet-facing vs internal network

4. What are private IP ranges?

10/8, 172.16/12, 192.168/16

5. What is NAT?

Translates private/public IP addresses

6. What is CIDR?

Flexible IP network allocation

7. What does /24 mean?

24 network bits, 8 host bits

8. What is a subnet mask?

Separates network and host bits

9. How do you calculate total IPs?

2^(32 − prefix)

10. How many IPs in /24?

256 total

11. How many usable IPs in Azure /24?

251

12. How do you calculate subnet ranges?

256 − mask octet

These questions cover the most important concepts from your attached article and are suitable for Azure Fundamentals, AZ-104 preparation, and Azure networking interview revision.

Tags: Azure Networking, IP Addressing, IPv4, IPv6, Public IP, Private IP, IP Address Classes, CIDR, Subnetting, Subnet Mask, VLSM, NAT, Azure Virtual Network, Azure Subnets, Azure IP Address Planning, Subnet Calculator, Azure Interview Questions, AZ-900, AZ-104

← Back to Articles