Networking for Beginners – Tutorial 6

Subnetting Made Easy – Learn Binary, VLSM & Real-World Examples

Course: Networking for Beginners to Advanced
Lesson: 6 of 30


Introduction

Subnetting is one of the most important networking skills. It divides a large network into smaller, more manageable networks, improving performance, security, and efficient IP address usage.

Whether you're configuring a Cisco switch, router, firewall, or deploying a Hikvision CCTV system, understanding subnetting is essential.


What is Subnetting?

Subnetting is the process of dividing one large IP network into multiple smaller networks (subnets).

Why Use Subnetting?

  • Improves network performance
  • Reduces broadcast traffic
  • Enhances security
  • Organizes departments or floors
  • Conserves IP addresses

Example Without Subnetting

One Large Network

192.168.10.0/24

├── HR Department
├── Finance
├── Sales
├── IT
├── CCTV
└── Guests

All devices share the same broadcast domain.


Example With Subnetting

192.168.10.0/24

├── HR        → 192.168.10.0/26
├── Finance  → 192.168.10.64/26
├── Sales    → 192.168.10.128/27
├── IT       → 192.168.10.160/27
├── CCTV     → 192.168.10.192/27
└── Guests   → 192.168.10.224/27

Each department has its own subnet, reducing unnecessary traffic.


Understanding Binary Numbers

Computers use binary (0 and 1).

DecimalBinary
000000000
100000001
200000010
400000100
800001000
1600010000
3200100000
6401000000
12810000000

Binary Place Values

128 64 32 16 8 4 2 1

Example:

Decimal 192

128 + 64 = 192

Binary

11000000

CIDR Notation

CIDRSubnet MaskHosts
/24255.255.255.0254
/25255.255.255.128126
/26255.255.255.19262
/27255.255.255.22430
/28255.255.255.24014
/29255.255.255.2486
/30255.255.255.2522

Subnetting Example 1 (/24)

Network:

192.168.1.0/24

Network Address:

192.168.1.0

Usable Hosts:

192.168.1.1

↓

192.168.1.254

Broadcast Address:

192.168.1.255

Total Addresses:

256

Usable Hosts:

254


Subnetting Example 2 (/25)

Subnet Mask:

255.255.255.128

Subnets:

Subnet 1

Network

192.168.1.0

Hosts

192.168.1.1

↓

192.168.1.126

Broadcast

192.168.1.127

Subnet 2

Network

192.168.1.128

Hosts

192.168.1.129

↓

192.168.1.254

Broadcast

192.168.1.255

What is VLSM?

VLSM (Variable Length Subnet Mask) allows different subnet sizes within the same network.

Instead of giving every department the same number of IP addresses, VLSM lets you allocate only what each department needs.


Why Use VLSM?

Suppose your company has:

DepartmentDevices
CCTV120
IT40
HR20
Reception10

Using VLSM:

DepartmentSuggested Subnet
CCTV/25 (126 hosts)
IT/26 (62 hosts)
HR/27 (30 hosts)
Reception/28 (14 hosts)

This avoids wasting IP addresses.


Enterprise CCTV Example

A building has 9 floors, each with 30 IP cameras.

Assign each floor its own subnet:

FloorVLANNetwork
Floor 1101192.168.101.0/26
Floor 2102192.168.102.0/26
Floor 3103192.168.103.0/26
Floor 4104192.168.104.0/26
Floor 5105192.168.105.0/26
Floor 6106192.168.106.0/26
Floor 7107192.168.107.0/26
Floor 8108192.168.108.0/26
Floor 9109192.168.109.0/26

A /26 subnet provides 62 usable IP addresses, which is enough for:

  • 30 Cameras
  • PoE Switch
  • Maintenance Laptop
  • Future Expansion

Cisco VLAN Example

configure terminal

vlan 101
 name Floor_1

interface vlan 101
 ip address 192.168.101.1 255.255.255.192
 no shutdown

ip routing

end

write memory

Practical Subnetting Exercise

Question

You need a subnet for 50 devices.

Which subnet should you choose?

OptionUsable Hosts
/2730
/2662
/25126

Answer

/26 is the best choice because it supports 62 usable hosts, enough for 50 devices with room for future growth.


Common Subnetting Mistakes

  • Using duplicate IP addresses
  • Choosing a subnet that's too small
  • Incorrect subnet mask
  • Wrong default gateway
  • Overlapping subnets
  • Forgetting the broadcast address
  • Mixing devices from different VLANs without routing

Tips for Enterprise Networks

  • Use one VLAN per floor or department.
  • Reserve IP addresses for future expansion.
  • Document your IP addressing plan.
  • Assign static IP addresses to network infrastructure (switches, routers, firewalls, NVRs, and cameras).
  • Use DHCP for user devices where appropriate.

Summary

After completing this lesson, you should understand:

  • ✅ What subnetting is
  • ✅ Why subnetting is important
  • ✅ Binary basics
  • ✅ CIDR notation
  • ✅ Network, usable host, and broadcast addresses
  • ✅ VLSM (Variable Length Subnet Mask)
  • ✅ Practical subnetting examples
  • ✅ Enterprise CCTV IP planning
  • ✅ Basic Cisco VLAN configuration

Next Tutorial (Lesson 7)

DHCP, DNS, NAT & PAT Explained

In the next lesson, you'll learn:

  • What DHCP is and how it automatically assigns IP addresses
  • What DNS is and how domain names are translated into IP addresses
  • What NAT (Network Address Translation) is
  • What PAT (Port Address Translation) is
  • Static NAT vs Dynamic NAT
  • DHCP configuration on Cisco devices
  • Real-world enterprise and Hikvision CCTV networking examples

By the end of Lesson 7, you'll understand how devices obtain IP addresses, access the internet, and communicate with external networks securely.