IPv4 Operations

Addresses, masks and subnetting, one step at a time

Start hereBinarySubnetting stepsPractice labPrivate and publicLocal or remote?TroubleshootMission Check
START HERE

What an IPv4 Address Is

A new hire calls: "IT asked me for my IP address. Where do I even find that, and what is it?" Fair question. You've probably typed a few of these without ever being told what the four numbers mean. Let's fix that, one small idea at a time.

  • Street = network: the part every device on that network shares. Mail carriers find the right street first.
  • House = host: the part that’s unique to one device on that street. Then they find the house.
  • Your traffic gets the same treatment: routers and switches deliver it street first, then house.
  • Which part is which? In 172.20.9.89 the subnet mask decides, and it’s the heart of this whole module. We’ll get there in small steps.
Laptop with wired Ethernet adapter and a separate internal wireless module detail.
Generated teaching image: wired and wireless interfaces are separate configuration points. The inset illustrates a wireless module; it is not a service or disassembly guide. Each interface can have its own IP configuration.

It belongs to a connection, not the laptop

An address is attached to an interface: the Wi-Fi card, the Ethernet port, a VPN adapter. That's why one laptop can hold two addresses at once, and why it gets a different one at the coffee shop than at the office. Think of it as where you're staying today, not a serial number stamped on the device.

Four numbers, 32 bits

Every IPv4 address is four numbers separated by dots, each one from 0 to 255. Each number is called an octet because under the hood it's 8 bits (binary digits). Four octets times 8 bits gives you 32 bits total. Hang on to that 32; the subnetting math leans on it.

Four questions this module teaches you to answer: What kind of address is this (private, public or special)? Which subnet is it on? Is the destination on my street or somewhere else? Is this host set up correctly?

Quick check: your laptop is plugged into Ethernet and also connected to Wi-Fi. How many IPv4 addresses could it have right now, and why?

THE TWO HALVES

Network Bits and Host Bits

Picture the envelope again. Now imagine someone drew a line on it: everything left of the line is the street, everything right of it is the house number. That line is the subnet mask. Without it, the numbers are just numbers.

Loading picture…
  • /24 is the line: the first 24 bits are the street. In the picture that’s 192.168.1; in 172.20.9.89/24 it’s 172.20.9.
  • The last 8 bits are the house: .10 here, .89 there. Every device on the street shares the first part and gets its own last number.
  • The mask is 1s, then 0s: 255.255.255.0 is twenty-four 1s, so it’s a /24. Count the 1s.
The streetAddressing

Network portion

Plain meaning: The leading bits that every device on the subnet has in common.

Neighbors
Two devices with the same network portion are neighbors: they can talk directly without a router in the middle.
Exam angle
Always use the prefix you're given. The first three octets are the network only for a /24. A /27 moves the line into the last octet.

Remember: the prefix, not the octets, decides where the network portion ends.

The houseAddressing

Host portion

Plain meaning: Whatever bits are left after the network portion. Each device on the street needs its own unique combination here, the same way two houses can't share a number.

