0
0
Computer Networksknowledge~6 mins

Subnetting and subnet masks in Computer Networks - Full Explanation

Choose your learning style9 modes available
Introduction
Imagine you have a large neighborhood but want to organize it into smaller blocks so mail delivery and services are easier and faster. Computers in a network face a similar challenge when they need to communicate efficiently. Subnetting and subnet masks help divide a big network into smaller, manageable parts.
Explanation
Subnetting
Subnetting is the process of dividing a large network into smaller networks called subnets. This helps organize devices, improve security, and reduce traffic congestion by limiting communication within each subnet. It allows network administrators to control and manage network resources better.
Subnetting breaks a big network into smaller, easier-to-manage parts.
Subnet Mask
A subnet mask is a special number that shows which part of an IP address is the network and which part is the device (host). It looks like an IP address but helps computers understand the boundaries of each subnet. The mask uses ones and zeros to separate the network portion from the host portion.
A subnet mask tells devices which part of an IP address is the network and which is the host.
How Subnet Masks Work
Subnet masks use binary numbers where ones (1) represent the network part and zeros (0) represent the host part. When a device compares its IP address with the subnet mask, it knows which devices are in the same subnet and which are outside. This helps in routing data efficiently.
Subnet masks use binary to define network and host parts of an IP address.
Benefits of Subnetting
Subnetting improves network performance by reducing unnecessary traffic between devices. It also enhances security by isolating groups of devices. Additionally, it helps in better use of IP addresses by preventing waste in large networks.
Subnetting makes networks faster, safer, and uses IP addresses more efficiently.
Real World Analogy

Think of a large city divided into neighborhoods. Each neighborhood has its own streets and houses, making it easier for mail carriers to deliver letters without confusion. The city map acts like a subnet mask, showing which streets belong to which neighborhood.

Subnetting → Dividing a city into smaller neighborhoods
Subnet Mask → A city map that shows neighborhood boundaries
How Subnet Masks Work → Using the city map to know which houses belong to which neighborhood
Benefits of Subnetting → Faster mail delivery and safer neighborhoods
Diagram
Diagram
┌───────────────┐
│ Large Network │
└──────┬────────┘
       │ Divided into
       ▼ subnets
┌───────────┐  ┌───────────┐  ┌───────────┐
│ Subnet 1  │  │ Subnet 2  │  │ Subnet 3  │
│ 192.168.1 │  │ 192.168.2 │  │ 192.168.3 │
│ Mask:     │  │ Mask:     │  │ Mask:     │
│ 255.255.255.0255.255.255.0255.255.255.0 │
└───────────┘  └───────────┘  └───────────┘
This diagram shows a large network divided into smaller subnets, each with its own subnet mask.
Key Facts
SubnettingThe process of dividing a large network into smaller subnetworks.
Subnet MaskA number that separates the network part and host part of an IP address.
Network PortionThe part of an IP address that identifies the specific network.
Host PortionThe part of an IP address that identifies a device within a network.
CIDR NotationA shorthand way to write subnet masks using a slash and number, like /24.
Common Confusions
Believing subnet masks are IP addresses assigned to devices.
Believing subnet masks are IP addresses assigned to devices. Subnet masks are not device addresses; they are used to identify network boundaries within IP addresses.
Thinking subnetting changes the IP address of devices.
Thinking subnetting changes the IP address of devices. Subnetting divides the network but does not change the individual device IP addresses themselves.
Assuming all subnet masks are 255.255.255.0.
Assuming all subnet masks are 255.255.255.0. Subnet masks can vary to create different subnet sizes; 255.255.255.0 is just a common example.
Summary
Subnetting splits a large network into smaller parts to improve management and performance.
Subnet masks help devices know which part of an IP address is the network and which is the device.
Using subnetting and subnet masks together makes networks faster, safer, and more efficient.