×
1 Lessons
1 Lessons
2 Lessons
2 Lessons
2 Lessons
2 Lessons
1 Lessons
2 Lessons

Subnetting and IPv6

Teaches learners how to divide networks into smaller subnets and introduces IPv6 addressing.

2 Lessons
2 Lessons
2 Lessons
1 Lessons
2 Lessons
2 Lessons
2 Lessons
2 Lessons
1 Lessons
2 Lessons

Lesson: Introduction to Subnetting

Course: Computer Networking
Level: Beginner
Recommended Duration: 2–3 Hours
Font Size: 13 pt
Line Spacing: 1.5
Delivery Mode: Physical and Online Learning

1. Lesson Introduction

As computer networks grow, using one large network for every device can become difficult to manage. Subnetting provides a way of dividing a larger IP network into smaller logical networks called subnets.

Subnetting is an important IPv4 networking skill because it helps network administrators organize devices, use address space efficiently, control network traffic and create manageable network segments. A subnet mask or prefix length determines which portion of an IPv4 address represents the network and which portion represents hosts.

For example, instead of placing every department of an organization into one large network, an administrator could create separate subnets for:

  • Administration

  • Finance

  • Human Resources

  • ICT

  • Students

  • Guest users

Each subnet can then have its own network address and host range.

2. Learning Objectives

By the end of this lesson, the learner should be able to:

  1. Define subnetting.

  2. Explain why subnetting is necessary.

  3. Explain the relationship between IPv4 addresses and subnet masks.

  4. Explain network and host portions.

  5. Explain CIDR notation.

  6. Identify common subnet masks.

  7. Calculate the number of hosts available in simple subnets.

  8. Identify network and broadcast addresses.

  9. Determine a basic usable host range.

  10. Explain the advantages of subnetting.

  11. Create a simple subnetting plan.

  12. Perform basic subnetting calculations.

3. What Is Subnetting?

Subnetting is the process of dividing one IP network into smaller logical networks called subnets.

The word "subnet" means a smaller network created from a larger network.

For example:

Original network:

192.168.1.0/24

This network can be divided into smaller networks.

For example:

192.168.1.0/26
192.168.1.64/26
192.168.1.128/26
192.168.1.192/26

Instead of having one large /24 network, we now have four smaller /26 networks.

4. Why Is Subnetting Important?

Subnetting is useful because organizations rarely need every device to communicate within one huge network.

Consider a training institution with 200 computers.

The institution could create separate networks for:

  • Administration

  • Instructors

  • Students

  • ICT laboratory

  • Guest Wi-Fi

Subnetting allows these groups to be organized into separate logical networks.

5. Subnetting and IPv4

IPv4 addresses contain 32 bits.

For example:

192.168.1.10

An IPv4 address consists of:

  • Network portion

  • Host portion

Subnetting changes the boundary between these portions by borrowing bits from the host portion to create additional network portions.

6. Understanding the Subnet Mask

A subnet mask tells a device which part of an IPv4 address identifies the network and which part identifies hosts.

A common subnet mask is:

255.255.255.0

This corresponds to:

/24

For example:

192.168.1.10/24

The first 24 bits represent the network portion.

7. CIDR Notation

CIDR means Classless Inter-Domain Routing.

CIDR notation uses a slash followed by a number.

Examples:

/8
/16
/24
/25
/26
/27
/28
/29
/30

The number represents how many bits belong to the network prefix.

For example:

192.168.1.0/24

means that 24 of the 32 bits are used for the network prefix.

8. Common Subnet Masks

CIDRSubnet Mask
/8255.0.0.0
/16255.255.0.0
/24255.255.255.0
/25255.255.255.128
/26255.255.255.192
/27255.255.255.224
/28255.255.255.240
/29255.255.255.248
/30255.255.255.252

These masks are commonly encountered when learning IPv4 subnetting.

9. Network Bits and Host Bits

IPv4 contains 32 bits.

If we have:

/24

then:

Network bits = 24

Host bits:

32 − 24 = 8

