Skip to content
NET101 Week 04 Beginner

IPv4 Addressing & Binary Foundations

Octets, Binary Conversion, Classless Addressing, and the Logic of Network Identity

Track your progress through this week's content

Opening Framing: Addressing is the Grammar of Routing

Networking becomes much more disciplined once students realize that an IP address is not just a label attached to a device. It is a structured value used by hosts and routers to decide what is local, what is remote, and which parts of the network belong together. If a student cannot interpret an address as bits, prefix lengths, and hierarchy, almost every later topic becomes mechanical rather than understood.

IPv4 gives every endpoint and interface a 32-bit address space. Those 32 bits must be divided intelligently between network identity and host identity. That division is what makes routing scalable. Without hierarchy, the Internet would collapse into an unmanageable flat table of individual devices.

This week therefore sits at the center of the degree. Binary conversion is not "math for its own sake." It is how engineers see the hidden structure inside dotted decimal notation. Classless Inter-Domain Routing (CIDR) is not just slash notation. It is the system that made address allocation and route aggregation practical at Internet scale.

Learning Outcomes

  • LO1: Convert IPv4 octets accurately between decimal and binary using bit weights.
  • LO2: Explain how a 32-bit IPv4 address is divided into octets, prefixes, and host bits.
  • LO3: Distinguish legacy classful logic from classless CIDR addressing and explain why CIDR replaced fixed classes.
  • LO4: Interpret common private, public, and special IPv4 ranges and verify host addressing information on real systems.
  • LO5: Diagnose early addressing mistakes such as wrong prefix length, wrong gateway assumptions, and invalid range selection.

Key insight: every later subnetting, routing, and troubleshooting decision depends on being able to read an IPv4 address as a structured binary object rather than a string.

1) Binary is the Native Language of IPv4

Computers store addresses as binary digits. Humans prefer dotted decimal notation because it is easier to read, but the underlying logic is still binary. An IPv4 address is 32 bits long, grouped into four octets of 8 bits each. Every octet can represent a decimal value from 0 to 255.

Bit position value 128 64 32 16 8 4 2 1
Binary place b7 b6 b5 b4 b3 b2 b1 b0

Converting binary to decimal is simply a matter of adding the place values where the bit is set to 1. For example, binary 11000000 means 128 + 64, which is 192. Converting decimal back to binary means finding which place values combine to produce the target number.

Worked examples

Binary to decimal:
11000000 = 128 + 64 = 192
00001010 = 8 + 2 = 10

Decimal to binary:
25 = 16 + 8 + 1 = 00011001
172 = 128 + 32 + 8 + 4 = 10101100
Professional habit

Strong network engineers stop needing a calculator for the common octet values. Numbers such as 128, 192, 224, 240, 248, 252, and 255 appear constantly in masks, prefixes, and subnetting work. Learn to recognize them immediately.

2) IPv4 Structure: Four Octets, One Hierarchy

IPv4 is written in dotted decimal notation because four decimal numbers are easier to read than 32 uninterrupted bits. An address such as 192.168.10.25 is still one 32-bit value; the dots simply divide the value into octets so humans can reason about it more easily.

192.168.10.25

192 = 11000000
168 = 10101000
10  = 00001010
25  = 00011001

Full binary form:
11000000.10101000.00001010.00011001

This structure matters because the address is divided into a network portion and a host portion. Devices on the same local IP network share the same network bits. The host bits distinguish one device from another inside that network.

Concept Meaning Operational impact
IPv4 address 32-bit logical identifier Used for Layer 3 host and network identity
Octet 8-bit section of the address Makes binary values easier to read and compare
Network portion Bits that identify the network Routers use these bits to make forwarding decisions
Host portion Bits that identify the individual device Distinguishes endpoints within the same network
Prefix length Number of network bits Defines the boundary between network and host identity

The key mental shift is this: the dots do not define the true boundary between network and host bits. The prefix length does. That is why CIDR is so important. It allows the boundary to move, rather than forcing networks to follow a rigid class-based pattern.

3) Prefix Length and CIDR: Why Slash Notation Exists

The notation /24, /16, or /27 is shorthand for the number of bits reserved for the network portion of the address. This is called Classless Inter-Domain Routing (CIDR). CIDR replaced the older classful model because the Internet needed more flexible address allocation and better route aggregation.

Prefix examples

/8   = 11111111.00000000.00000000.00000000
/16  = 11111111.11111111.00000000.00000000
/24  = 11111111.11111111.11111111.00000000
/27  = 11111111.11111111.11111111.11100000

A prefix length tells the host and the router which bits are being compared to decide whether another address belongs to the same network. For example, two addresses in a /24 network must share the first 24 bits. Two addresses in a /16 network must share the first 16 bits.

Prefix Common mask form What it usually implies
/8 255.0.0.0 Large network block with 8 network bits
/16 255.255.0.0 Two full octets of network identity
/24 255.255.255.0 Common small-LAN boundary
/27 255.255.255.224 Network boundary inside an octet, used for smaller address blocks