Network address
All host bits set to 0 is the network address (the street's name).
Broadcast address
All host bits set to 1 is the broadcast address (the street's loudspeaker).

Remember: two numbers are off-limits: no device gets the network or broadcast address.

The lineSubnet masks

Subnet mask and CIDR

Plain meaning: A mask is 32 bits too: 1s over the street, 0s over the house.

In decimal
A /24 mask is 255.255.255.0.
CIDR notation
The slash version is called CIDR notation (Classless Inter-Domain Routing). It just counts the 1s, so /24 and 255.255.255.0 say the same thing.
Exam angle
Count bits, not devices. A bigger prefix number means a longer street name and fewer house numbers.
/24 = 11111111.11111111.11111111.00000000
    = 255.255.255.0

Remember: the prefix is just the count of 1s in the mask.

The mathSubnetting

The one formula you'll use all day

Plain meaning: Usable hosts = 2h - 2, where h is the host bits.

Host bits
32 minus the prefix. A /24 leaves 32 - 24 = 8.
Addresses
2host bits. 28 = 256 on that street.
Usable hosts
Addresses minus 2 (the network and broadcast): 254.

Remember: you'll use 2h - 2 in every subnetting step.

Quick check: a /28 leaves how many host bits, and how many devices can it hold?

THE LANGUAGE UNDER THE ADDRESS

Binary: Eight Light Switches

Picture a row of eight light switches on a wall. Each switch has a price tag: 128, 64, 32, 16, 8, 4, 2 and 1. Flip some on, add up the tags of the ones that are on, and you've got a number. That's binary. Seriously, that's all of it.

  • One octet = one row of eight switches. On is a 1, off is a 0.
  • The tags never change: 128, 64, 32, 16, 8, 4, 2, 1. You only change which switches are on.
  • Press Build 89 to watch the biggest-tag-first method: does the tag fit in what’s left? Switch on and subtract, or leave it off.

Reading a byte

Write the tags over the bits, then add up only the tags sitting over a 1.

128  64  32  16   8   4   2   1
  0   1   0   1   1   0   0   1
     64 +    16 + 8 +         1 = 89

So 01011001 is 89. Same quantity, just written with two digits instead of ten.

Why each octet stops at 255

All eight switches off is 00000000, which is 0. All on is 11111111: 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255. That's 256 possible patterns counting zero, and it's why you'll never see an octet of 256 or 300.

Here's where people slip up: count the tags, not the switches. 10000100 has two switches on, but it's 128 + 4 = 132, not 2.

Building a byte: decimal to binary

Start with 89 and walk the switches from the biggest tag down. At each one, ask: does this tag fit in what's left? If yes, flip it on and subtract. If no, leave it off.

Build 89 one switch at a time
TagFits what's left?SwitchLeft over
128No: 128 is more than 89089
64Yes: 89 - 64125
32No: 32 is more than 25025
16Yes: 25 - 1619
8Yes: 9 - 811
4No: 4 is more than 101
2No: 2 is more than 101
1Yes: 1 - 110

Read the switch column top to bottom: 01011001. Check it by adding the tags back up.

Prefer dividing? That works too

Keep dividing by 2 and write down each remainder. For 22: 22 / 2 = 11 remainder 0; 11 / 2 = 5 remainder 1; 5 / 2 = 2 remainder 1; 2 / 2 = 1 remainder 0; 1 / 2 = 0 remainder 1. Read the remainders from the bottom up: 10110. Pad it to eight bits: 00010110. Use whichever method you can explain out loud.

Why you care: masks are binary too. The mask 255.255.255.224 is 11111111.11111111.11111111.11100000: 27 switches on, then 5 off. That's a /27. Once you can read the switches, masks stop being magic.

How to use the workbench

  1. Explore.

    Click the eight switches and watch the total, or type a number and load it. Step conversion walks through the build one tag at a time. Use in IPv4 drops your byte into the boundary visualizer on the next tab.

  2. Practice.

    Pick a direction and range, then build the byte or read it. Check, read the reasoning, then move on through ten questions.

  3. Speedrun.

    A 60-second round. A new request arrives every eight seconds and the queue holds four; an overflow counts as missed. Pause any time, and leaving the tab pauses it for you.

Quick check: which switches are on in 192?

MODULE: BINARY WORKBENCHONE BYTE / EIGHT SWITCHES
EXPLORE / NO TIMER8 bits / 256 patterns
YOUR BYTE01011001

Every switch that's on adds its tag to the total.

Eight-bit pattern01011001
Decimal total89

64 + 16 + 8 + 1 = 89

89 is loaded. Toggle a switch to change the byte, or step through how 89 is built.
WATCH THE LINE MOVE

Bit Boundary Visualizer

Remember the line on the envelope? This tool draws it for you. Type an address, slide the prefix, and watch the street get longer and the house numbers get fewer. Same address, different line, different subnet.

Try this first: 172.20.9.89 at /24, then /27

At /24, the street is 172.20.9 and the houses run .0 to .255. Slide to /27 and the line moves 3 bits into the last octet. Now the street is chopped into blocks of 32, and .89 lands in the block that runs .64 to .95. Its subnet becomes 172.20.9.64/27, with usable hosts .65 through .94.

What the device actually does: it lines up the address bits and the mask bits and keeps only the bits where the mask has a 1 (a bitwise AND). For the last octet: 01011001 AND 11100000 = 01000000, which is 64.

Reading the cells: green cells are network bits (the street) and cyan cells are host bits (the house). A bright cell just means that bit is a 1; it doesn't mean the address is usable.

MODULE: ADDRESS ANATOMY
BIT_ANALYZER: LIVE
Network Address
172.20.9.0
Broadcast Address
172.20.9.255
Usable Range
172.20.9.1 - 172.20.9.254

Quick check: leave the address alone and slide from /27 to /28. Before you look, predict which block .89 lands in.

SUBNETTING, PART 1

Subnetting, Step by Step

Subnetting has a reputation, and honestly it hasn't earned it. If you can count by 32s and subtract from 256, you can subnet. We'll climb one stair at a time: what a prefix means, where the line falls, three ways to do the math, then finding a full range and working backwards. No step needs more than the one before it.

Step 1: What a prefix really means

Loading picture…
  • A /24 is a building with 256 mailboxes, numbered 0 to 255. Subnetting doesn’t add mailboxes. It puts up walls.
  • +1 on the prefix borrows one host bit: every floor splits in half and the number of floors doubles. /25 = 2 floors of 128, /26 = 4 of 64, /27 = 8 of 32.
  • The picture walks one example: 192.168.10.0/24 cut down to /26, four steps from borrowed bits to usable hosts.

One building, more walls

/24
  1. 0-255
1 block of 256
/25
  1. 0
  2. 128
2 blocks of 128
/26
  1. 0
  2. 64
  3. 128
  4. 192
4 blocks of 64
/27
  1. 0
  2. 32
  3. 64
  4. 96
  5. 128
  6. 160
  7. 192
  8. 224
8 blocks of 32
Each block is labeled with the last-octet value it starts on. One more bit of prefix means half the size and twice the blocks. The building never gets bigger.

Here's the part to lock in: a bigger prefix number means smaller subnets. /30 sounds big, but it's the tiniest everyday subnet there is: 4 addresses, 2 usable.

Step 2: Find where the line falls

We'll use one address for the rest of this module's lessons so you can watch every method land on the same answer: 172.25.61.150/27. Here it is in bits. The first 27 bits are the street. The last 5 are the house.

Filled cells are network bits, outlined cells are host bits. The /27 line lands three bits into the fourth octet, so 150 (10010110) is split: 100 belongs to the street and 10110 belongs to the house.

See how the line lands inside the fourth octet? That octet is the interesting octet: the one where the mask stops being 255. Octets to its left are pure street and never change. Octets to its right (if any) are pure house. All of the subnetting math happens in that one octet.

  1. Write the mask.

    /27 is three full octets of 255 (that's 24 bits), then 3 more switches on: 128 + 64 + 32 = 224. Mask: 255.255.255.224.

  2. Spot the first octet that isn't 255.

    Here it's the fourth one, with 224. That's the interesting octet.

Fun tie-in: why 172.16 through 172.31?

The private block 172.16.0.0/12 has a mask of 255.240.0.0. The interesting octet is the second one, and 256 - 240 = 16. So the block starts at 16 and covers 16 values: 16 through 31. That odd-looking private range is just a /12 block. You'll see why 256 - 240 works on the next tab.

Quick check: for 10.140.37.200/21, which octet is the interesting one, and what's its mask value?

SUBNETTING, PART 2

Three Ways to Subnet

Ask five network techs how they subnet and you'll get three different answers. That's fine. They all land on the same numbers, because they're all describing the same bits. Below, the same problem gets solved three ways. Try all three, then keep the one that clicks for you.

The problem: 172.25.61.150/27. Find the network address, broadcast, first and last usable host, and how many hosts fit.

Way 1: The block size (magic number)

Think of mile markers. On a highway with a marker every 32 miles, if you're at mile 150, you passed marker 128 and the next one is 160. You're somewhere in the 128 stretch. The block size is how far apart the markers are.

  1. Block size = 256 minus the interesting octet of the mask.

    256 - 224 = 32. Subnets start at 0, 32, 64, 96, 128, 160, 192 and 224.

  2. Find the last marker at or below the address.

    150 is past 128 but not yet 160. Network: 172.25.61.128.

  3. The broadcast is one before the next marker.

    160 - 1 = 159. Broadcast: 172.25.61.159.

  4. Hosts sit in between.

    First .129, last .158, and 32 - 2 = 30 usable.

Markers every 32. The address 150 has passed 128 but not 160, so its block runs .128 to .159: network .128, broadcast .159.

Why does 256 minus the mask work? The mask octet is the switches that are on for the street. Whatever's left is room for houses. 224 is the 128, 64 and 32 switches; 256 - 224 leaves 32 addresses per block. You're just measuring the gap.

Way 2: Powers of 2

Think of folding a sheet of paper. Every fold doubles the number of pieces and halves each piece's size. Borrowing a bit is a fold.

  1. Count the host bits.

    32 - 27 = 5. Each block holds 25 = 32 addresses, so 30 usable hosts (25 - 2).

  2. Count the folds.

    Starting from a /24, a /27 borrows 3 bits. 23 = 8 subnets inside that /24.

  3. Find which piece the address is in.

    150 divided by 32 is 4 with some left over, so it's in piece number 4 (counting from 0). 4 x 32 = 128. Network: .128.

  4. Add the block and step back one.

    128 + 32 - 1 = 159. Broadcast: .159.

Under the hood, this is exactly what the bits are doing. 150 is 10010110. Keep the 3 network bits (100), set the 5 host bits to 0, and you get 10000000 = 128. Set the host bits to 1 instead: 10011111 = 159. Same answer, no shortcuts needed.

The two formulas

Subnets  = 2^(borrowed bits)
Hosts    = 2^(host bits) - 2

Borrowed bits are how far past the starting prefix you went. Host bits are 32 minus the prefix.

Powers worth knowing cold

2^1=2    2^2=4    2^3=8    2^4=16
2^5=32   2^6=64   2^7=128  2^8=256
2^9=512  2^10=1,024  2^11=2,048

Way 3: Build your own subnetting chart

Give it a shot first. Fill in as much of this chart as you can from what you already know, then press Check. Any row that's off gets a hint. Stuck? Show the finished chart fills it in and unlocks the how-to, the walk-through and the full cheat sheet below.

BUILD THE CHART
30 BLANKS

Fill in the blank cells, then press Check.

    🔒 Finish the chart above, or press Show the finished chart, to unlock how to build it, the walk-through and the full cheat sheet.

    The two special cases

    /31 has only 2 addresses. On a point-to-point link between two routers, both get used (RFC 3021), because there's nobody else on that wire to broadcast to. /32 is exactly one address, used for a single host route or a router's loopback. Don't apply the minus-two rule to either.

    Which method should you use?

    Block size is fastest once it's familiar. Powers of 2 shines on "how many subnets or hosts" questions. The chart is the safety net when you're nervous. Plenty of people build the chart on exam day and then use the block size method to read it.

    Quick check: solve 192.168.77.45/28 with whichever method you like, then check it with a second method. Did both land on the same broadcast?

    SUBNETTING, PART 3

    Find the Range, Then Work Backwards

    A ticket lands: "Camera at 172.25.61.150/27 won't come online. Is that even a valid address?" You already solved this one three ways, so let's turn it into the routine you'll use on every ticket. Try each blank in your head first, then tap it to check yourself.

    Step 3: Find the whole block

    Walk-through: 172.25.61.150/27

    1. Write the mask.

      /27 is 24 bits of 255, then 3 more switches (128 + 64 + 32). Mask:

    2. Find the interesting octet.

      The first one that isn't 255 is the

    3. Get the block size.

      256 - 224 = , so blocks start at 0, 32, 64, 96, 128, 160 ...

    4. Bracket the address.

      The address has 150 in that octet. Which two block starts does it fall between?

    5. Network address

      = the lower block start:

    6. Broadcast

      = the next block start minus 1:

    7. First and last usable

      = network + 1 and broadcast - 1:

    8. Next subnet

      = broadcast + 1:

    9. Networks in the /24

      = 23 (27 - 24 = 3 borrowed bits), or 256 ÷ 32 =

    10. Usable hosts

      = 25 - 2 =

    Back to the ticket: .150 sits comfortably between .129 and .158, so the address is valid. Time to look at the cable, the VLAN or the camera's gateway instead.

    The recipe, every time: mask, interesting octet, block size, bracket the address, then network, broadcast, first, last, next subnet and host count. Same moves for every prefix from /8 to /30.

    Crossing into the third octet

    Here's where people slip up: they assume subnetting only happens in the last octet. It doesn't, and the recipe doesn't care. Watch 10.140.37.200/21.

    Mask:          255.255.248.0     (interesting octet: 3rd, 248)
    Block size:    256 - 248 = 8     (third-octet blocks: 0, 8, 16, 24, 32, 40 ...)
    Bracket:       37 sits between 32 and 40
    Network:       10.140.32.0       (octets after the interesting one become 0)
    Broadcast:     10.140.39.255     (next block minus 1, octets after become 255)
    Usable:        10.140.32.1 to 10.140.39.254
    Next subnet:   10.140.40.0
    Hosts:         2^11 - 2 = 2,046  (32 - 21 = 11 host bits)

    The only new rule: once you've found the block in the interesting octet, every octet to its right is all zeros in the network address and all 255s in the broadcast. That also means an address like 10.140.33.0 is a perfectly normal host in this subnet. The prefix decides an address's role, never just its last number.

    Another way: stack the /24s

    True story: this method showed up at 3 in the morning. I don't dream much, but I woke up with the whole thing worked out and had to write it down before it vanished. Apparently my brain subnets on the night shift.

    If the block-size math feels abstract up here, try thinking in whole /24s instead. A /24 is one full network of 256 addresses. Every time you move one step down from /24, you double how many of those /24s get glued together.

    /241 network of 256
    /232 networks of 256
    /224 networks of 256
    /218 networks of 256
    /2016 networks of 256

    That count is your increment in the third octet. A /22 glues 4 together, so the networks go 0–3, 4–7, 8–11, 12–15, and so on.

    Build it literally. Here's a /23, one /24 at a time:

    1. Network one

      172.20.72.0 to 172.20.72.255

    2. Network two

      172.20.73.0 to 172.20.73.255

    3. first network address

      To combine them, pair the with the last broadcast address: 172.20.72.0 to 172.20.73.255. That's your /23.

    Finding the network address fast: take the third octet, divide it by your increment, drop the decimal, then multiply back by the increment.

    Address:     172.20.75.9/22    (/22 = 4 networks glued, increment 4)
    Divide:      75 / 4 = 18.75    (drop the decimal: 18)
    Multiply:    18 x 4 = 72
    Network:     172.20.72.0
    Broadcast:   172.20.75.255     (72 + 4 - 1 = 75, then .255)

    Same answer the block-size method gives you, just a different path to it. Use whichever one clicks.

    Step 4: Work backwards from what you need

    On the job, nobody hands you a prefix and asks for the range. They say "I need room for 50 laptops" or "I need 6 networks." So flip the formula around.

    "I need 50 hosts per subnet"

    1. Find the power of 2

      Find the smallest 2h - 2 that covers 50. 25 - 2 = 30, too small. 26 - 2 = 62, fits.

    2. Count the host bits

      So you need 6 host bits.

    3. /26

      Prefix = 32 - 6 = .

    Remember to count the gateway, printers and a little growth. 50 laptops today is 58 next spring.

    "I need 6 subnets from a /24"

    1. Borrow bits

      Each bit you borrow doubles the subnet count: 1 bit = 2, 2 bits = 4, 3 bits = 8.

    2. Pick the bit count

      3 bits is the first that covers 6 (with 2 spare).

    3. /27

      Prefix = 24 + 3 = : 8 subnets of 30 usable hosts each.

    Borrowing more bits than you need just shrinks every subnet for no reason.

    Exam angle: CompTIA loves "which is the smallest subnet that fits X hosts" and "which mask gives at least Y subnets." Write 2h - 2 for hosts and 2borrowed bits for subnets on your scratch paper before the timer starts.

    Quick check: what's the smallest subnet that fits 20 hosts, and how many usable addresses does it really have?

    YOUR TURN

    Subnetting Practice

    Two practice modes, both with fresh numbers every round. Range Finder gives you one address and prefix and asks for the whole block. VLSM Planner hands you a /24 and a list of groups to fit into it, largest first. Start with Range Finder on Level 1 and move up when it feels easy.

    1. Type into the boxes.

      Each address has four boxes. Press . or / to jump to the next box, or just keep typing; a box moves on after three digits.

    2. Press Enter

      to check. Press it again after a miss to open the steps, and again once you're done to load the next problem.

    3. Misses get hints, never the answer.

      The full walk-through opens on request, or by itself after a second miss on the same row.

    4. Scoring

      A round is clean only when every row is right on its first check and you didn't open the steps or show the answers.

    LAB: SUBNET PRACTICE
    Round 1Clean rounds: 0 / 0
    Find the whole block for-

    Fill in the rows, then press Check all (or Enter).

    Quick check: after five clean rounds on Level 1, try Level 2. What stays the same about the recipe, and what moves?

    PLANNING A REAL NETWORK

    VLSM and the Old Address Classes

    A growing office gets one block from headquarters: 172.20.48.0/22. They need four VLANs: Guest Wi-Fi for up to 400 devices, Sales with 200, security cameras with 50, and a point-to-point link to the main office router. Cut that /22 into four equal pieces and the router link alone would swallow 254 addresses. There's a better way.

    Loading picture…
    • VLSM (Variable Length Subnet Masking): each subnet gets the prefix that fits it, instead of one size for everyone.
    • Think sheet cake: the big table gets a big piece, the two folks at the side table get a small one, and the leftovers stay in one clean chunk for later.
    • The one rule: cut the biggest piece first, so every block lands on a clean boundary.
    VLSM plan for 172.20.48.0/22, largest first
    VLAN (need)Fits inSubnetUsable range
    Guest Wi-Fi (400)/23 = 510172.20.48.0/23172.20.48.1 to 172.20.49.254
    Sales (200)/24 = 254172.20.50.0/24172.20.50.1 to 172.20.50.254
    Cameras (50)/26 = 62172.20.51.0/26172.20.51.1 to 172.20.51.62
    Router link (2)/30 = 2172.20.51.64/30172.20.51.65 to 172.20.51.66
    Each row is one third-octet value. Guest Wi-Fi fills two rows (a /23), Sales fills one (a /24), and the cameras and the router link share the last row. 188 addresses are still free for future VLANs.

    Why largest first? Big blocks need big boundaries. A /23 can only start on an even third octet (48, 50, 52 ...). If you'd parked the cameras at 172.20.48.0 first, Guest Wi-Fi would have to skip ahead to 172.20.50.0, and you'd strand space you can't use. (A /31 would also work for the router link on gear that supports RFC 3021, saving two more addresses.)

    Moving left: one route for several networks

    • Route summarization (supernetting, aggregation) moves the line left: one route for several networks, so routers carry shorter tables. Headquarters reaches all four of this office’s VLANs with 172.20.48.0/22.
    • When it works: 10.88.12.0 through 10.88.15.0 summarize to 10.88.12.0/22. Moving 2 bits left covers 22 = 4 networks, and 12 is a multiple of 4.
    • When it doesn’t: 10.88.14.0 through 10.88.17.0 are four in a row, but 14 isn’t a multiple of 4: two /23s, 10.88.14.0/23 and 10.88.16.0/23. Forcing a /22 would grab someone else’s networks.

    Address classes: history you still need to recognize

    Before CIDR arrived in 1993, the first octet decided the mask for you. That was called classful addressing, and it wasted addresses on a huge scale. Today everything is classless: the prefix is written out, and a 10.x address can live in a /27 just fine. Still, the exam expects you to know the old classes and their default masks.

    Class A
    11111111255
    000000000
    000000000
    000000000
    Class B
    11111111255
    11111111255
    000000000
    000000000
    Class C
    11111111255
    11111111255
    11111111255
    000000000
    The old default masks are just 8, 16 or 24 switches on in a row: /8, /16 and /24. CIDR lets that line sit anywhere.
    Legacy IPv4 address classes
    ClassFirst octetOld default maskUsed for
    A1 to 126/8 (255.0.0.0)Very large networks (127 is set aside for loopback)
    B128 to 191/16 (255.255.0.0)Medium networks
    C192 to 223/24 (255.255.255.0)Small networks
    D224 to 239noneMulticast groups
    E240 to 255noneExperimental, reserved
    Exam angle: if a question gives you a prefix, use the prefix. Classes only matter when the question asks about classes by name. "It starts with 10, so it's a /8" is the classic trap.

    Quick check: the office adds a printer VLAN with 20 devices. Which prefix fits it, and where in the free space could that block start?

    WHO CAN SEE THIS ADDRESS?

    Private, Public and Special Addresses

    A user reads you their address over the phone: 172.27.4.15. Is that inside the office, out on the internet, or something special? Once you know a handful of ranges, you'll answer that in about two seconds.

    Loading picture…
    • Private = apartment numbers: “4B” means something inside the building and nothing to the post office. Every building can reuse them, because they never travel out onto the public street.
    • Public = the building’s street address: unique on the whole internet. Routers out there drop private addresses, so only public ones travel the open road.
    • NAT = the front desk: network address translation swaps your apartment number for the building’s street address on the way out, and back again on replies.
    RFC 1918Private addressing

    Private: the apartment numbers

    Plain meaning: Three blocks, reserved by RFC 1918, reusable by anyone.

    The blocks
    10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16.
    Where they work
    Internet routers won't carry them, so they only work inside your network.
    Exam angle
    Know the exact edges. The 172 block only covers 172.16 through 172.31, so 172.15.x.x and 172.32.x.x are not private.

    Remember: know the exact edges, especially 172.16 through 172.31.

    PublicPublic addressing

    Public: the street address

    Plain meaning: Globally unique and routable on the internet, handed out through providers.

    What it promises
    A public address tells you where something is, not that it will answer. Routes, firewalls and the service itself still decide that.
    Watch out
    Not every address outside RFC 1918 is public. The special ranges below have their own jobs.

    Remember: public means reachable by location, not guaranteed to answer.

    NAT / PATTranslation

    NAT: the front desk

    Plain meaning: NAT rewrites addresses as traffic crosses the router.

    PAT
    PAT (port address translation, sometimes called NAT overload) is the version in almost every home and office: dozens of inside devices share one public address, and the router keeps them apart by tracking port numbers.
    Keep in mind
    NAT isn't encryption and isn't a firewall policy. It also can't fix a wrong mask or gateway on the PC.
    Inside               Outside (PAT)
    192.168.1.20:51515 -> 203.0.113.7:40001
    192.168.1.21:51515 -> 203.0.113.7:40002

    Remember: with PAT, many inside devices share one public address, told apart by port numbers.

    The special-use ranges

    Address ranges worth recognizing
    RangeNameWhat it means for you
    10.0.0.0 - 10.255.255.255Private /8Anything starting with 10 is private.
    172.16.0.0 - 172.31.255.255Private /12Only second octets 16 through 31.
    192.168.0.0 - 192.168.255.255Private /16The first two octets must be 192.168.
    127.0.0.0/8LoopbackTalks to itself. ping 127.0.0.1 tests the PC's own TCP/IP stack, not the cable or the internet.
    169.254.0.0/16APIPA (link-local)Automatic Private IP Addressing: what Windows gives itself when no DHCP server answers. It can reach neighbors, never the internet.
    100.64.0.0/10Shared address spaceUsed by providers for carrier-grade NAT. Not RFC 1918, and not public.
    192.0.2.0/24
    198.51.100.0/24
    203.0.113.0/24
    DocumentationSet aside for examples in manuals and guides, never real hosts.
    224.0.0.0/4Multicast224 through 239: addresses a group, not one host.

    One, all, some: unicast, broadcast, multicast

    Addresses also tell you who a message is for. Back to the neighborhood:

    IPv4 delivery types
    TypeNeighborhood versionOn the network
    UnicastA letter to one houseOne sender, one receiver. Almost all your traffic.
    BroadcastThe neighborhood loudspeakerEvery device on the subnet hears it (the all-host-bits-1 address, or 255.255.255.255). Routers don't pass it to other subnets. DHCP Discover and ARP requests use it.
    MulticastA club newsletterOnly devices that joined the group get it (224.0.0.0/4). Think video streams and routing protocol updates.
    AnycastThe nearest branch of a chain storeSeveral servers share one address and the network delivers to the closest one. Common for big DNS services.

    Before the drill: check the three private blocks first, then the special ranges. If neither matches, it's public. The public examples here are a hand-picked set, not a full registry lookup.

    MODULE: ADDRESS SCOPE RECOGNITION
    PRIVATE_OR_PUBLIC: ACTIVE

    Current challenge: classify the address below.

    -

    ITEM: 1 of 50
    FIRST-TRY SCORE: 0 / 0
    STATUS: AWAITING INPUT
    > Awaiting classification.

    Quick check: is 172.32.4.8 private? What one number tells you?

    THE POST OFFICE

    Local or Remote? The Default Gateway

    You print to the printer ten feet away, then open a website hosted three states over. Your PC handles those two jobs completely differently, and it makes the call before it sends a single bit.

    Loading picture…
    • Your own street? Walk it over. Same network portion: the PC delivers directly.
    • Anywhere else? The post office. The default gateway is the router that takes anything leaving your neighborhood.
    • How the PC decides: it uses its own mask to compare network portions. Same: local. Different: remote, hand it to the gateway.
    1. PC: 10.72.18.40/24Its street is 10.72.18.0/24.
    2. Destination 10.72.18.12Same street. The PC uses ARP to find that device's MAC address and delivers it directly.
    3. Destination 10.72.90.12Different street. The PC uses ARP to find the gateway's MAC address and hands the packet to the router.
    Here's the part that trips people up: the frame is addressed to the gateway's MAC, but the IP packet inside still names the far-away destination. The post office reads the envelope; it doesn't rewrite it. (NAT at the edge is the one exception, and that's a separate job.)

    DNS answers a different question

    DNS turns a name into an IP address. It's the phone book, not the post office. If you can reach a site by its IP but not by name, look at DNS, not the gateway.

    DHCP hands out the settings

    Normally DHCP leases the address and supplies the mask, gateway and DNS server. With a static setup, you type them yourself, which is exactly where typos sneak in.

    Quick check: wrong gateway, can you still print to the printer down the hall?

    Think about whether a letter to your own street ever visits the post office.

    FOUR SETTINGS

    Repair a Host Configuration

    A static IP that's off by one digit looks perfectly reasonable on screen. Every host needs four settings right, and each wrong one breaks something different. Learn the pattern and you can often name the bad setting from the symptom alone.

    Host configuration settings and symptoms
    SettingIts jobWhen it's wrong
    IP addressThe house number.A duplicate causes an IP conflict. One from another street can't reach its neighbors or the gateway.
    Subnet maskThe line between street and house.Some neighbors become unreachable, or remote traffic gets treated as local.
    Default gatewayThe post office.Local works, everything remote fails.
    DNS serverThe phone book.IP addresses work, names don't.

    How to repair each scenario: read the assigned subnet and prefix, work out the usable range, pick an unused host address in it, set the matching mask, then enter the assigned gateway and DNS server. This checks the fictional settings only; it doesn't probe a real network.

    MODULE: CONFIG VALIDATION
    HOST_CHECKER: READY

    Repair the workstation so it matches the assigned settings below.

    FIRST-TRY SCORE: 0 / 0
    TARGET SUBNET: -
    ASSIGNED CIDR: -
    TARGET GATEWAY: -
    ASSIGNED DNS: -
    > Analyze and repair the provided configuration. More than one field may be wrong.
    ON THE JOB

    Troubleshoot in a Useful Order

    Thursday, 2:15 PM. A user at a new desk says, "I can print, but the internet is gone." Someone set a static address on that PC last week. Before you touch a thing, notice what that one sentence already told you: local works and remote doesn't. The address and mask are probably close. The gateway is suspect number one.

    Loading picture…
    • 169.254.x.x on the PC? That’s APIPA: it asked DHCP and nobody answered. Check the link and the DHCP path before any math.
    • 127.0.0.1 answers? Loopback proves the PC’s own TCP/IP stack works. It says nothing about the cable.
    • Static or dynamic? Static settings were typed in by hand, which is exactly where a wrong gateway sneaks in.

    Work from the bottom up, the same way every time. Each test proves one layer, so the next test actually means something.

    1. Check the link.

      Cable, Wi-Fi association, link lights and VLAN come before any math.

    2. Read the settings.

      On Windows, ipconfig /all shows the address, mask, gateway, DNS and whether DHCP supplied them. Compare them with what that subnet should have.

    3. Test local, then remote.

      Ping the gateway, then a known remote IP. One missing ping reply isn't proof of failure; some devices filter ICMP.

    4. Test names separately.

      If IPs work but names don't, check the DNS setting and run nslookup.

    5. Check routes and policy.

      If the math checks out, look at the routing table, firewall rules, VLANs and the destination service itself.

    What each test proves

    1. Loopback

      The PC's own TCP/IP stack works. Says nothing about the cable.ping 127.0.0.1

    2. Settings

      Address, mask, gateway, DNS and whether DHCP supplied them.ipconfig /all

    3. Local hop

      The link, address and mask work far enough to reach the gateway.ping <gateway>

    4. Remote path

      Routing beyond the gateway works; tracert shows where it stops.ping <remote IP> · tracert

    5. Names

      DNS turns names into addresses for this PC.nslookup <name>

    Each test leans on the one before it. If one fails, stop and fix that layer before running the next. A missing ping reply can just mean ICMP is filtered.

    The routing table and default routes

    Routing tableRouting

    Read the routing table

    Plain meaning: Every host keeps a list of "for this network, go this way."

    Where to see it
    Windows shows it with route print (Linux uses ip route; routers use show route).
    How it picks
    The most specific match wins. The default route, 0.0.0.0/0, points at the gateway and only gets used when nothing more specific matches.
    On the job
    A leftover static route, often from an old VPN, can send one network the wrong way while everything else works. Remove it with route delete, and use route add ... -p only for routes that should survive a reboot.
    route delete 10.50.0.0
    route add 10.50.0.0 mask 255.255.0.0 192.168.1.254 -p

    Remember: the most specific match wins; the default route is the last resort.

    Default routesRouting

    One default route, not two

    Plain meaning: No gateway means no default route: local works, remote fails.

    The opposite problem
    Plug in a second adapter or connect a VPN, and you can end up with two 0.0.0.0/0 routes competing, so internet access flips on and off.
    Check it
    Look for more than one 0.0.0.0 line in route print.
    The fix
    Remove the gateway from the adapter that shouldn't carry internet traffic, or adjust the interface metric so the right one wins.
    Destination  Gateway      Metric
    0.0.0.0      192.168.1.1  25
    0.0.0.0      10.8.0.1     35

    Remember: two 0.0.0.0 lines can mean internet access that flips on and off.

    Symptom, cause, check, fix

    This table covers the IPv4 addressing and routing symptoms in the A+ 220-1201 and Network+ N10-009 troubleshooting objectives. Read across each row: the symptom points to a likely cause, the check proves it, and only then do you apply the fix.

    IPv4 troubleshooting: symptom, likely cause, check first, fix
    SymptomLikely causeCheck firstFix
    Local devices work, remote destinations failN10-009 5.3 incorrect default gatewayGateway missing, mistyped or outside the host's subnetipconfig /all; ping the gatewayEnter the correct gateway address from the host's own subnet
    Some local hosts answer, others don't; or local traffic is sent to the gatewayN10-009 5.3 incorrect subnet maskMask doesn't match the subnet designipconfig /all; work out the network and range from the maskSet the mask that matches the subnet, the same as its neighbors
    Static host reaches nothing at allN10-009 5.3 incorrect IP addressAddress in the wrong subnet, or the subnet's network or broadcast addressipconfig /all against the subnet's usable rangeChoose an unused host address inside the range
    "IP address conflict" warning, or a connection that drops in and outN10-009 5.3 duplicate IP address · A+ 5.5 intermittent internet connectivityTwo devices configured with the same addressping the address, then arp -a to see which MAC answersGive one device a different unused address; keep statics out of the DHCP pool
    Address is 169.254.x.xA+ 5.5 limited connectivityNo DHCP lease (APIPA)Link and VLAN, then ipconfig /renewFix the link or VLAN, then work the DHCP path
    Address belongs to a different subnet than the user's teamN10-009 5.3 incorrect VLAN assignmentSwitch port in the wrong VLANshow vlan on the switchMove the port to the right VLAN, then renew
    Subnet ran out of addresses after new devices were addedN10-009 1.7 subnetting · VLSMPrefix too long for the number of hosts (for example a /27 for 40 devices)Count devices, then compare with 2h - 2 for the prefixRe-plan with a shorter prefix (here a /26) or split the group across subnets
    One remote network is unreachable while everything else worksN10-009 5.3 routing tableA stale or wrong static route sends that network the wrong wayroute print; tracert to see where the path stopsroute delete the bad entry, or correct it (add -p only for routes that should persist)
    Remote access fails or flips on and off after adding a second adapter or VPNN10-009 5.3 default routesMissing default route, or two 0.0.0.0/0 routes competingroute print (look for 0.0.0.0 entries); show route on a routerKeep one default route: remove the extra gateway or adjust the metric
    IP addresses work, names don'tDNS server setting wrong or unreachablenslookup a name; ipconfig /allCorrect the DNS server setting (see DNS Deep Dive)
    Gateway doesn't answer ping, but browsing worksICMP filtered on the gateway, not a failureTest a remote IP or a service insteadNothing to fix; don't rely on one ping
    Everyone loses internet, but the LAN still worksProblem at or beyond the gateway: router, NAT or the provider linkping the gateway, then a known remote IP; tracertFix the router or NAT configuration, or escalate to the provider
    Exam angle: N10-009 objective 5.3 lists incorrect IP address, duplicate IP address, incorrect subnet mask, incorrect default gateway, routing table and default routes. Match the symptom to the setting: local OK and remote dead points at the gateway; some local hosts dead points at the mask.

    Quick check: back to Thursday. ipconfig /all shows 172.17.22.37/24 with a gateway of 172.17.2.1. Without running a single command, which setting do you fix, and what tells you so?

    Latched Ethernet patch cable between a laptop jack and switch with illuminated link LEDs.
    Generated physical-link example. Link/activity LEDs are a clue about the local connection; they do not prove addressing, DNS or end-to-end connectivity.

    BB Mission Check

    Time to put it together. Start with a quick warm-up on address roles, then fourteen questions that mix ranges, subnetting, NAT and troubleshooting, then a queue of help desk tickets. Each question gets one pick: a miss is marked wrong, and the debrief shows the right answer and why.

    Warm-up: network, broadcast or usable host?

    How it works: each item gives you an address and its subnet. Find the block's start and end first. The start is the network address, the end is the broadcast, and anything strictly between is a usable host. You get one pick per item, and a miss shows the right role and why. Go as far as you like; the questions below don't depend on it.

    WARM-UP: ADDRESS ROLES
    RANGE_JUDGE: ACTIVE

    Current challenge: what role does this address play?

    -

    Subnet: -

    ITEM: 1 of 50
    FIRST-TRY SCORE: 0 / 0
    BLOCK SIZE: N/A
    > Awaiting classification.

    Part 1: Fourteen quick questions

    Final Readiness Check

    IPv4 Operations Review

    Score: 0 / 14
    Question 01

    Which of these is an RFC 1918 private address?

    Question 02

    A laptop shows 169.254.31.7 and can't reach anything past its own desk. What happened?

    Question 03

    How many usable host addresses does a /27 subnet have?

    Question 04

    What is the broadcast address of 10.81.6.0/26?

    Question 05

    With a mask of 255.255.255.240, how far apart are the subnets in the fourth octet?

    Question 06

    A subnet needs room for 50 hosts and should waste as few addresses as possible. Which prefix do you pick?

    Question 07

    A PC is set to 192.168.130.70/26 with a default gateway of 192.168.130.1. It prints to a nearby printer, but nothing on the internet loads. What's wrong?

    Question 08

    What does a successful ping to 127.0.0.1 prove?

    Question 09

    Forty office PCs reach the internet through one public IPv4 address. Which feature keeps their conversations apart?

    Question 10

    Under the old classful system, an address starting with 150 belonged to which class?

    Question 11

    An ARP request needs to reach every device on the local subnet at once. What type of delivery does it use?

    Question 12

    You need to split 172.16.48.0/24 into 12 equal subnets, each as large as possible. Which prefix do you use?

    Question 13

    You're planning a VLSM layout for one /24. Which subnet do you place first?

    Question 14

    In the subnet 10.12.8.0/21, what role does 10.12.9.0 play?

    Part 2: Work the help desk (IPv4 tickets)

    Your turn at the desk. Each ticket gives you the settings or the pattern you need, so do the math before you pick. You get one pick per ticket: a wrong pick is marked wrong, and the notes show the right move and why.

    Help Desk Queue: IPv4 tickets
    Read the numbers in each ticket carefully. Only your first try on each ticket counts toward the score.
    INC-00000OpenP2

    Loading ticket...

    Requester
    Department
    Category
    Assigned to
    You (Tier 1)
    Message from the user

    Your call

    Choose your action

    Work notes will appear here once you choose an action.
    First-try score: 0 / 0

    IPv4: key takeaways

    • An IPv4 address is 32 bits in four octets. The prefix (or mask) is the line between the network part (the street) and the host part (the house).
    • Private ranges are 10.0.0.0/8, 172.16.0.0/12 (172.16 to 172.31 only) and 192.168.0.0/16. NAT/PAT swaps them for a public address on the way out.
    • 127.0.0.0/8 is loopback, 169.254.0.0/16 is APIPA (no DHCP lease), and 224.0.0.0/4 is multicast.
    • Usable hosts = 2h - 2, where h = 32 minus the prefix. /31 links and /32 host routes are the exceptions.
    • Block size = 256 minus the mask value in the interesting octet (the first octet that isn't 255). Subnets start at multiples of the block size.
    • The network address has all host bits 0, the broadcast has all host bits 1, and the prefix (not the last octet) decides which is which.
    • Working backwards: pick the smallest 2h - 2 that fits the hosts, or borrow enough bits that 2bits covers the subnets. With VLSM, carve the largest subnet first.
    • A host uses its mask to decide local or remote; remote traffic goes to a default gateway on its own subnet.

    Common mistakes

    • Treating every address ending in .0 as a network address.
    • Calling a /30 "big" because the number is big. Bigger prefix, smaller subnet.
    • Choosing a gateway outside the host's own subnet.
    • Applying the minus-two rule to /31 and /32.

    What about IPv6? It gets its own module, IPv6 Operations, coming soon. Everything on this page is IPv4 only.

    Study next

    Technical references: Private addressing / RFC 1918, CIDR / RFC 4632, /31 links / RFC 3021, and the IANA special-purpose registry.

    Cheat Sheet

    The whole lesson on one page. Keep it open while you review, or print it.

    Loading cheat sheet…

    LAT: 0000
    LON: 0000
    DEP: 0000