Subnet Design and Network Segmentation

Subnet Design and Network Segmentation

Watch the video to deepen your understanding.

Subscribe

Complete the full lesson to earn 25 points — 50 with Pro

Work through each section, then tap “Mark as Complete” on the last one.

Section 1 of 3

✦ Skip the page breaks, the wait, and see fewer ads — read each lesson on a single page with Pro

Lesson: Subnet Design and Network Segmentation

Introduction

In modern cloud and on-premises infrastructure, a "flat" network—where every device can communicate with every other device—is a significant security and performance liability. Subnetting is the process of dividing a large network into smaller, distinct sub-networks (subnets). Network Segmentation is the architectural practice of isolating these subnets to control traffic flow.

By designing effective subnets, you achieve three primary goals:

  1. Security: Restricting lateral movement for attackers.
  2. Performance: Reducing broadcast traffic and congestion.
  3. Manageability: Organizing resources based on function, environment, or sensitivity.

The Mechanics of Subnetting

Subnetting relies on the Subnet Mask (or CIDR notation), which tells a device which part of an IP address represents the network and which part represents the individual host.

Practical Example: Designing a Three-Tier Architecture

Imagine you are deploying a web application. A secure design requires three distinct segments:

  • Public Tier (DMZ): Contains Load Balancers and Web Servers.
  • Application Tier: Contains the business logic servers.
  • Data Tier: Contains databases.

If we have the network range 10.0.0.0/16, we can divide it as follows:

Tier Subnet Range CIDR Purpose
Public 10.0.1.0/24 /24 Internet-facing assets
App 10.0.2.0/24 /24 Internal logic
Data 10.0.3.0/24 /24 Sensitive storage

Code Snippet: Defining Subnets (Terraform)

When deploying infrastructure as code (IaC), you define these boundaries explicitly. Below is a snippet using Terraform for an AWS VPC:

resource "aws_subnet" "public_subnet" {
  vpc_id     = aws_vpc.main.id
  cidr_block = "10.0.1.0/24"
  tags = { Name = "Public-Tier" }
}

resource "aws_subnet" "data_subnet" {
  vpc_id     = aws_vpc.main.id
  cidr_block = "10.0.3.0/24"
  tags = { Name = "Data-Tier" }
}

Section 1 of 3

Reach the last section to complete this lesson and earn points — you're on section 1 of 3.