Therefore, a /24 network has 8 host bits.

For a /26:

Network bits = 26

Host bits:

32 − 26 = 6

This means there are fewer host addresses per subnet than in a /24.

10. Why Borrow Host Bits?

Subnetting works by borrowing bits from the host portion.

Suppose we start with:

192.168.1.0/24

There are 8 host bits.

If we borrow 2 host bits:

24 + 2 = /26

The new prefix is:

/26

We have created additional subnets but reduced the number of hosts available in each subnet.

11. Number of Subnets

The number of subnets created can be calculated using:

2^n

where n is the number of borrowed bits.

If we borrow 1 bit:

2¹ = 2 subnets

If we borrow 2 bits:

2² = 4 subnets

If we borrow 3 bits:

2³ = 8 subnets

If we borrow 4 bits:

2⁴ = 16 subnets

12. Number of Hosts

The number of IPv4 addresses available in a subnet can be calculated using:

2^h

where h is the number of host bits.

For traditional IPv4 host addressing, two addresses are normally reserved for the network and broadcast addresses.

Therefore:

Usable hosts = 2^h − 2

For example, with /26:

32 − 26 = 6 host bits

2⁶ = 64 total addresses

64 − 2 = 62 usable host addresses

Therefore:

/26 = 64 total addresses
/26 = 62 traditionally usable host addresses

13. Example: /24 Network

Consider:

192.168.1.0/24

Host bits:

32 − 24 = 8

Total addresses:

2⁸ = 256

Traditional usable host addresses:

256 − 2 = 254

Therefore:

Network address: 192.168.1.0
Usable range: 192.168.1.1–192.168.1.254
Broadcast: 192.168.1.255

14. Example: /25

Consider:

192.168.1.0/25

Host bits:

32 − 25 = 7

Total addresses:

2⁷ = 128

Traditional usable hosts:

128 − 2 = 126

The first subnet is:

Network: 192.168.1.0
Usable hosts: 192.168.1.1–192.168.1.126
Broadcast: 192.168.1.127

The second subnet is:

Network: 192.168.1.128
Usable hosts: 192.168.1.129–192.168.1.254
Broadcast: 192.168.1.255

15. Example: /26

Consider:

192.168.1.0/26

The subnet mask is:

255.255.255.192

The block size is:

256 − 192 = 64

Therefore, the subnet boundaries occur every 64 addresses:

192.168.1.0
192.168.1.64
192.168.1.128
192.168.1.192

This creates four /26 subnets.

16. /26 Subnet Table

SubnetNetwork AddressUsable Host RangeBroadcast
1192.168.1.0.1 – .62.63
2192.168.1.64.65 – .126.127
3192.168.1.128.129 – .190.191
4192.168.1.192.193 – .254.255

Each subnet has:

64 total addresses

and traditionally:

62 usable host addresses.

17. What Is a Network Address?

The network address identifies a subnet.

For example:

192.168.1.64/26

Here:

192.168.1.64

is the network address.

It identifies the subnet and is not normally assigned to an individual host.

18. What Is a Broadcast Address?

The broadcast address is used to reach all hosts within the subnet.

For:

192.168.1.64/26

the broadcast address is:

192.168.1.127

The usable host range is therefore:

192.168.1.65–192.168.1.126

19. What Is a Usable Host Address?

A usable host address can normally be assigned to a device.

For example, in:

192.168.1.64/26

usable addresses include:

192.168.1.65
192.168.1.66
192.168.1.67
...
192.168.1.126

Devices that could use these addresses include:

  • Computers

  • Printers

  • Servers

  • IP phones

  • Access points

  • Cameras

  • Network interfaces

20. Subnetting Using the Block Size

One common beginner method is to calculate the block size.

Formula:

Block size = 256 − subnet mask value in the interesting octet

For:

255.255.255.192

Block size:

256 − 192 = 64

Therefore:

0, 64, 128, 192

are the subnet boundaries.

21. Another Example: /27

A /27 mask is:

255.255.255.224

Block size:

256 − 224 = 32

