Menu

Poland

GRANDMETRIC Sp. z o.o.
ul. Metalowa 5, 60-118 Poznań, Poland
NIP 7792433527
+48 61 271 04 43
info@grandmetric.com

UK

Grandmetric LTD
Office 584b
182-184 High Street North
London
E6 2JA
+44 20 3321 5276
info@grandmetric.com

US Region

Grandmetric LLC
Lewes DE 19958
16192 Coastal Hwy USA
EIN: 98-1615498
+1 302 691 94 10
info@grandmetric.com

  • en
  • pl
  • se
  • IP addressing and subnetting – a guide for Network Engineers

    IP addressing and subnetting – a guide for Network Engineers

    Date: 05.08.2025

    Author:


    Understanding IP addressing, network masks, and subnetting is essential for anyone working with computer networks. In this guide, we’ll cover the fundamentals of IP addresses, subnet masks, address ranges, and how to design efficient IP addressing plans.

    What is an IP address and network mask?


    Every IP device with an IP address operates inside a network segment. This segment also has its own address, called the network address. All devices with addresses that fall within this range belong to the same network. To define the range of addresses within a particular network, we need a delimiter, and this is where the network mask comes in.

    network mask how to use it

    For example, let’s take an IP address of 192.168.1.20 with a mask of 255.255.0.0.

    • Device IP: 192.168.1.20
    • Network Mask: 255.255.0.0

    Performing a logical AND between the address and the mask gives us the network address. This is an excellent example of binary notation because the AND operation works bit by bit:

    192.168.0.0.
    This means your PC lives in the 192.168.0.0 neighborhood.

    How to calculate network mask?

    In networking, the mask is an inherent part of the address. The mask can be written in full dotted-decimal format or as the number of consecutive ones starting from the left. For example, a mask of /16 means 16 ones from the left.

    network mask example

    Network mask calculation examples

    The network address is 192.168.0.0 and the mask is /16. From these, we can determine the network portion and the host portion.

    • The network portion is the part of the IP address on the left of the mask.
    • The host portion is on the right and defines the addressing space for hosts within this network.

    In our example, the host portion has 16 bits, which means 2^16 addresses. This gives 65,536 total addresses, of which 65,534 are usable.

    Another example

    network mask, network portion, host portion and addressing

    With a mask of 24 bits (/24), we have 8 bits left for the host space. This gives 2^8 = 256 potential addresses. However, not all addresses can be assigned to devices.

    How many IPs can you actually use?

    When we have a 24-bit mask, we have one octet for host space, which equals 256 addresses. The first possible address is always reserved for the network address (e.g., 10.1.1.0). The last address is reserved for broadcast, used for one-to-all communication. Therefore, the usable range is from 1 to 254.

    A quick formula to calculate usable addresses:
    Usable addresses = total addresses – 2 (network and broadcast).

    Example:

    • /24 → 8 host bits → 2⁸ = 256
    • Usable addresses = 256 - 2 = 254

    Now that we know terms like address space, network address, and network mask, we can move on to addressing planning.

    IP addressing space

    Given a topology where a router divides the network into three segments:

    • Network A has space for 256 addresses but only 3 hosts.
    • Networks B and C also have /24 masks, giving 256 addresses each.

    This is not optimal because we waste many addresses. This is where addressing optimization and usable address calculation become important.

    A quick history lesson

    Back in 1981, IP addresses were grouped into rigid classes (according to Classful networking):

    • Class A = /8
    • Class B = /16
    • Class C = /24

    Class D was reserved for multicast traffic, and Class E for special purposes. If you needed to address a private network, you had to use Class A, B, or C addresses with the specified mask.

    It worked… until it didn’t.

    In 1993, CIDR (Classless Inter-Domain Routing) and VLSM (Variable Length Subnet Mask) were introduced to make IP addressing more efficient. This allowed us to use masks other than 8, 16, and 24.

    This approach enabled greater flexibility, more efficient allocation, and less wasted IP space. With VLSM, you can set masks from /0 to /32, based on your network design.

    CIDR VLSM addressing

    Further in 1996, engineers foresaw IPv4 address exhaustion. Thanks to VLSM and CIDR, private addressing was defined for enterprise networks that did not need public IPs.

    The RFC 1918 document introduced three private blocks:

    • 10.0.0.0/8 (2^24 addresses)
    • 172.16.0.0/12 (2^20 addresses)
    • 192.168.0.0/16 (2^16 addresses)

    Since then, almost every private network uses one of these ranges.

    Planning IP addressing

    With knowledge of network masks and VLSM, we can move on to subnetting. Subnetting is crucial for planning and designing networks efficiently. It ensures optimal IP space usage, logical aggregation, easier management, and reduced waste.

    Why is IP planning important? Imagine managing three sites, each with its own prefix. If you design the network well, you can advertise a single summarized prefix instead of multiple smaller ones. This method of aggregation is called address summarization.

    But what happens when you have hundreds of sites? Poor design means advertising hundreds or even thousands of prefixes—a nightmare for administrators. Proper summarization and subnetting prevent this.

    IP address netwoek summarization

    Adressing subnets and summarization – examples

    Let’s assume that we have a company with two locations, as shown below.

    summarization and subnetting

    Both locations have two subnets

    • For hosts (200 in Location 1, 100 in Location 2)
    • For printers (20 in Location 1, 10 in Location 2)

    To be efficient and leave some room for growth for Location 1, a /24 subnet (254 usable addresses) is reasonable for 200 hosts. Large subnets are not desirable because they cause unnecessary broadcast traffic and security risks.

    Start with the company’s main prefix, such as 192.168.0.0/16. Divide it efficiently:

    • Assign /22 per site (1024 addresses)
    • Split into /24 for users and smaller subnets for printers, phones, etc.

    Always consider future growth. Even if your manager says maximum growth is 20 users next year, mergers or expansion can change things quickly. Redesigning a poorly planned network later is costly.

    Here’s where the real work begins. A good IP plan should answer:

    • How many hosts do we need per subnet?
    • How many sites do we have today?
    • How fast will we grow in 5 years?

    Example:

    • Main prefix: 192.168.0.0/16
    • Site allocation: /22 blocks for each site (1024 IPs each)
    • Within each site: split into /24 for users, printers, IP phones.

    Rule of thumb: Plan for growth. Renumbering later is painful (and expensive).

    Best practices for IP addressing

    • Leave spare space for future use.
    • Group by location and function (users, printers, management).
    • Avoid overly large subnets (broadcast storms are real!).
    • Document everything – your future self will thank you.

    Author

    Marcin Bialy

    Marcin Biały is Network and Security Architect with over 14 years of experience, with Service Provider and Enterprise networking background. He used to work for large service providers, global vendors and integration services companies as Network Architect, Leading Architect and Techincal Solution Manager positions. He designed, implemented and supported dozens large scale projects and infrastructure migrations, solved hundreds of tickets and spent hours with CLI and GUI of many flavors. Marcin is also holding industry recognizable certificates such as CCNP, CCNA, CCSI #35269, FCNSP #7207, FCNSA and more.

    Comments are closed here.
    Grandmetric