Cisco

Network Engineer · 01

Network Fundamentals

Lessons in this module ▾

Network Engineer · Module 01 · Addressing

Subnetting

Lesson 7 of 13

  1. 01The OSI model
  2. 02The TCP/IP model
  3. 03Encapsulation
  4. 04Frames and MAC addresses
  5. 05ARP
  6. 06IPv4 addressing
  7. 07Subnetting
  8. 08IPv6 basics
  9. 09TCP and UDP
  10. 10Network components and topologies
  11. 11WAN concepts
  12. 12Wireless principles
  13. 13Virtualization and cloud basics

One /24 gives you 254 hosts in a single broadcast domain. That's rarely what you want: sales, engineering and guests shouldn't share one flat network. Subnetting splits a network into smaller ones by moving the line between the network and host bits.

Borrowing host bits

Every bit you move from the host side to the network side doubles the number of subnets and halves the hosts in each one. Try it — drag the prefix, change the address, borrow bits:

Subnet calculator

Network — 24 bitsHost — 8 bits
Subnet mask
255.255.255.0
Network address
192.168.10.0
Broadcast
192.168.10.255
Usable hosts
254
Usable range
192.168.10.1 – 192.168.10.254

Borrow bits to create subnets

2

4 subnets · /26 · 62 usable hosts each

#NetworkUsable rangeBroadcast
1192.168.10.0/26192.168.10.1 – 192.168.10.62192.168.10.63
2192.168.10.64/26192.168.10.65 – 192.168.10.126192.168.10.127
3192.168.10.128/26192.168.10.129 – 192.168.10.190192.168.10.191
4192.168.10.192/26192.168.10.193 – 192.168.10.254192.168.10.255

Two formulas cover nearly every exam question:

  • Subnets = 2ⁿ, where n is the number of borrowed bits
  • Usable hosts per subnet = 2ʰ − 2, where h is the number of host bits left

A worked example

Your company has four departments and one network: 192.168.10.0/24.

  1. You need 4 subnets. 2² = 4, so borrow 2 bits.
  2. The new prefix is 24 + 2 = /26, mask 255.255.255.192.
  3. That leaves 6 host bits: 2⁶ − 2 = 62 hosts per department.
  4. The subnets start every 64 addresses: .0, .64, .128, .192.

Quick reference

  • /25 — mask 255.255.255.128, blocks of 128, 126 hosts
  • /26 — mask 255.255.255.192, blocks of 64, 62 hosts
  • /27 — mask 255.255.255.224, blocks of 32, 30 hosts
  • /28 — mask 255.255.255.240, blocks of 16, 14 hosts
  • /29 — mask 255.255.255.248, blocks of 8, 6 hosts
  • /30 — mask 255.255.255.252, blocks of 4, 2 hosts (classic point-to-point link)

In the lab, you'll subnet a /24 for a three-site company and configure the router interfaces in Packet Tracer.

Lab files

  • lab-subnetting

Log in to download the lab files for this lesson. Log in