Step 31. Understanding IP Addresses Completely — Neighborhood Name and House Number
Level 0 — Understanding Computer Operation and Structure | Difficulty ★★★☆☆ | Estimated time: 4 hours
Prerequisites: Step 6 (network check) and Step 29 (SSH) complete. We’ll work in Windows PowerShell. Prepare paper and a pen for the calculation practice.
- What you need: A Windows PC, PowerShell, paper and a pen.
- Caution: Today’s practice is entirely read-only. There’s not a single command that changes settings, so it’s 100% safe.
In Step 29, we found an address with ip a and connected over SSH. Back then, "a number starting with 192.168" was simply a home address. Today we take apart the structure of that address. Why does it start with 192.168, of all things? What’s the /24 stuck at the end? How do you tell the same neighborhood from a different one?
These questions aren’t games. "Is the address in this log on our internal network, or outside?", "Over what range should I open this firewall rule?" — security’s everyday questions all begin with the calculations you’ll learn today. Don’t be scared by the word "calculations." Addition, subtraction, and "dividing in half" are all you need.
1. Learning Objectives
By the end of this chapter, you will be able to:
- Explain that an IPv4 address is actually a 32-bit number
- Explain the meaning of CIDR notation like
/24and its relationship to the subnet mask (255.255.255.0) - Given an address, calculate the network address, usable range, and broadcast address
- Find and read your address, CIDR, and gateway in the output of
ipconfig /allandGet-NetIPAddress - Memorize the three private IP ranges (10.x, 172.16–31.x, 192.168.x) and state NAT’s role in one sentence
2. Background Knowledge — Today’s Tools and Concepts
Today’s Tools at a Glance
| Category | Details |
|---|---|
| Language & environment | PowerShell 5.1 (read-only; regular privileges suffice) + paper and pen |
| Today’s commands | ipconfig /all (address, mask, gateway), Get-NetIPAddress (address and PrefixLength) |
| Concepts needed | IPv4 and 32 bits, CIDR notation, network/host, broadcast, private IP ranges, NAT |
2-1. What IPv4 Really Is — 32 Switches
An IPv4 address looks like four clumps of numbers (e.g., 172.30.1.54), but in substance it’s 32 binary switches. Each clump is 8 bits (eight switches), so it becomes a number between 0 and 255. This is exactly why a number over 255 can never appear in an IP address — 300 doesn’t fit in 8 slots.
172 . 30 . 1 . 54
10101100 00011110 00000001 00110110 ← what it really looks like (32 bits)
A bit is one switch holding a 0 or a 1. The number of cases you can make with 8 bits is 2^8 = 256, that is, 0 through 255. Remember just this one fact and every calculation in this chapter unlocks.
2-2. Network and Host — Neighborhood Name and House Number
An address splits into two parts. The front is the network — the neighborhood name; the back is the host — the house number within that neighborhood. What tells you how far the neighborhood name extends is notation like /24, called CIDR (Classless Inter-Domain Routing) notation.
/24= "the first 24 bits (three clumps) are the neighborhood name, the last 8 bits (final clump) are the house number"/16= the first two clumps are the neighborhood, the last two are the house number
So 172.30.1.54/24 is "house 54 in the 172.30.1 neighborhood." Devices in the same neighborhood can talk directly; to go to another neighborhood, you pass through a gatekeeper (the gateway, usually your router).
2-3. Subnet Mask and PrefixLength — Two Notations Saying the Same Thing
The notation differs by Windows command. ipconfig shows "Subnet Mask 255.255.255.0"; Get-NetIPAddress shows "PrefixLength 24." The two are the same statement.
Unroll the subnet mask 255.255.255.0 into binary and you get 24 consecutive 1s. It’s a marker saying "the positions with a 1 are the neighborhood name." So counting the mask’s 1s gives you the number after the slash — the prefix length.
| Subnet mask | CIDR | Neighborhood size |
|---|---|---|
| 255.0.0.0 | /8 | about 16.77 million addresses |
| 255.255.0.0 | /16 | 65,536 |
| 255.255.255.0 | /24 | 256 |
2-4. Counting Addresses in One Neighborhood — Three Special Addresses
A /24 neighborhood has 256 numbers in the final clump, 0–255. But not all of them can be used as house numbers.
- Network address: ends in 0 (e.g., 172.30.1.0). It’s "the neighborhood’s own nameplate," so it can’t be a house.
- Broadcast address: ends in 255 (e.g., 172.30.1.255). It’s for "shouting to the whole neighborhood," so it can’t be a house either.
- Usable range: in between, .1–.254. The 254 that real devices use.
The rule in one sentence: exclude the neighborhood’s very first and very last. This rule applies identically whether it’s /16 or /25.
2-5. Private Ranges and NAT — Addresses Used Only Indoors
The internet world has one agreement (RFC 1918). The following three ranges are private addresses — any household anywhere in the world may use them internally as it pleases, but they can’t go out onto the internet directly.
10.0.0.0~10.255.255.255(10.x.x.x)172.16.0.0~172.31.255.255192.168.0.0~192.168.255.255
The reason there’s no collision when your home router starts with 192.168 and the neighbor’s router also starts with 192.168: they’re stories on the inside of different houses. When traffic heads outside, the router swaps in the house’s representative address (the public IP) — this is called NAT (Network Address Translation).
You can compare the public-IP/private-IP relationship to an apartment building’s mailboxes. The public IP is the apartment complex’s representative address; private IPs are the building-and-unit numbers. The delivery driver (an internet packet) comes only as far as the representative address, and the management office (the router’s NAT) handles delivery to the unit after that. That’s why every apartment complex in the world can have a Building 101, Unit 502 with no collision.
3. Follow Along
3-1. Finding My Address — ipconfig /all
ipconfig /all
The output is long. Find the section for your connected adapter (Ethernet or Wi-Fi). Here’s that section from the live-capture computer:
Ethernet adapter Ethernet:
Description . . . . . . . . . . . : Realtek USB GbE Family Controller
Physical Address. . . . . . . . . : 98-FD-B4-XX-XX-XX
IPv4 Address. . . . . . . . . . . : 172.30.1.54(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 172.30.1.254
DNS Servers . . . . . . . . . . . : 168.126.63.1
168.126.63.2
(Verified 2026-09-09. The tail of the MAC address is masked, and your address will differ.)
How to read the output:
IPv4 Address— the address this computer is currently borrowingSubnet Mask— it’s 255.255.255.0, so /24. The first three clumps are the neighborhood nameDefault Gateway— the gatekeeper (router) you pass through when going to another neighborhoodPhysical Address— the network card’s unique number (MAC address). For now, just remember "oh, this shows up here too"
The live computer’s address is 172.30.1.54 — inside the 172.16–31 range, so it’s a private address. Yours is also likely one of 10.x, 172.16–31.x, or 192.168.x. Check for yourself.
3-2. The Same Information, Another Face — Get-NetIPAddress
Get-NetIPAddress -AddressFamily IPv4 | Select-Object InterfaceAlias, IPAddress, PrefixLength
InterfaceAlias IPAddress PrefixLength
-------------- --------- ------------
vEthernet (WSL (Hyper-V firewall)) 192.168.32.1 20
Ethernet 172.30.1.54 24
Loopback Pseudo-Interface 1 127.0.0.1 8
(Verified 2026-09-09. The actual output has more adapters; three lines were picked here.)
How to read the output: PrefixLength is the number after the CIDR slash. Ethernet is 24, so 172.30.1.54/24 — confirm that this is the same information as section 3-1’s subnet mask 255.255.255.0.
A bonus found in the live capture: the WSL virtual adapter’s PrefixLength is 20. A /20 is a bigger neighborhood than /24 — with the last 12 bits as house numbers, it holds 2^12 = 4,096 addresses. And 127.0.0.1/8 at the bottom is the loopback address, meaning "myself."
3-3. Calculating by Hand — Checking Against My Address
Let’s unroll the live address 172.30.1.54/24 on paper.
- It’s
/24, so the neighborhood name is the first three clumps: 172.30.1 - Network address: neighborhood name + .0 → 172.30.1.0
- Broadcast: neighborhood name + .255 → 172.30.1.255
- Usable range: 172.30.1.1 ~ 172.30.1.254 (254 addresses)
- Number 54 is inside the range, so it’s an ordinary house number ✓
- The gateway 172.30.1.254 is the range’s very last number — routers often take the neighborhood’s final number
How to read it: With /24 you only need to move the last clump, so the math is easy. Now unroll the same five lines on paper with your own address.
Why: Learning the theory and matching it against a real system’s output — this is the procedure that turns "knowing" into "believing."
3-4. Calculating a Big Neighborhood — 10.10.5.77/16
This time it’s a two-clump neighborhood.
- It’s
/16, so the neighborhood name is the first two clumps: 10.10 - Network address: 10.10.0.0
- Broadcast: 10.10.255.255
- Usable range: 10.10.0.1 ~ 10.10.255.254 (65,534 addresses)
How to read it: The total is 65,536 addresses (256×256). Because the entire last two clumps are the house number, 10.10.5.77 and 10.10.99.200 are "the same neighborhood." It’s a size you often see in corporate internal networks.
Make a prediction: Then are 10.10.5.77/16 and 10.11.5.77/16 the same neighborhood, or different ones? Calculate it. (Answer: different neighborhoods. With /16, the neighborhood name extends through the second clump, so 10.10 and 10.11 are neighboring but different neighborhoods.)
3-5. A Split Neighborhood — A Taste of /25
Split a /24 in half and you get a /25. One more bit goes to the neighborhood name, so 7 bits remain for house numbers (2^7 = 128 slots).
For 192.168.0.15/25:
- The neighborhood’s addresses: 0–127 (128 total)
- Network address: 192.168.0.0, broadcast: 192.168.0.127
- Usable: .1 ~ .126 (126 addresses)
How to read it: When the numbers stump you, first count "how many bits are house numbers." With /25, 7 bits = 128 slots, minus the two ends = 126 houses. With this one counting method, no CIDR is scary.
Why: In real work, splitting a big neighborhood (subnetting) is common — "we need to divide neighborhoods per department." Today you just get a taste.
3-6. Reading Range Notation — Reverse Practice
So far you’ve been "given an address, calculate the range." Now the reverse: practice reading range notation written in documents — because firewall rules and config files carry ranges, not addresses.
For each of the following notations, unroll on paper "how many addresses, and what are the first and last?"
10.0.0.0/8192.168.100.0/24172.16.0.0/12— the middle private range written in a single line. It’s not /16 but /12: all 16 values (16–31) of the second clump fall inside the house-number range.
Answers:
- About 16.77 million. 10.0.0.0 ~ 10.255.255.255. The biggest neighborhood among the private ranges.
-
- 192.168.100.0 ~ 192.168.100.255. Of those, 254 houses are usable.
- About 1.04 million. 172.16.0.0 ~ 172.31.255.255. This one notation covers the entire middle private range.
How to read it: When a notation cuts through the middle of a clump (8, 12, 20, etc.), the habit of converting to "the number of house-number bits" — 32 minus N — solves every problem.
4. Missions & Exercises
Mission — Make My Network Business Card
- Run
ipconfig /allandGet-NetIPAddressto find your address, CIDR (or subnet mask), and gateway - With your address, calculate the network address, broadcast, and usable range by hand
- Check that the gateway address lies inside that range (it must, to be normal)
- Mark which of the three private ranges your address belongs to, and organize all of the above into
my-network.txt
Exercises
Question 1. For 172.16.8.200/24, find the network address, broadcast address, and number of usable addresses.
Question 2. Classify each address as private or public: 8.8.8.8, 10.1.1.1, 172.32.0.1, 192.168.100.5, 172.20.3.4
Question 3. What is "subnet mask 255.255.255.128" in CIDR, and how many addresses are in one neighborhood? (Hint: 128 = 10000000₂)
Question 4. Using the "neighborhood" concept, explain why 192.168.0.15/24 and 192.168.1.20/24 can’t even ping each other.
5. Model Answers & Completion Criteria
Mission Model Answer
The live-capture computer’s example (2026-09-09):
My address: 172.30.1.54
Subnet mask: 255.255.255.0 (= /24)
Gateway: 172.30.1.254
Network address: 172.30.1.0
Broadcast: 172.30.1.255
Usable: 172.30.1.1 ~ 172.30.1.254 (254 addresses)
Gateway location: inside the range (172.30.1.254 is between .1 and .254) ✓
Private range: within 172.16.0.0 ~ 172.31.255.255 ✓
How to verify: ① If the gateway falls outside the usable range, you made a calculation mistake. ② Check that broadcast − network + 1 = the total address count (255 − 0 + 1 = 256 ✓). This cross-check rule works for any CIDR.
Exercise Solutions
Question 1 solution. It’s /24, so the neighborhood is 172.16.8. Network 172.16.8.0, broadcast 172.16.8.255, 254 usable. An address starting with 172.16 does not mean it’s /16 — the attached CIDR decides the neighborhood’s size. That is both this question’s trap and its point.
Question 2 solution. 8.8.8.8 = public (famous as Google’s public DNS), 10.1.1.1 = private, 172.32.0.1 = public (only 172.16–31 is private — 32 is out of range! The boundary value is the test point), 192.168.100.5 = private, 172.20.3.4 = private.
Question 3 solution. 255.255.255.128 has 25 ones (255×3 = 24, plus 1 from 128), so it’s /25. There are 7 house-number bits, and 128 addresses per neighborhood (126 of them usable).
Question 4 solution. On a /24 basis, the two addresses are the 192.168.0 neighborhood and the 192.168.1 neighborhood — different neighborhoods. Communication between different neighborhoods must pass through the gateway (router), and a typical home router manages only its own neighborhood’s inside, so there’s no road. The rule is "direct conversation requires the same neighborhood name."
Completion Criteria Checklist
- [ ] I can explain why an IPv4 address is 32 bits with each clump at 0–255
- [ ] I know that subnet mask 255.255.255.0 and /24 are the same statement
- [ ] Given an address, I can calculate the network, broadcast, and usable range
- [ ] I can find the four pieces of information (address, CIDR, gateway, DNS) in the output of
ipconfig /allandGet-NetIPAddress - [ ] I memorized the three private ranges (10.x, 172.16–31.x, 192.168.x)
- [ ] I can state in one sentence why a private address can still reach the internet (NAT)
- [ ] Mission: I completed my network business card
my-network.txt
6. Common Pitfalls & Fixes
Wall 1. "I put a number like 300 into an address and it didn’t work."
Symptom: When you ping an invalid address, you get a message like this (verified live 2026-09-09):
Ping request could not find host 192.168.0.300. Please check the name and try again.
Cause: Each clump is 8 bits, so the maximum is 255. Since 300 doesn’t fit in 8 bits, Windows doesn’t accept it as an address — it treats it as a "name," searches, and fails. On Korean Windows, a Korean message like "Ping 요청이 호스트를 찾을 수 없습니다" appears instead.
Fix: Make "0–255 per clump" an iron rule. No program accepts anything beyond that.
Wall 2. "Both are 192.168, so why can’t they reach each other?"
Symptom: 192.168.0.15 and 192.168.1.20 can’t ping each other.
Cause: Even with the same "192.168," on a /24 basis they’re the 0 neighborhood and the 1 neighborhood — different neighborhoods. Different neighborhoods must go through the gateway, and if the router won’t open that road, you can’t go.
Fix: "Direct conversation requires the same neighborhood name" is the rule. Build the habit of checking both addresses’ CIDRs first.
Wall 3. "Aren’t addresses ending in .0 unusable? One document shows a device address ending in .0."
Symptom: You meet a case that looks like an exception to the rule.
Cause: The ".0 is the network address" rule is, precisely, "the neighborhood’s very first." In 10.1.0.0/16, an address can end in .0 without being the neighborhood’s first (10.1.0.0 is an ordinary number in the middle of the neighborhood), so it can be used as a house number.
Fix: The rule isn’t "don’t use the number 0" — it’s "exclude the neighborhood’s very first and very last." Always check the neighborhood size (CIDR) first.
Wall 4. "My address starts with 169.254. That’s not even in the private ranges?"
Symptom: Get-NetIPAddress shows a 169.254.x.x address (the live-capture computer had these on disconnected Wi-Fi adapters, 2026-09-09).
Cause: It’s a link-local address — a temporary number the computer invents for itself when it can’t find a DHCP server to hand out addresses. It’s a signal meaning "connected, but never received an address," and the internet won’t work in this state.
Fix: If you see 169.254 on the adapter you’re connected through, check the cable, Wi-Fi, and router status. One attached to a disconnected adapter can be ignored.
Wall 5. "I have a private address, yet the internet works. I thought it couldn’t go out?"
Symptom: You use a private address like 172.30.1.54, but web surfing works fine.
Cause: Thanks to the router’s NAT. The private address isn’t "roaming" the internet — the router swaps it for the public address and makes the trip on its behalf.
Fix: The confusion is normal. Remember the fact that "my address (private)" and "our house’s address as seen from outside (public)" are different.
7. Summary
Today’s Concepts
| Concept | One-line description |
|---|---|
| IPv4 | A 32-bit address. Four clumps, each 0–255 |
| CIDR (/N) | Notation meaning "the first N bits are the neighborhood name" |
| Subnet mask | CIDR’s other notation (255.255.255.0 = /24) |
| Network address | The neighborhood’s very first. Can’t be used as a house number |
| Broadcast address | The neighborhood’s very last. For "to everyone" |
| Private IP | 10.x / 172.16–31.x / 192.168.x — for indoor use only |
| NAT | The technology by which a router swaps private↔public addresses |
| Loopback (127.0.0.1) | A special address pointing to "myself" |
Today’s Commands
| Command | What it does |
|---|---|
ipconfig /all |
View everything: address, mask, gateway, DNS, MAC |
Get-NetIPAddress -AddressFamily IPv4 |
View per-adapter addresses and PrefixLength |
ping address |
Ask the other party "are you there?" |
The Instinct That Matters More Than Commands
When a calculation stumps you, start by counting "how many bits are house numbers" (32 minus N). This one sentence is the key to every CIDR problem.
In security, a range is the boundary of responsibility. Judging "is this address one of our neighborhood’s?" when you spot a strange connection in the logs; writing "allow only from 192.168.0.0/24" into a firewall — it’s all today’s calculations. The eye that reads an address and instantly knows "which neighborhood this person is from" — that is today’s harvest.
Once every box is checked, Step 31 is complete. Click the checkbox in the sidebar to save your progress.