Skip to content

Practice: Subnetting Foundations

Module
Subnetting Foundations
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

Produce a record of ranges and sending decisions that another reader can check. Write the method before opening the answers, then compare two decisions with the lab.

Finish Practice: Understanding IPv4 Addresses and the four lessons in Subnetting Foundations. The lab must be up in its starting state, modes off and no fault. Remove the previous lesson’s fault before beginning. Start at learner@rootvolt:~$ for the one-command reads.

Use these supplied settings. They are paper examples; do not assign them to lab interfaces. Each gives an address somewhere inside the subnet, so do not assume the supplied address is already its network address.

Case Setting
A 203.0.113.78/27
B 192.0.2.182/29
C 172.20.14.9/22

For each case, write the dotted mask and circle the octet where the prefix ends. Record that octet’s mask value, the subtraction giving block size, and the selected multiple. Then write network address, first usable, last usable, broadcast address and usable count. Keep the third-octet case separate.

Check your own results before checking the solution. The supplied address should lie between the network and broadcast ends. The network should begin at a multiple of the block size in the selected octet. The broadcast should be immediately before the next block. Finally, compare the count with the number of host bits.

If the checks disagree, return to the first step. Equal-sized subnets share a usable count, so check the endpoints too. Your record needs both the boundary and the numbers derived from it.

Take each machine’s view separately. These questions ask what it would choose from its starting settings, not whether a destination answers. Write the source prefix, source network, destination network under that prefix, and local or router. For router, use the subnet that contains the destination, or record none. If router is selected, name the gateway from the known lab settings.

  • Laptop sends to 10.77.10.11.
  • Phone sends to 10.77.20.1.
  • Router sends to 10.77.20.80.
  • Web sends to 10.77.20.53.

Notice that the second destination is an address owned by router on the site network. Ownership does not change phone’s first decision. Apply phone’s prefix before deciding where it sends. For the last destination, a route choice does not require a machine to exist at that address.

Plan what evidence would support your phone and web decisions. A via value names a next machine; a direct dev eth0 route has no such value. Use this distinction to check the chosen path. Do not use a ping failure to replace the route read: failure could have several causes beyond the decision this exercise asks about.

“The supplied address is the network address.” Apply the block method first. An address inside a block often has nonzero host bits, so copying it into the network field loses the boundary.

“A local decision proves a responding device exists.” The route calculation selects a path without sending a message. It cannot establish that a machine is present or a service is listening.

A useful explanation names the machine whose settings it uses. “These are local” is incomplete when prefixes differ. “From this machine, using this prefix” makes the claim checkable and helps explain an exchange whose outgoing and returning paths behave differently.

Complete the three range records and four decisions before opening the solution. Write one sentence explaining why each decision follows from its source prefix. Then run the replay’s phone and web commands. Compare their presence or absence of via with your written predictions, and record what the read establishes about each path.

Check phone and web destination decisions
learner@rootvolt:~$ netlab shell phone -- ip route get 10.77.20.1[sudo] password for learner: 10.77.20.1 via 10.77.10.1 dev eth0 src 10.77.10.11 uid 1001 
    cache learner@rootvolt:~$ netlab shell web -- ip route get 10.77.20.5310.77.20.53 dev eth0 src 10.77.20.80 uid 1001 
    cache 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 phone's path to router's site address and web's path to a site destination.
Steps (9)
  1. Type netlab shell phone -- ip route get 10.77.20.1
  2. Press Enter
  3. Output: [sudo] password for learner:
  4. Type the password (the terminal shows nothing)
  5. Press Enter
  6. Output: 10.77.20.1 via 10.77.10.1 dev eth0 src 10.77.10.11 uid 1001 cache
  7. Type netlab shell web -- ip route get 10.77.20.53
  8. Press Enter
  9. Output: 10.77.20.53 dev eth0 src 10.77.20.80 uid 1001 cache
Solution
  • A: mask 255.255.255.224, fourth-octet block 32, selected multiple 64. Network 203.0.113.64, first 203.0.113.65, last 203.0.113.94, broadcast 203.0.113.95, count 30.
  • B: mask 255.255.255.248, fourth-octet block 8, selected multiple 176. Network 192.0.2.176, first 192.0.2.177, last 192.0.2.182, broadcast 192.0.2.183, count 6.
  • C: mask 255.255.252.0, third-octet block 4, selected multiple 12. Network 172.20.12.0, first 172.20.12.1, last 172.20.15.254, broadcast 172.20.15.255, count 1022.

All source interfaces use /24. Laptop chooses local. Phone chooses router, via 10.77.10.1, even though the destination is router’s other address. Router finds 10.77.20.80 inside its site subnet 10.77.20.0/24 and chooses local. Web chooses local: its line begins 10.77.20.53 dev eth0, without via. Phone compares home with site; the other three compare matching network parts. The reads prove route choices, not delivery or the presence of a machine at the last address.

Why can mismatched prefixes produce communication that looks inconsistent?

Answer

Each machine applies its own prefix independently. One may send through router while the other tries directly on the wrong network. A request can arrive while its reply fails. A successful exchange with one neighbor does not prove the prefix is correct for every destination.

  • Record the method alongside each range.
  • Use the sender’s settings for each decision.
  • Keep route choice separate from successful delivery.

Next, Reaching Another Device follows the next step after the local-or-router choice.