Week 5 will formalize host ranges, network IDs, and broadcast addresses in much more detail. For this week, the critical concept is that CIDR allows engineers to choose a prefix length that matches the actual need instead of wasting address space with rigid default classes.

Why CIDR mattered historically

Classful allocation wasted enormous amounts of address space and produced bloated routing tables. CIDR introduced flexible prefixes and route summarization, which helped the Internet scale more efficiently despite IPv4's limited address supply.

4) Classful Addressing: Legacy Logic You Still Need to Recognize

Early IPv4 deployments used a classful model in which the first bits of the address implied a default network size. That model is no longer how modern routing should be designed, but it still appears in documentation, exam language, and historical explanations. Students need to understand it without confusing it with modern best practice.

Class First-octet range Legacy default prefix Comment
Class A 1-126 /8 Extremely large default networks; inefficient by modern standards
Class B 128-191 /16 Mid-sized legacy default networks
Class C 192-223 /24 Small legacy default networks
Class D 224-239 Not for normal host addressing Multicast space
Class E 240-255 Reserved Experimental and special uses

The weakness of classful addressing is obvious in hindsight. A company that needed a few thousand addresses might be forced into a huge Class B allocation, while a smaller Class C block would be too small. CIDR solved this by allowing the prefix to reflect actual need instead of forcing every organization into one of a few rigid sizes.

5) Private, Public, and Special IPv4 Ranges

Not every IPv4 address is meant to be routed globally across the public Internet. Engineers must recognize the major address categories immediately because design, routing, and troubleshooting decisions depend on them.

Range or type Meaning Operational use
10.0.0.0/8 Private range Large internal enterprise or lab addressing
172.16.0.0/12 Private range Internal addressing with moderate scale
192.168.0.0/16 Private range Homes, labs, and smaller office networks
127.0.0.0/8 Loopback space Local host self-testing such as 127.0.0.1
169.254.0.0/16 Link-local automatic addressing Appears when DHCP fails on many hosts
0.0.0.0 Unspecified address Often seen during startup or as the default route symbol
255.255.255.255 Local broadcast Special-purpose broadcast behavior on the local segment

The three private ranges defined by RFC 1918 are especially important because they are everywhere in real networks. They are not globally unique public addresses. That is why technologies such as NAT became common: many internal hosts needed to communicate externally even though their internal addresses were not Internet-routable as public endpoints.

Troubleshooting clue

If a workstation shows an address in the 169.254.0.0/16 range, the problem is usually not "the Internet." The more immediate question is why the host did not obtain valid configuration from DHCP or static assignment.

6) Verification: Read and Interpret Host Addressing Correctly

Week 4 is not only about arithmetic. It is about learning to read real device output and interpret what it means. A valid address on paper is useless if the host has the wrong prefix length, wrong default gateway, or a range that does not match the intended design.

Useful host checks

Windows:
ipconfig /all

Linux:
ip addr
ip route

macOS:
ifconfig
netstat -rn
Field to inspect What it tells you Why it matters
IPv4 address The host's Layer 3 identity Must fit the intended network and not duplicate another host
Mask or prefix Where network bits stop and host bits begin Determines whether other addresses are treated as local or remote
Default gateway Where remote traffic is sent Needed only for non-local destinations
DHCP status Whether the address was leased dynamically Helps explain unexpected or missing configuration
Example interpretation

Host address: 192.168.10.25
Prefix: /24
Gateway: 192.168.10.1

Meaning:
- The host belongs to the 192.168.10.x local network
- Devices sharing the first 24 bits are treated as local
- Other destinations require the default gateway

This is where Week 2's packet-path logic and Week 4's addressing logic meet. The host decides whether to use the default gateway by comparing the destination against its own address and prefix. If the comparison says "same network," the host stays local. If not, the gateway becomes relevant.

7) Failure Modes: Addressing Mistakes Create Predictable Symptoms

Addressing errors often look like mysterious connectivity problems, but they usually follow predictable patterns. Once students understand binary boundaries and prefix logic, many of these symptoms become much easier to diagnose.

Symptom Likely cause First check
Host can reach some local devices but not others Wrong mask or prefix length Compare host prefix with expected design
Host cannot reach remote networks Missing or wrong default gateway Inspect gateway configuration and local prefix logic
Unexpected 169.254.x.x address DHCP failure or missing static configuration Lease state, DHCP availability, link condition
Intermittent or conflicting behavior on same LAN Duplicate IP address Host conflict messages, ARP instability, address inventory
Public reachability assumption is wrong Private address space used internally without translation Verify whether the address is RFC 1918 private space
  1. Check the host's actual address and prefix before changing anything else.
  2. Check whether the address belongs to the intended private, public, or special-use range.
  3. Check whether the destination should be local or remote according to the prefix length.
  4. Only after that, check gateway and higher-layer assumptions.

Key insight: many "routing problems" begin as incorrect host addressing assumptions.

Real-World Context: Why Address Hierarchy Keeps Networks Scalable

