Practice: Understanding IPv4 Addresses
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.
Before you start
Section titled “Before you start”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.
Prepare a record another reader can check
Section titled “Prepare a record another reader can check”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.
Plan the lab comparison
Section titled “Plan the lab comparison”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.
Mistakes to recognize
Section titled “Mistakes to recognize”“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.
Good to know
Section titled “Good to know”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.
Try it yourself
Section titled “Try it yourself”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.
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:~$ Steps (9)
- Type
netlab status - Press Enter
- Output:
[sudo] password for learner: - Type the password (the terminal shows nothing)
- Press Enter
- 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 - Type
netlab shell router -- ip -br address - Press Enter
- 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.
Recall check
Section titled “Recall check”- Can two similar-looking addresses belong to different networks?
- Why can one octet not hold 256?
- Does a private address protect its device?
- What does a reply from loopback test?
- Does a public address prove a working connection?
Answers
- Yes. A and B differ in their network part under
/16. - Eight bits have 256 patterns, counted from 0 through 255.
- No. Private is an addressing rule, not protection.
- Communication inside the machine running the test.
- 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.