Skip to main content

Subnet in networking

In modern networks, subnets are the building blocks that define how IP space is allocated, routed, and secured. In this article you will gain a practical understanding of what a subnet is, why it matters, and how to design and verify subnets with a concrete example you can apply in real-world environments.

What is a subnet?

A subnet, or subnetwork, is a logically defined subdivision of an IP network. Subnets split a larger address space into smaller blocks to improve routing efficiency, reduce broadcast domains, and enable better security and organization. The division between the network portion and the host portion of an address is determined by a subnet mask or a CIDR prefix.

Core concepts

  • Network and host portions: An IP address is composed of a network part and a host part. The subnet mask or CIDR prefix specifies how many bits belong to the network portion.
  • Subnet mask and CIDR: A subnet mask like 255.255.255.0 or a prefix such as /24 indicates how many bits are used for the network. The remaining bits identify hosts within that network.
  • Broadcast and usable addresses: In each subnet, the lowest address is the network address and the highest address is the broadcast address. The addresses in between are usable by devices in the subnet.
  • Routing and segmentation: Subnets help route traffic more efficiently and contain broadcasts, enabling better security and scalable network design.

Subnetting in practice

Consider a common scenario: a small office with a single 192.168.1.0/24 address block and four departments that should be separated for performance and security. Subnetting lets you carve this /24 into smaller blocks that fit each department’s needs while keeping the address space organized and routable.

Concrete example

Chosen mask: /26 (255.255.255.192). This splits the /24 into four subnets, each with 64 addresses (62 usable hosts).

  • Subnet 1: 192.168.1.0/26 — usable 192.168.1.1 through 192.168.1.62; broadcast 192.168.1.63
  • Subnet 2: 192.168.1.64/26 — usable 192.168.1.65 through 192.168.1.126; broadcast 192.168.1.127
  • Subnet 3: 192.168.1.128/26 — usable 192.168.1.129 through 192.168.1.190; broadcast 192.168.1.191
  • Subnet 4: 192.168.1.192/26 — usable 192.168.1.193 through 192.168.1.254; broadcast 192.168.1.255

Why choose /26 here? It provides four subnets with a comfortable number of usable addresses per subnet. If different teams require different sizes, a more flexible approach is to use variable-length subnet masking (VLSM) to tailor each subnet to its needs while conserving space.

Step-by-step approach to subnetting

  1. Define requirements: How many subnets are needed and how many hosts must each subnet accommodate?
  2. Choose a subnet size that satisfies the largest host requirement while conserving address space.
  3. Calculate the mask and verify that the subnets do not overlap with existing networks.
  4. Document the plan and map subnets to VLANs or routing domains as appropriate.
  5. Configure devices (routers, switches, DHCP) and verify connectivity, starting with inter-subnet routing and then host reachability.

Practical considerations and pitfalls

  • Overlapping ranges: Ensure new subnets do not collide with each other or with any existing networks, VPNs, or remote sites.
  • DHCP boundaries: Align DHCP scopes with subnet boundaries to avoid assigning addresses outside the subnet.
  • Router interfaces: Each subnet typically requires a gateway. Plan to configure the appropriate router or L3 switch interfaces.
  • Broadcast and security: Smaller subnets reduce broadcast domains and aid segmentation, but managing many subnets increases administrative overhead.
  • IPv6 considerations: Subnetting uses prefix lengths rather than dotted masks. A common practice is to allocate a /64 per subnet to support automatic addressing features and predictability.

Applying subnet design in real networks

Subnet design usually goes hand in hand with VLANs and routing. For a network engineer, the workflow often looks like this: model the address plan, map subnets to VLANs, configure inter-VLAN routing, and continuously verify with monitoring and reachability tests. The objective is predictable routing, scalable growth, and clear segmentation between departments or sites.

Conclusion and next step

Subnetting is a foundational skill that enables scalable, secure, and efficient networks. Start by modeling a small block in a lab, practice calculating subnets by hand, and then validate your plan on real devices. Next step: design a simple two-subnet plan for a hypothetical office and document the network plan so you can review it with a peer or supervisor.

Comments

Popular posts from this blog

Car Wash System vb.net

This software consists of a database that save the registration number of every vehicle being wash along side with the date, type of wash made and price Screen Shot Source Code To view records in the database: Dim conn As OleDbConnection = New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\washRcd.accdb;Persist Security Info=False") Dim sql As String sql = " SELECT * FROM tblwash" conn.Open() Dim dt As New DataTable Dim cmd2 As New OleDb.OleDbDataAdapter(sql, conn) cmd2.Fill(dt) DataGridView1.DataSource = dt DataGridView1.Refresh() conn.Close() To insert new record in the database: Private Sub insert() Dim conn As OleDbConnection = New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\washRcd.accdb;Persist Security Info=False") Dim updateSql As String = String.Format(...

Face recognition using EmguCV 3.0 and typing pattern recognition

Introduction An MSc project with the title Student Examination System, where the objective is to put the students in an examination condition but instead of having an invigilator in an examination center, the system will cater for the proper ongoing of the exam. the system can be used as an online examination system The system is able to: Recognizing the face shape of a particular student Detect if there is more than one person in the examination room  Analyze the typing pattern of a student and detect if any one person is taking part in the exam voice recognition for the student and detect if there is more than one person speaking in the examination room Setup Download Emgu CV from  http://www.emgu.com/wiki/index.php/Main_Page Download Haarcascade from  https://github.com/opencv/opencv/tree/master/data/haarcascades Create an account at  https://www.keytrac.net/ Face recognition The snippet below illustrates how the Emgu CV is loaded whe...

Google reCAPTCHA implementation - ASP.NET C#, ASP.NET Web API, Android

Google reCAPTCHA implementation ASP.NET C# Steps to implement Google reCAPTCHA in your website using technologies such as ASP.NET C#, ASP.NET web API, HTML and javascript. First you need to use your google account to login to Google reCAPTCHA  to register a new site. Add a label of your choice in the label section and for web implementation select the reCAPTCHA V2 radio button. Next in the domain section you can add several domains, for testing purposes you can add localhost also followed by another domain in the next line. Accept the terms and conditions and click on the button register. After you click register, google will generate a site key and a secret key and  instructions how to integrate it on both client and server side. Create ASP.NET Web API Next step is to open Microsoft Visual Studio and create a new project by selecting File > New from the menu bar and then select Project.  Select ASP.NET Web Application(.NET Framework) in the p...