LAB-NET-101 · Networking foundations

IPv4 subnetting - make every bit count.

See exactly how an IPv4 address becomes a network, a subnet mask separates network and host bits, and a /26 creates 62 ordinary usable host addresses.

Estimated time: 35 minutes · Browser-only · Suited to Network+, CCNA, Microsoft networking and general TCP/IP study

Lab summary

Turn subnetting rules into a visual model you can reuse.

  • Explain why an IPv4 address is 32 bits, arranged as four eight-bit bytes.
  • Read a subnet mask: 1 means network bit; 0 means host bit.
  • Visualise a /26 mask as 255.255.255.192 and identify its subnet boundaries.
  • Calculate total and ordinary usable hosts from the remaining host bits.
  • Recognise common masks from /24 through /30.

Module 1

An IPv4 address is four bytes.

A bit is a single 0 or 1. Eight bits make one byte, called an octet in IPv4. Four octets make a 32-bit IPv4 address.

One bit

0 or 1

The smallest binary value: off/on, false/true or no/yes.

One octet

8 bits

An IPv4 octet holds a decimal value from 0 through 255.

IPv4 address

4 octets

Four bytes sit beside each other in dotted-decimal notation.

IPv4 size

32 bits

That gives an IPv4 address its fixed length.

Visual breakdown

Four octets, eight bits each.

192.168.10.77

Octet 1

11000000192

Octet 2

10101000168

Octet 3

0000101010

Octet 4

0100110177
8+8+8+8=32 bits

Module 2

A subnet mask labels the address bits.

In a normal CIDR mask, leading binary 1s identify the network prefix and trailing 0s identify the host portion. The slash number tells you how many network bits there are.

Mask explorer

Choose a common prefix and watch the bits change.

Selected prefix/26
Network bits26
Host bits6
Decimal mask255.255.255.192

Binary subnet mask

1 = network bit0 = host bit

11111111.11111111.11111111.11000000

For a /26, the first 26 bits are 1s. The remaining 6 bits are 0s. The final octet is 11000000, which equals 192 in decimal.

Meaning check

What do the mask bits mean?

In a conventional IPv4 subnet mask, which statement is correct?

Module 3

Break down a /26 subnet.

A /26 leaves six host bits. Six bits can form 64 combinations, so a /26 contains 64 total addresses. In an ordinary LAN subnet, the all-zero host value is the network address and the all-one host value is the broadcast address.

Worked /26 example

192.168.10.77/26

IPv4 address11000000.10101000.00001010.01001101

/26 mask11111111.11111111.11111111.11000000

Network portionHost portion
Mask octet19211000000 in binary
Block size64256 - 192
Matching block64-127Final-octet range
Network address192.168.10.64
Usable host range192.168.10.65 - 192.168.10.126
Broadcast address192.168.10.127

77 falls in the 64-127 block because floor(77 / 64) x 64 = 64.

Subnet boundary check

Find the network address.

For 192.168.10.77/26, what is the network address?

Module 4

Calculate total and usable hosts.

Count the host bits, calculate 2 to that power for total addresses, then subtract the network and broadcast addresses for the ordinary IPv4 LAN-host convention.

Total addresses2host bits
Ordinary usable hosts2host bits - 2
PrefixFinal mask octetDecimal maskHost bitsTotalUsable hosts
/2400000000255.255.255.08256254
/2510000000255.255.255.1287128126
/2611000000255.255.255.19266462
/2711100000255.255.255.22453230
/2811110000255.255.255.24041614
/3011111100255.255.255.252242

Important scope: this lab uses the conventional LAN-host formula. Point-to-point IPv4 links can use /31 under RFC 3021, and /32 is a single-host route; do not blindly subtract two in those cases.

Host-count challenge 1 of 4

Work from host bits to usable hosts.

An ordinary /27 subnet has 5 host bits. How many usable host addresses does it have?

Module 5

Prove the subnetting foundation is in place.

Score at least six of seven questions to complete the lab. Review the feedback and retry as often as needed.

1 How many bits are in an IPv4 address?

2 In a normal subnet mask, a binary 1 identifies:

3 What decimal mask is equivalent to /26?

4 How many host bits remain in a /26?

5 A /26 has how many total address values?

6 Under the ordinary IPv4 LAN-host convention, a /26 has how many usable hosts?

7 What network contains 192.168.10.77/26?