6.1 IPv4 Addressing

Key Takeaways

  • An IPv4 address is a 32-bit value written as four decimal octets (0–255) separated by dots
  • A subnet mask or prefix length splits each address into a network portion and a host portion
  • Classful classes A/B/C used fixed first-octet ranges; modern networks use classless CIDR instead
  • Private RFC 1918 ranges are 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 — not routed on the public Internet
  • Special addresses include network, broadcast, loopback (127.0.0.0/8), and APIPA (169.254.0.0/16)
Last updated: July 2026

Every device that communicates on an IP network needs a unique Layer-3 address. On the Cyber Test, IPv4 addressing questions test whether you can read an address, interpret its mask, recognize private vs public space, and explain what the network and host portions mean. This section builds that foundation before you subnet in the next section.

What an IPv4 Address Is

An IPv4 address is a 32-bit binary number. Humans rarely write thirty-two zeros and ones, so we group the bits into four octets (8 bits each) and convert each octet to decimal. The familiar form is dotted-decimal notation:

192.168.10.45

Each octet ranges from 0 to 255 because 2⁸ = 256 possible values (0 through 255). If you see a number like 192.168.1.300, it is not a valid IPv4 address — the last octet exceeds 255.

In binary, that same address looks like:

11000000.10101000.00001010.00101101

You do not need to convert every address on the exam, but you should be comfortable converting when a question gives binary or asks how many host bits remain after a mask.


Network Portion vs Host Portion

An IPv4 address alone does not tell a router which bits identify the network. That job belongs to the subnet mask (or its modern shorthand, the prefix length).

ConceptRole
Network bitsShared by all hosts on the same subnet; routers use them to forward toward that network
Host bitsUnique to each device (or reserved for network/broadcast) within that subnet
Subnet mask32-bit pattern of 1s (network) followed by 0s (host), e.g. 255.255.255.0
Prefix lengthCount of leading 1s in the mask, written as /24 for 255.255.255.0

Example: 192.168.10.45 with mask 255.255.255.0 (/24) means:

  • Network portion: 192.168.10
  • Host portion: .45
  • Network address: 192.168.10.0
  • Broadcast address: 192.168.10.255

All hosts with addresses 192.168.10.1 through 192.168.10.254 (usable hosts on a /24) share the same Layer-3 subnet when that mask is used.


Classful Addressing (Historical Context)

Early IPv4 used classful addressing. The first octet determined the default mask:

ClassFirst-octet rangeDefault maskPrefixIntended use
A1–126255.0.0.0/8Huge networks
B128–191255.255.0.0/16Medium networks
C192–223255.255.255.0/24Small networks
D224–239n/an/aMulticast
E240–255n/an/aExperimental

Classful rules waste space: a Class A network "owns" 16 million-plus host addresses even if the organization needs a few thousand. Modern networks almost always use classless addressing (CIDR), where any prefix length is allowed — /20, /27, /30, and so on — regardless of the first octet.

Exam tip: If a question mentions "Class C default mask," answer /24 or 255.255.255.0. If it shows a non-default mask like 192.168.1.0/26, treat it as classless and ignore the old class letter for host-count math.


Private Address Ranges (RFC 1918)

The Internet Assigned Numbers Authority reserved three IPv4 blocks for private (non-Internet-routable) use. Memorize them exactly:

Private blockPrefixApproximate size
10.0.0.010.255.255.25510.0.0.0/816,777,216 addresses
172.16.0.0172.31.255.255172.16.0.0/121,048,576 addresses
192.168.0.0192.168.255.255192.168.0.0/1665,536 addresses

Key points:

  • Private addresses can be reused inside different organizations.
  • A NAT (Network Address Translation) device or proxy typically translates private addresses to a public address when traffic leaves to the Internet.
  • 172.15.0.1 is not private (it is below 172.16). 172.32.0.1 is also not private (it is above 172.31). Only 172.16 through 172.31 count.

Public addresses are globally unique and routable on the public Internet (subject to assignment by ISPs and registries).


Special and Reserved Addresses

Several patterns appear often on aptitude and networking questions:

Address / rangeMeaning
Network addressAll host bits 0 — identifies the subnet itself, not a host
Broadcast addressAll host bits 1 — delivers to every host on that subnet
127.0.0.0/8Loopback — traffic to 127.0.0.1 stays on the local machine
169.254.0.0/16APIPA / link-local — automatic address when DHCP fails
0.0.0.0"This host" / default route context (depends on usage)
255.255.255.255Limited broadcast (local network segment)

Worked recognition example

Host 10.20.30.40 with mask 255.255.0.0 (/16):

  • Network: 10.20.0.0
  • Broadcast: 10.20.255.255
  • Usable hosts: 10.20.0.110.20.255.254
  • This address sits in the 10.0.0.0/8 private space

Why This Matters for Cyber Work

Cyber operators read packet captures, firewall rules, and access-control lists constantly. Misreading whether 172.20.5.9 is private, or treating a network address as a host, leads to broken filters and bad incident analysis. On the Cyber Test, expect identification questions ("which is private?") and structure questions ("what is the network address?") more than advanced routing theory.

Quick self-check

  1. Convert the idea "first 24 bits are network" into mask 255.255.255.0 and prefix /24.
  2. Spot invalid octets (>255) and invalid private claims outside RFC 1918.
  3. Separate classful history from classless reality used in modern subnetting.
Test Your Knowledge

Which range is a valid RFC 1918 private IPv4 block?

A
B
C
D
Test Your Knowledge

An IPv4 address uses how many bits in total?

A
B
C
D
Test Your Knowledge

Under traditional classful addressing, which default mask applies to first-octet values 192–223?

A
B
C
D