Internet Utility

Beginner's Guide to IP Addresses, Subnets, and DNS Basics

A mistyped digit cost one colleague two hours chasing a "broken" printer. This beginner's guide makes IP addresses, subnets, and DNS finally click—no prior networking knowledge needed.

Beginner's Guide to IP Addresses, Subnets, and DNS Basics

IP addresses, subnets, and DNS: a beginner's guide that actually makes sense

A colleague once spent two hours chasing a "broken" printer. The printer was fine. Its IP address had been typed into the router's static table with the wrong last digit, so the device sat on the network like a stranger at a party nobody would talk to. Two hours, one digit.

That story is why I care about the fundamentals. Most network problems aren't exotic. They're a subnet mask off by one, a gateway pointing nowhere, or a DNS record that never propagated. If you understand how an IP address, a subnet, and a DNS record fit together, you'll solve in ten minutes what used to take an afternoon.

This guide starts from zero. No prior networking knowledge required. By the end, you'll read 192.168.1.0/24 without flinching, split it into four subnets by hand, and understand why your browser reaches google.com when all it really speaks is numbers.

Key Takeaways

  • An IP address has two jobs: identify a device and locate it on a network.
  • A subnet mask (or CIDR prefix) tells you which part of the address is the network and which part is the device.
  • Subnetting is just borrowing bits from the host portion to create more networks.
  • DNS is the phone book: it turns human names into IP addresses, and it caches aggressively, which is why changes feel slow.
  • IPv6 doesn't use NAT the way IPv4 does—every device can have a real, routable address.
  • Four commands—ping, traceroute, nslookup, and ipcalc—will diagnose most beginner mistakes.

What an IP address really is (and why it has two parts)

An IPv4 address is 32 bits written as four numbers between 0 and 255, separated by dots. That's it. The familiar 192.168.0.10 is nothing more than a compact way to write a binary string that would otherwise look like a wall of ones and zeros.

What an IP address really is (and why it has two parts)

Here's the part beginners skip, and it's the part that matters: every IP address is split into a network portion and a host portion. The network portion answers "which neighborhood?" The host portion answers "which house?" Without a mask to separate them, the address is ambiguous.

IPv4 vs IPv6: the short version

IPv4 gives us roughly 4.3 billion addresses. That sounded infinite in the 1980s. It isn't. We ran out of fresh IPv4 blocks years ago, and the workarounds (NAT, address recycling) are the reason your home router hands out private addresses like 192.168.x.x instead of real public ones.

IPv6 fixes this with 128-bit addresses. Written in hexadecimal, something like 2001:0db8:85a3::8a2e:0370:7334. The practical differences you'll notice:

  • No NAT required—every device can hold a globally routable address.
  • Addresses are longer, but the :: shorthand collapses runs of zeros.
  • Subnets are almost always /64, which leaves 64 bits for hosts. That's more addresses per subnet than the entire IPv4 internet.
  • Auto-configuration is built in, so devices can assign themselves an address without a DHCP server.

Don't panic about memorizing IPv6 notation. Understand the concept, and you'll pick up the syntax in an afternoon of practice.

Subnet masks and CIDR: reading the shorthand

A subnet mask is a second 32-bit number that marks where the network part ends. Written in binary, it's a run of ones followed by a run of zeros. The ones cover the network; the zeros cover the hosts.

Subnet masks and CIDR: reading the shorthand

The mask 255.255.255.0 in binary is twenty-four ones followed by eight zeros. That's why we write it as /24. CIDR notation just counts the ones. Clean, portable, and much easier to read than a dotted mask once it clicks.

CIDRSubnet maskTotal addressesUsable hosts
/24255.255.255.0256254
/25255.255.255.128128126
/26255.255.255.1926462
/27255.255.255.2243230
/28255.255.255.2401614

Why do two addresses always disappear?

Every subnet reserves its first address for the network itself and its last for the broadcast. Neither can be assigned to a device. A /24 gives you 256 total addresses but only 254 usable hosts. A /30 gives you four addresses and exactly two usable ones—which is why point-to-point links between routers often use it.

I've watched more than one junior engineer budget a /30 for a small office, then discover they have zero addresses left after the router and the switch. Count carefully before you hand out ranges.

Subnetting step by step: split a /24 into four networks

Let's do this properly. Take 192.168.1.0/24 and carve it into four equal subnets. You need two extra bits (2² = 4), so the prefix moves from /24 to /26. Each subnet gets 64 addresses, leaving 62 for hosts.

