Understanding Subnetting

2023-11-13
2 min read

Introduction to Subnetting

Subnetting is a fundamental concept in network design that allows administrators to segment larger networks into more manageable, smaller subnetworks.

The process of subnetting is based on manipulating the subnet mask, a 32-bit number that helps identify the network and host portions of an IP address. Understanding how to calculate network addresses within a given subnet is foundational to designing networks that are both scalable and secure.

In this short post, we’ll explore how to calculate a network address using a subnet mask, a crucial skill for network professionals.

Calculating the Network Address

Understanding how to calculate the network address is essential for effective network management and planning. This section will guide you through the process step by step, using an example to illustrate the key concepts.

Understanding IP Address and Subnet Mask

Before diving into calculations, it’s crucial to understand the components of an IP address and subnet mask. An IP address consists of 32 bits, typically represented in four octets separated by periods (e.g., 213.214.215.99).

A subnet mask, such as /29, indicates how many bits are used for the network portion of the address.

Example: Calculating the Network Address

Let’s use the IP address 213.214.215.99/29 as our example to calculate the network address.

  1. Determine the Subnet Mask: The /29 notation means that the first 29 bits of the IP address are used for the network part. In binary, this would translate to a subnet mask of 255.255.255.248, where the first 29 bits are 1s and the remaining 3 bits are 0s.

  2. Convert IP Address to Binary: Convert each octet of the IP address into binary. For example, 213.214.215.99 would be converted to:

    11010101.11010110.11010111.01100011

  3. Apply the Subnet Mask: Perform a bitwise AND operation between the binary form of the IP address and the subnet mask to get the network address:

IP Address: 11010101.11010110.11010111.01100011
Subnet Mask: 11111111.11111111.11111111.11111000
---
Network Addr: 11010101.11010110.11010111.01100000
  1. Convert Back to Decimal: Convert the binary network address back to decimal format, which gives you 213.214.215.96. Therefore, the network address for 213.214.215.99/29 is 213.214.215.96/29.

Key Considerations

  1. Subnet Size: The /29 in the IP address indicates that there are 8 IPs in this subnet 2(3229)=23=82^{(32-29)} = 2^3 = 8 including the network address, broadcast address, and usable IP addresses.

  2. Network and Broadcast Addresses: The first address in a subnet is the network address, while the last address is used as the broadcast address. For a /29 subnet, these are reserved and not assigned to hosts.