Week 6 · Lesson 2

IPv4 Addressing (1)

An IPv4 address is just 32 bits — but everything a router does depends on how those bits are split between the network and the host. This lesson builds the address from the bits up, then shows you the classful rules and the private ranges you must know cold.

CCNA 200-301 Domain 1.6 IPv4 Addressing Verified 2026-10-11
Part 1

The anatomy of an IPv4 address

An IPv4 address is a 32-bit number. Writing all 32 bits every time would be unbearable, so we group them into four 8-bit blocks called octets and separate the octets with dots. Each octet holds a value from 0 to 255. Writing the address this way is called dotted-decimal notation.

Definition — IPv4 address. A 32-bit logical identifier for a network interface, written as four decimal octets separated by dots (each octet 0–255). Example: 192.168.1.77.
Dotted decimal:   192   .   168   .    1    .   77
Binary (32 bits): 11000000.10101000.00000001.01001101
Octet index:           1         2         3         4

Remember the count: 4 octets × 8 bits = 32 bits. That number is a favourite exam check.

One octet · type a value 0–255

Part 2

Why binary matters

Humans read decimal; hosts and routers read binary. The reason is that every important question about an address — which network is this? which part is the host? is this the broadcast address? — is answered with bit-level logic, especially the bitwise AND between an address and its mask. You cannot subnet reliably without seeing the bits.

An octet uses place values that double from right to left: 128, 64, 32, 16, 8, 4, 2, 1. A bit is either on (1, contributes its place value) or off (0, contributes nothing). To convert a decimal octet to binary, subtract the largest place value that fits, mark a 1, and repeat with the remainder. To convert binary to decimal, add the place values where the bits are 1.

Bit position87654321
Place value1286432168421
One IPv4 address = 4 octets = 32 bits Octet 1 Octet 2 Octet 3 Octet 4 8 bits · 0–255 8 bits · 0–255 8 bits · 0–255 8 bits · 0–255 Place value of each bit inside one octet: 128 64 32 16 8 4 2 1 Add the place values where the bit is 1 to get the decimal octet.
Part 3

Network portion vs host portion

Every IPv4 address is made of two logical parts:

Because the boundary between the two parts is not written into the 32 bits, we need a second value — the subnet mask — to tell us where the network bits end and the host bits begin. A mask is also 32 bits: a run of 1s (network bits) followed by a run of 0s (host bits). The prefix length is simply the count of leading 1s, written /n. We will use masks in depth in Lesson 4; for now, know that the mask defines the split.

Where does the split fall? · move the prefix slider
Prefix /24

Part 4

Default classful masks and class ranges

Before CIDR, IPv4 addresses were organised into classes, and each class came with a default mask that fixed the network/host boundary. These defaults are the foundation of subnetting, so learn them exactly:

ClassDefault prefixDefault maskNetwork bitsHost bits
A/8255.0.0.0824
B/16255.255.0.01616
C/24255.255.255.0248
Note. The mask 255.0.0.0 is 8 ones (11111111.00000000.00000000.00000000), so it is /8. 255.255.0.0 is 16 ones → /16. 255.255.255.0 is 24 ones → /24. A full octet of 255 is 8 network bits; a 0 octet is 8 host bits.

The class of a classful address is decided by its first octet. Ranges are inclusive, and note carefully that 127 is carved out of Class A and reserved for loopback.

ClassFirst-octet range (decimal)First-bit patternPurpose
A1 – 1260xxxxxxxVery large networks (unicast)
—12701111111Loopback (e.g. 127.0.0.1)
B128 – 19110xxxxxxMedium networks (unicast)
C192 – 223110xxxxxSmall networks (unicast)
D224 – 2391110xxxxMulticast
E240 – 2551111xxxxExperimental / reserved

Note that Classes A, B, and C are the only classes used to address individual hosts; D is for multicast groups and E is reserved. The loopback block is the whole network 127.0.0.0/8, and 127.0.0.1 is the standard loopback address you ping to test your own TCP/IP stack.