Subnetting step by step: split a /24 into four networks

Here's the full breakdown:

  1. Subnet 1: network 192.168.1.0, hosts .1 to .62, broadcast .63
  2. Subnet 2: network 192.168.1.64, hosts .65 to .126, broadcast .127
  3. Subnet 3: network 192.168.1.128, hosts .129 to .190, broadcast .191
  4. Subnet 4: network 192.168.1.192, hosts .193 to .254, broadcast .255

Notice the pattern: subnets always start on a multiple of their size. A /26 starts on multiples of 64 (0, 64, 128, 192). That single rule—block size equals the number of addresses—solves the majority of subnetting questions you'll encounter.

The formula worth memorizing: 2^(bits borrowed) = number of subnets, and 2^(host bits) - 2 = usable hosts. That's the whole game. Everything else is arithmetic.

How do you get better at subnetting?

Practice with numbers that don't divide evenly. Anyone can split a /24 into four pieces. Try splitting 10.0.0.0/22 into six subnets, or figure out the host range for 172.16.5.0/27. The awkward ones expose whether you actually understand the block-size rule or just memorized a table.

Run your answers through ipcalc on Linux or an online subnet calculator. When your mental math matches the tool, you know you've got it.

DNS: turning names into numbers

You type example.com into a browser. The browser, which speaks only IP addresses, has no idea what that means. DNS is the translation layer—and it works in a chain of queries rather than one lookup.

When you request a domain, your device asks a recursive resolver (often your ISP's, or a public one like 1.1.1.1). The resolver, if it doesn't have the answer cached, walks the hierarchy: root servers, then the top-level domain (.com), then the domain's own authoritative nameservers. Each step returns a pointer to the next, until finally an A record (IPv4) or AAAA record (IPv6) comes back with the address.

The record types that matter

  • A — domain to IPv4 address
  • AAAA — domain to IPv6 address
  • CNAME — alias pointing one name to another
  • MX — mail server routing
  • TXT — free-form text, commonly used for domain verification and email security policies

Why does my DNS change take so long to show up?

Because of caching. Resolvers hold onto answers for a period set by the record's TTL (time to live). If your TTL is 3600 seconds, resolvers may serve a stale answer for up to an hour after you've changed the record on the server.

Here's a trick I use before any migration: lower the TTL to 300 seconds a day or two ahead. Then, when you flip the record, propagation feels nearly instant instead of dragging through an afternoon of "is it working yet?"

Common beginner mistakes (and how to spot them fast)

Most "the network is down" incidents come down to a handful of causes. I've tripped over all of them.

  • Wrong gateway. The device can reach its own subnet but nothing beyond it. ping the gateway first.
  • IP conflict. Two devices share an address, and both lose connectivity intermittently. The classic culprit is a manually assigned address inside a DHCP pool.
  • Overlapping subnets. Two networks claim the same range, and routing breaks in confusing, half-working ways.
  • Bad DNS. Names fail but IP addresses work fine. That asymmetry is a dead giveaway.
  • Mask mismatch. One device thinks the network is /24, its neighbor thinks /25. They can't agree on who's local.

Which commands diagnose these problems?

ping checks reachability. traceroute shows where packets stop along the path. nslookup or dig queries DNS directly, bypassing the browser. ipcalc validates your subnet math before you commit it. Four commands, and you'll resolve the vast majority of beginner-level issues without touching a network diagram.

Putting it together: a network you can reason about

Start thinking in layers. The IP address locates a device. The subnet mask defines the boundaries of its neighborhood. The gateway is the door out. DNS is the directory that saves you from memorizing numbers.

Once you see those four pieces as one system, subnetting stops being arithmetic homework and becomes a design decision. How many devices per floor? How much room for growth? Where does the guest network need to be isolated from the servers? Those questions answer themselves once you can read the notation fluently.

The one-digit typo that cost my colleague two hours? A solid grasp of the fundamentals would have caught it in the first minute. That's the real payoff here—not passing a certification exam, but never again losing an afternoon to a number you could have checked with a single command.

Yvonne Vaughan

Yvonne Vaughan

Yvonne Vaughan is a recognized expert in machine learning, data visualization, big data analytics, and artificial intelligence. With a passion for turning complex data into actionable insights, she has helped organizations across various industries harness the power of AI and analytics to drive innovation and strategic growth. Her work focuses on making advanced technologies accessible and impactful for decision-makers at all levels.

See all articles →

Related articles