Subnetting

Course Description

Subnetting is how we create two or more smaller networks (subnets) out of a single network address. Every network engineer needs it: to design an addressing plan, to read a routing table, and to pass exams like the CCNA. In this course, you’ll learn how subnetting works behind the scenes in binary, and then how to do it in decimal so you can calculate subnets quickly. We also cover CIDR, VLSM, and route summarization, and how to count in hexadecimal so you can find IPv6 prefixes and create IPv6 summaries.

Course Highlights

In this course you will learn:

  • How to convert between binary, decimal, and hexadecimal.
  • How IPv4 addresses are built, and what the class A, B, C, D, and E ranges are.
  • What subnetting is and how it works behind the scenes, in binary.
  • How to calculate network addresses, broadcast addresses, and usable hosts in decimal, the fast way.
  • How CIDR notation relates to subnet masks.
  • How to use VLSM to create subnets of different sizes without wasting addresses.
  • How to create a subnetting cheat sheet that you can write down from memory.
  • How to calculate IPv4 and IPv6 summary routes.
  • How to find the prefix of an IPv6 address.

Presented to you by instructor Rene Molenaar, CCIE #41726

Course at a glance

  • 13 lessons in 2 units.
  • Exams: covers the subnetting topics of CCNA 200-301, and the route summarization topics of CCNP ENARSI 300-410 and CCIE Enterprise Infrastructure.
  • Format: self-paced lessons with step-by-step examples in binary and decimal.
  • Last updated: October 2026.

Requirements

  • No requirements; we start with the basics of binary numbers.

Course Schedule

What is subnetting?

Subnetting is the process of dividing a network into smaller networks called subnets. An IPv4 address is 32 bits, split into a network part and a host part, and the subnet mask tells you where that split is. When you subnet, you borrow bits from the host part and use them for the network part. Every bit you borrow doubles the number of subnets, and halves the number of hosts per subnet.

Why bother? A single large network means a large broadcast domain and a lot of wasted addresses. For example, a point-to-point link between two routers only needs two IP addresses; giving it a /24 wastes 252 of them. With CIDR and VLSM, you pick the subnet size that fits each network. Subnetting also works the other way around: with route summarization, we combine multiple subnets into a single route to keep routing tables small.

Who needs subnetting? Every network engineer. You use it to design an IP addressing plan, to configure interfaces, routing protocols, and access-lists, and to troubleshoot hosts that can’t reach their default gateway. It’s also one of the topics you’ll see many questions about on the CCNA exam, so it pays to be fast at it.

Subnetting Learning Roadmap

This roadmap follows the course units. Each topic has a short explanation and links to the lessons where we cover it in detail.

IPv4 Addresses, Classes and CIDR

An IPv4 address is 32 bits, written down as four blocks of 8 bits in decimal. Originally, addresses were divided into classes: class A, B, and C for unicast, class D for multicast, and class E reserved. Classes A, B, and C each have a default subnet mask, but they wasted a lot of addresses. CIDR (Classless Inter-Domain Routing) lets us use any subnet mask, written as a prefix length like /24.

Subnetting in Binary

To understand subnetting, you need to see what happens with the bits. We start with the basics of binary numbers and then do subnetting in binary, step by step. The 1s in the subnet mask are the network part, and the 0s are the host part. In each subnet, the first address is the network address and the last one is the broadcast address, so a /24 gives you 254 usable host addresses.

Subnetting in Decimal and VLSM

Once you understand the binary, you can do subnetting in decimal by thinking in blocks: a /24 is a block of 256 addresses, which you can chop into two blocks of 128, four blocks of 64, and so on. With VLSM (Variable Length Subnet Mask), you chop it into blocks of different sizes, for example a block of 4 for a point-to-point link and a block of 64 for a LAN. A cheat sheet with the subnet masks and block sizes from /8 to /30 makes you even faster.

Route Summarization

Route summarization is subnetting in reverse: we combine multiple networks into a single summary route. To find the best summary, you look for the number of bits the networks have in common. For example, 192.168.0.0/24 up to 192.168.3.0/24 have 22 bits in common, so the summary is 192.168.0.0/22. IPv6 summarization works the same way, but with 128-bit hexadecimal addresses.

Hexadecimal and IPv6 Prefixes

MAC addresses and IPv6 addresses are written in hexadecimal, where we count from 0 to F. Each hexadecimal character represents 4 bits, which makes it easy to convert between hexadecimal and binary. That’s all you need to find an IPv6 prefix: with a /64, the first 16 hexadecimal characters are the prefix and the rest identifies the host.

Frequently Asked Questions

What is subnetting?

Subnetting is dividing a network into smaller networks called subnets. You do this by borrowing bits from the host part of the address and using them for the network part. It lets you create subnets that fit the number of hosts you need, so you don’t waste addresses. Read our introduction to subnetting.

How do you calculate subnets?

Look at the subnet mask to find the block size: a /26, for example, leaves 6 host bits, which gives blocks of 64 addresses. The network addresses are the multiples of the block size, the broadcast address is the last address of each block, and everything in between is a usable host address. Learn how to subnet in decimal.

What is a subnet mask?

A subnet mask tells a device which part of an IP address is the network part and which part is the host part. In binary, the 1s are the network bits and the 0s are the host bits. A host uses it to decide whether a destination is in its own subnet or whether it has to use the default gateway.

How many usable hosts are in a subnet?

Take 2 to the power of the number of host bits and subtract 2: one address for the network address and one for the broadcast address. A /24 has 8 host bits, so 256 addresses and 254 usable hosts. A /30 has 2 host bits, so 4 addresses and 2 usable hosts, which is enough for a point-to-point link.

What is CIDR notation?

CIDR (Classless Inter-Domain Routing) notation writes the subnet mask as the number of network bits after a slash. For example, 192.168.1.0 with subnet mask 255.255.255.0 is 192.168.1.0/24. CIDR also means we are no longer limited to the class A, B, and C networks. Learn about CIDR.

What is the difference between FLSM and VLSM?

With a fixed length subnet mask, every subnet has the same size. With VLSM (Variable Length Subnet Mask), you use different subnet masks within the same network, so each subnet fits the number of hosts it needs. That saves addresses, for example by using a /30 for point-to-point links. Learn how VLSM works.

What is route summarization?

Route summarization combines multiple networks into a single route, also called route aggregation or supernetting. Routers have smaller routing tables and advertise fewer routes. You find the summary by counting the bits that all networks have in common. Learn how to calculate summary routes.

How do you subnet IPv6?

IPv6 addresses are 128 bits, written in hexadecimal, where each character represents 4 bits. A typical LAN uses a /64 prefix: the first 64 bits identify the network and the last 64 bits identify the host. You find the prefix by keeping the prefix bits and setting the rest to zero. Learn how to find the IPv6 prefix.

Ready to master subnetting?

Get access to all 13 subnetting lessons and every other course on NetworkLessons.com.

Sign up