Subnetting
Dividing a larger IP network into smaller, more manageable segments is called subnetting / think of it like cutting a big cake into precise slices so each department or group gets exactly what they need.
Why Subnet?
- Organization & Management: Separate departments (e.g. Accounting, HR, IT) each get their own address block.
- Performance: Smaller broadcast domains reduce unnecessary traffic and collisions.
- Security: Isolate sensitive systems / guest Wi‑Fi can’t talk directly to your servers.
- Scalability: Plan growth by reserving address blocks for future use.
- Efficient IP Use: Fit the right‑sized network to each group, avoiding wasted addresses.
Key Concepts
- IP Address Structure:
- 32 bits (IPv4) split into four 8‑bit “octets.”
- Written in dotted‑decimal (e.g. 192.168.10.0).
- Subnet Mask:
- Also 32 bits (dotted‑decimal or CIDR
/ notation).
- Masks off the network portion from the host portion.
- Example:
/24 mask = 255.255.255.0
/26 mask = 255.255.255.192
- CIDR Notation:
- A shorthand that shows how many bits are “1” in the mask (e.g.
192.168.1.0/26).
How to Subnet: Step by Step
- Determine Requirements
- Number of subnets needed
- Hosts per subnet (include room for growth + network/broadcast addresses).
- Choose a Subnet Mask
- Borrow bits from the host portion to create enough subnets.
- Formula:
- Subnets = 2ⁿ (n = bits borrowed)
- Hosts per subnet = 2^(host bits) – 2
- Calculate Subnet Increments
- The increment = 256 – (last octet of mask).
- Example
/26: 256 – 192 = 64, so subnets start at .0, .64, .128, .192.
- List Subnet Ranges
- For
10.0.0.0/26:
- Subnet 1: 10.0.0.0 – 10.0.0.63 (hosts .1–.62, broadcast .63)
- Subnet 2: 10.0.0.64 – 10.0.0.127 (hosts .65–.126, broadcast .127)
- …and so on.