The Internet cannot route to every host as if every device were unrelated. Hierarchy is what allows routers to summarize, organizations to allocate address space efficiently, and engineers to segment networks into understandable blocks. CIDR exists because scale demanded flexibility. Private addressing exists because public IPv4 space is limited. Subnetting exists because not every LAN should be a single flat range.

This is also why sloppiness in address planning becomes expensive later. Poorly chosen prefixes, inconsistent private ranges, and weak documentation turn every future change into guesswork. Degree-level networking should train students to see addresses as part of architecture, not just configuration syntax.

Guided Lab: Binary Math Practice and IP Scheme Conversion

Goal: Convert IPv4 values between binary and decimal, classify addresses correctly, and verify what a host configuration means in practice.

Step 1: Convert decimal octets to binary

  1. Convert 10, 25, 172, and 192 into 8-bit binary form.
  2. Write each answer using all 8 bits so the octet structure stays clear.
  3. Check your result by adding the bit values back to decimal.

Step 2: Convert full IPv4 addresses

  1. Convert 10.5.25.1 into binary.
  2. Convert 192.168.10.25 into binary.
  3. Convert binary 10101100.00010000.00001010.00000001 back into dotted decimal.

Step 3: Classify the addresses

  1. Identify whether each address is private, public, or special-use.
  2. Identify the legacy class that the first octet would suggest.
  3. State why the class label is secondary to the actual prefix in modern CIDR-based design.

Step 4: Read real host configuration

  1. On a real host or Packet Tracer PC, view the IPv4 address, mask or prefix, and default gateway.
  2. Write one sentence explaining which part of the address is network identity and which part is host identity.
  3. State whether the gateway would be used to reach another host in the same prefix.

Step 5: Compare prefixes

  1. Take the address 192.168.10.25 with /24.
  2. Compare it with 192.168.10.50 and explain why the first 24 bits match.
  3. Compare it with 192.168.11.50 and explain why the host treats it as a different network under /24.

Lab reflection (mandatory)

  1. Why is binary fluency necessary for understanding prefixes instead of relying only on dotted decimal?
  2. What part of the lab made CIDR feel more logical than classful addressing?
  3. How would a wrong prefix length change whether traffic stays local or uses the gateway?

Week 4 Outcome Check

By the end of this week, you should be able to:

  • Convert IPv4 octets between binary and decimal with confidence
  • Explain the relationship between address bits, octets, and prefix lengths
  • Describe why CIDR replaced rigid classful allocation
  • Recognize key private and special IPv4 ranges quickly
  • Interpret real host configuration and predict whether traffic should stay local or go to a gateway

Next week turns this foundation into subnetting, where network IDs, broadcast addresses, and host ranges are calculated explicitly.

Hands-On Labs

Use these activities to move from address memorization to address reasoning.

Lab 1: Binary Conversion Drill

Task: Convert ten decimal octets to binary and ten binary octets to decimal.
Deliverable: Completed worksheet with all working shown.
Why it matters: Fast subnetting and prefix interpretation depend on instant recognition of binary patterns.
Time estimate: 25-35 minutes

Lab 2: IPv4 Classification Worksheet

Task: Take a list of IPv4 addresses and classify each as private, public, loopback, or link-local.
Deliverable: One-page classification table with justification.
Why it matters: Engineers need to recognize address meaning immediately during troubleshooting.
Time estimate: 20-30 minutes

Lab 3: Host Configuration Interpretation

Task: Inspect a host's IPv4 address, prefix, and gateway, then explain which destinations are local and which require routing.
Deliverable: Short note with one screenshot and one paragraph of interpretation.
Why it matters: This is the bridge between address math and real packet-path decisions.
Time estimate: 20-30 minutes

Checkpoint Questions

  1. Why does IPv4 addressing require binary fluency even though humans usually write addresses in dotted decimal?
  2. What is an octet, and why can one octet never exceed 255 in decimal?
  3. What does a prefix length such as /24 actually tell a host or router?
  4. Why did CIDR replace classful allocation?
  5. What are the three RFC 1918 private IPv4 ranges?
  6. Why is a 169.254.x.x address usually a troubleshooting clue rather than a valid intended enterprise design?
  7. How can a wrong prefix length cause a host to make incorrect local-versus-remote decisions?

Weekly Reflection

Reflection prompt (200-300 words):

This week introduced IPv4 as a structured hierarchy rather than a list of numbers. Reflect on how binary reasoning changes the way you interpret addressing and routing.

  • Why is dotted decimal notation useful but potentially misleading if you never think about the underlying bits?
  • How did CIDR solve problems that classful addressing could not solve well?
  • What operational problems become likely when teams choose address ranges and prefixes without discipline?
  • How does understanding the local prefix boundary improve troubleshooting before you even touch a router?

A strong reflection should connect arithmetic, hierarchy, and operational behavior.

Recommended References

Use the standards to confirm what the ranges and prefixes mean, then use your own practice work to make the binary logic automatic.

Week 04 Quiz

Test your understanding of binary conversion, IPv4 structure, private ranges, and CIDR logic.

Take Week 04 Quiz