Skip to content

Practice: Understanding IPv4 Addresses

Module
Understanding IPv4 Addresses
Difficulty
Easy
Updated
Tested on
Ubuntu 24.04.5 LTS, netlab 1.0, GNU Bash 5.2.21, tcpdump 4.99.4
On this page

Someone gives you a list of address settings and says every device can reach the Internet because every row has an address. Before accepting that claim, separate what the numbers show from what still needs testing. You will classify supplied configurations, split their parts, then check the same reasoning against your lab.

Finish Special-purpose addresses after Practice: Ethernet and Local Delivery. Keep the lab running in its starting state with modes off. Begin at learner@rootvolt:~$. The supplied configurations below are paper examples. Do not assign them to lab interfaces.

Your goals are to check four-octet format, find network and host parts under a stated prefix, recognize address kinds, and explain the limits of that evidence. Keep the address and its prefix together. A record with only the split parts hides the setting that justified the split.

Use these five supplied configurations. Each one has an address and a prefix. Two share the same host part but describe different networks under their stated prefix. At least one has a special purpose; recognize its meaning as well as its arithmetic split.

Case Setting
A 172.16.4.8/16
B 172.17.4.8/16
C 192.0.2.45/24
D 127.0.0.1/8
E 172.32.0.1/16

On paper, draw four columns headed Address, Network part, Host part and Kind. Fill one row per case. Include the prefix in the address column. Use private, public, documentation or loopback for kind. Do not classify an address as private merely because you have seen a similar number at home.

Then write why A and B differ despite their shared ending. Explain why D cannot test a router and why C is suitable for a written example. For E, state which private-range boundary it lies beyond. These are explanations from the supplied settings, not claims about a real device at any example address.

Before running anything, write the lab addresses you expect to see and which network part each should have under /24. Count router’s interfaces separately. Your expected evidence is the status list, router’s brief address output, a completed split for every listed interface address, and a sentence about Internet access.

For the real addresses, add the machine and interface next to each split. This prevents router’s two different rows from becoming a single “router address.” Keep IPv6 values in the output as recorded, but use the IPv4 address on each row for this task.

You do not need to test Internet destinations. The lab’s network is isolated and has no way out. An address says nothing by itself about routes. Reaching Another Device explains those paths. A private address identifies a range rule, not whether a usable path exists beyond the local network.

“An address proves Internet access.” These lab machines have addresses while the lab has no Internet path. An address read cannot replace a connection test.

“A familiar last number means the same device.” A and B have the same host part under /16, but different network parts. Read the complete setting.

Splitting a special-purpose address does not remove its special meaning. The arithmetic for a prefix and the rules for using that range are separate facts. Record both so a correct split does not lead to an incorrect reachability claim.

Complete the five paper rows and write your lab predictions before opening the solution. From the VM run netlab status, then netlab shell router -- ip -br address. Compare every lab address with your expected network and host parts. Explain which interfaces share a network part and why these settings alone cannot prove Internet access.

Solution

For A the network part is 172.16, the host part 4.8, and the kind private. For B they are 172.17, 4.8, and private. For C they are 192.0.2, 45, and documentation. For D they are 127, 0.0.1, and loopback. For E they are 172.32, 0.1, and public. E lies beyond the private range ending at 172.31.255.255.

Check the lab and router addresses
learner@rootvolt:~$ netlab status[sudo] password for learner: Lab is up. Modes on: none. Fault: none.

MACHINE  NETWORK     ADDRESS                      DEFAULT ROUTE  COMPARED WITH THE START
laptop   home        10.77.10.10/24               10.77.10.1     same
phone    home        10.77.10.11/24               10.77.10.1     same
router   home, site  10.77.10.1/24 10.77.20.1/24  -              same
web      site        10.77.20.80/24               10.77.20.1     same

Switch sw-home (home): laptop, phone, router
Switch sw-site (site): router, web
Services: web http 80, web https 443, web http 8080, web ssh 22learner@rootvolt:~$ netlab shell router -- ip -br addresslo               UNKNOWN        127.0.0.1/8 ::1/128 
eth0@if7         UP             10.77.10.1/24 fe80::77:10ff:fe00:1/64 
eth1@if9         UP             10.77.20.1/24 fe80::77:20ff:fe00:1/64 learner@rootvolt:~$ 

Step-by-step replay of a verified session · Recorded on Ubuntu 24.04.5 LTS, networking lab (netlab 1.0), GNU Bash 5.2.21. Check the starting lab list, then match router's two IPv4 addresses to its two interfaces.
Steps (9)
  1. Type netlab status
  2. Press Enter
  3. Output: [sudo] password for learner:
  4. Type the password (the terminal shows nothing)
  5. Press Enter
  6. Output: Lab is up. Modes on: none. Fault: none. MACHINE NETWORK ADDRESS DEFAULT ROUTE COMPARED WITH THE START laptop home 10.77.10.10/24 10.77.10.1 same phone home 10.77.10.11/24 10.77.10.1 same router home, site 10.77.10.1/24 10.77.20.1/24 - same web site 10.77.20.80/24 10.77.20.1 same Switch sw-home (home): laptop, phone, router Switch sw-site (site): router, web Services: web http 80, web https 443, web http 8080, web ssh 22
  7. Type netlab shell router -- ip -br address
  8. Press Enter
  9. Output: lo UNKNOWN 127.0.0.1/8 ::1/128 eth0@if7 UP 10.77.10.1/24 fe80::77:10ff:fe00:1/64 eth1@if9 UP 10.77.20.1/24 fe80::77:20ff:fe00:1/64

The private home addresses split into network part 10.77.10 and host parts 10 for laptop, 11 for phone, and 1 for router’s eth0@if7. The site addresses split into 10.77.20 and host parts 80 for web and 1 for router’s eth1@if9. Every one uses /24.

Router’s repeated host part does not make its two interfaces the same address. The different network parts distinguish them. The lab has private addresses only and no way out; the reads establish its settings, not Internet access.

  1. Can two similar-looking addresses belong to different networks?
  2. Why can one octet not hold 256?
  3. Does a private address protect its device?
  4. What does a reply from loopback test?
  5. Does a public address prove a working connection?
Answers
  1. Yes. A and B differ in their network part under /16.
  2. Eight bits have 256 patterns, counted from 0 through 255.
  3. No. Private is an addressing rule, not protection.
  4. Communication inside the machine running the test.
  5. No. A usable path and a responding destination still need evidence.
  • Preserve the prefix when recording an address.
  • Distinguish format, network membership and address kind.
  • Check settings in the lab without claiming more than the evidence shows.

Next, Subnetting Foundations examines the network boundary more closely.