Exam tip. Memorise the boundaries: 1–126, 128–191, 192–223. If an address starts with 127, it is not a normal Class A host address — it is loopback. If it starts with 224 or higher, it is not a unicast address at all.
Class finder · choose a first octet

Part 5

Public vs private addresses

Not every IPv4 address may be used on the public Internet. Three blocks are reserved by RFC 1918 as private addresses. Private addresses can be used freely inside any home, office, or lab — they are reused all over the world — but they are not routable on the public Internet. To reach the Internet, a private host must pass through a device doing NAT (Network Address Translation), which rewrites its address to a public one.

BlockRangeDefault maskTypical use
Private A10.0.0.0 – 10.255.255.25510.0.0.0/8Large enterprises
Private B172.16.0.0 – 172.31.255.255172.16.0.0/12Mid-size networks
Private C192.168.0.0 – 192.168.255.255192.168.0.0/16Home & small offices
Watch the 172 range. The private block 172.16.0.0/12 spans only 172.16.0.0 through 172.31.255.255 — not all of 172. Addresses such as 172.15.1.1 or 172.32.1.1 are public.

Public addresses are globally unique and routable on the Internet; they are assigned by IANA and its regional registries, and leased to you by your ISP. A single public address at the edge, combined with NAT, is enough to give thousands of private hosts Internet access.

Address checker · type any IPv4 address

Part 6

Worked conversions and key terms

Three conversions you should be able to do without thinking.

Example 1 — decimal to binary: convert 192.

192 ≥ 128 -> 1, remainder 64
 64 ≥  64 -> 1, remainder 0
 32,16,8,4,2,1 -> 0
Result: 11000000

Example 2 — decimal to binary: convert 168.

Place: 128 64 32 16 8 4 2 1
Bits:    1  0  1  0 1 0 0 0
Check: 128 + 32 + 8 = 168
Result: 10101000

Example 3 — binary to decimal: convert 11000000.10101000.00000001.01001101.

11000000 = 128+64                 = 192
10101000 = 128+32+8               = 168
00000001 = 1                      = 1
01001101 = 64+8+4+1               = 77
Result: 192.168.1.77
Fast method. For a value like 77, find the largest place value that fits (64), subtract to get 13, take 8 (remainder 5), take 4 (remainder 1), take 1. The bits set are 64, 8, 4, 1 → 01001101. Practice until you can do a full octet in a few seconds.

Key terms

TermMeaning
OctetAn 8-bit group; an IPv4 address has four of them, each 0–255.
Dotted-decimal notationWriting an IPv4 address as four decimal octets separated by dots.
Network portionThe leading bits that identify the network an address belongs to.
Host portionThe trailing bits that identify a specific device within the network.
Subnet maskA 32-bit value whose 1s mark network bits and 0s mark host bits.
Prefix lengthThe number of leading 1s in the mask, written /n.
Classful addressingThe pre-CIDR scheme that fixes the network/host boundary by address class.
Private addressAn RFC 1918 address usable only inside a private network, not routable on the Internet.
NATNetwork Address Translation; rewrites private addresses to public ones for Internet access.
Part 7 · Your turn

Review

Check what you have learned with these review questions.

Review · 6 questions

Sources

Sources & references

  1. Postel, J. RFC 791: Internet Protocol (1981), Section 2.3 (Addressing) and Section 3.2 (classful address formats). rfc-editor.org/rfc/rfc791.
  2. Rekhter, Y. et al. RFC 1918: Address Allocation for Private Internets (1996). rfc-editor.org/rfc/rfc1918.
  3. Braden, R. RFC 1122: Requirements for Internet Hosts — Communication Layers (1989). rfc-editor.org/rfc/rfc1122.
  4. Cisco. CCNA (200-301) Exam Topics, IP Connectivity / IPv4 addressing. cisco.com.

Target exams: CCNA 200-301 v1.1 · CyberOps Associate 200-201. Last content verification: 2026-10-11.