Subnet boundaries:

0
32
64
96
128
160
192
224

Therefore, a /24 network can be divided into eight /27 subnets.

Each subnet contains:

2⁵ = 32 total addresses

32 − 2 = 30 traditional usable hosts.

22. /27 Subnet Example

For:

192.168.10.0/27

Subnet 1:

Network: 192.168.10.0
Usable: 192.168.10.1–192.168.10.30
Broadcast: 192.168.10.31

Subnet 2:

Network: 192.168.10.32
Usable: 192.168.10.33–192.168.10.62
Broadcast: 192.168.10.63

Subnet 3:

Network: 192.168.10.64
Usable: 192.168.10.65–192.168.10.94
Broadcast: 192.168.10.95

The same pattern continues through the /24 address space.

23. Subnetting a Computer Laboratory

Suppose a computer laboratory has 50 computers.

A /26 subnet provides:

64 total addresses

and traditionally:

62 usable host addresses.

Therefore, a /26 network could accommodate 50 computers while leaving some addresses available for other devices such as:

  • Printer

  • Router

  • Access point

  • Network management device

Example:

Network:

192.168.20.0/26

Usable:

192.168.20.1–192.168.20.62

Broadcast:

192.168.20.63

24. Subnetting Departments

An organization could divide its network into departments.

For example:

Administration:

192.168.10.0/26

Finance:

192.168.10.64/26

ICT:

192.168.10.128/26

Human Resources:

192.168.10.192/26

This provides logical separation between departments.

25. Advantages of Subnetting

Subnetting provides several benefits:

  1. Better network organization.

  2. More efficient address allocation.

  3. Reduced broadcast domains.

  4. Easier network management.

  5. Easier troubleshooting.

  6. Improved network segmentation.

  7. Better security through logical separation.

  8. More efficient use of IPv4 addresses.

  9. Easier application of access-control policies.

  10. Improved scalability.

26. Subnetting and Security

Subnetting can help separate groups of users and devices.

For example:

Student network:

192.168.10.0/24

Administration:

192.168.20.0/24

Guest network:

192.168.30.0/24

Network administrators can then use routers, firewalls and access-control rules to control communication between these networks.

Subnetting itself is not a complete security mechanism, but it can provide useful network segmentation.

27. Subnetting and Broadcast Traffic

Broadcast traffic is sent to multiple devices within a broadcast domain.

Large networks can generate significant broadcast traffic.

Subnetting divides a large network into smaller networks, which can reduce the size of individual broadcast domains.

This can make networks easier to manage.

28. Subnetting and Routers

Routers can connect different IP subnets.

For example:

Subnet A:

192.168.10.0/24

Subnet B:

192.168.20.0/24

A router can provide communication between these networks when routing is correctly configured.

29. Subnetting and VLANs

Subnetting and VLANs are often used together.

For example:

VLAN 10 → Administration → 192.168.10.0/24

VLAN 20 → Finance → 192.168.20.0/24

VLAN 30 → Students → 192.168.30.0/24

VLANs provide Layer 2 segmentation, while IP subnets provide Layer 3 addressing boundaries.

30. Fixed-Length Subnetting

Fixed-Length Subnet Masking (FLSM) uses the same subnet size for each subnet.

For example:

192.168.1.0/24

could be divided into four /26 networks.

Each subnet has the same number of addresses.

This is simple to plan and manage.

31. Variable-Length Subnetting

Variable-Length Subnet Masking (VLSM) allows different subnet sizes to be used within the same overall network.

For example:

Administration may require 50 hosts.

Finance may require 20 hosts.

A small management network may require only 5 hosts.

Instead of giving every department the same size subnet, VLSM allows address space to be allocated according to actual requirements.

VLSM is an intermediate or advanced topic and should be studied after learners understand basic subnetting.

32. Common Subnetting Mistakes

Beginners commonly make mistakes such as:

  1. Confusing network and host addresses.

  2. Forgetting the broadcast address.

  3. Using the wrong subnet mask.

  4. Calculating the wrong block size.

  5. Counting the network address as a host.

  6. Counting the broadcast address as a host.

  7. Misunderstanding CIDR notation.

  8. Borrowing the wrong number of bits.

  9. Assigning duplicate addresses.

  10. Placing a device in the wrong subnet.

33. Practical Activity 1: Calculate Host Bits

Calculate the host bits for:

  1. /24

  2. /25

  3. /26

  4. /27

  5. /28

  6. /29

  7. /30

Use:

Host bits = 32 − prefix length

34. Practical Activity 2: Calculate Hosts

Calculate the traditional usable host capacity of:

  1. /24

  2. /25

  3. /26

  4. /27

  5. /28

  6. /29

  7. /30

Use:

Usable hosts = 2^h − 2

where h represents the number of host bits.

35. Practical Activity 3: Identify Subnets

For:

192.168.1.0/26

identify:

  1. Number of subnets

  2. Network addresses

  3. Broadcast addresses

  4. Usable host ranges

  5. Number of usable hosts per subnet

36. Practical Activity 4: Design a School Network

A school requires separate networks for:

  • Administration – 30 devices

  • Teachers – 20 devices

  • Computer laboratory – 50 devices

  • Students' Wi-Fi – 100 devices

Learners should design a basic addressing plan.

They should identify:

  • Network address

  • Prefix

  • Subnet mask

  • Host range

  • Broadcast address

37. Practical Activity 5: Subnetting With a Calculator

Use an IPv4 subnet calculator to verify your manual calculations.

However, learners should first perform the calculation manually before using a calculator.

This ensures they understand the subnetting process rather than simply relying on software.

38. Assessment Questions

  1. What is subnetting?

  2. Why is subnetting used?

  3. What is a subnet?

  4. What is a subnet mask?

  5. What does /24 mean?

  6. How many bits are in an IPv4 address?

  7. What happens when host bits are borrowed?

  8. What is a network address?

  9. What is a broadcast address?

  10. What is a usable host address?

  11. What is the subnet mask for /26?

  12. How many total addresses are in a /26 subnet?

  13. How many traditional usable host addresses are in a /26 subnet?

  14. What is the block size of /27?

  15. What is the difference between FLSM and VLSM?

  16. How can subnetting improve network management?

  17. How can subnetting contribute to network segmentation?

  18. Why should the network address not normally be assigned to a host?

  19. Why should the broadcast address not normally be assigned to a host?

  20. Explain how routers connect different subnets.

39. Practical Assignment

An organization has been allocated:

192.168.50.0/24

It has four departments:

  • Administration – 40 hosts

  • Finance – 25 hosts

  • ICT – 20 hosts

  • Management – 10 hosts

Create a subnetting plan.

For each department, provide:

  • Network address

  • Subnet mask

  • CIDR prefix

  • First usable address

  • Last usable address

  • Broadcast address

  • Number of available host addresses

Learners should explain why their selected subnet sizes are appropriate.

40. Key Terms

Subnetting
Subnet
IPv4
IP address
Subnet mask
CIDR
Prefix
Network address
Broadcast address
Host address
Host bits
Network bits
Block size
FLSM
VLSM
Routing
VLAN
Broadcast domain
Network segmentation
Address allocation

41. Lesson Summary

Subnetting is the process of dividing a larger IP network into smaller logical networks.

The process works by borrowing bits from the host portion of an IPv4 address and using them to create additional network portions. The subnet mask or CIDR prefix identifies the network boundary.

For example:

192.168.1.0/24

can be divided into four /26 subnets:

192.168.1.0/26
192.168.1.64/26
192.168.1.128/26
192.168.1.192/26

Learning subnetting prepares learners for more advanced networking topics such as routing, VLANs, VLSM, route summarization and network design.

42. Further Learning Through Senior ICT Academy

More learning on IPv4 subnetting, CIDR, VLSM, routing and practical network configuration will be delivered through Senior ICT Academy Campus by either a physical instructor or an online instructor.

Senior ICT Academy Campus:

https://campus.seniorictacademy.com/login