IP Addresses Explained: IPv4 and IPv6

A plain-language guide to IP addresses for beginners: what they are, how IPv4 and IPv6 differ, public vs private IPs, and how DNS connects names to numbers.

Published September 15, 20268 min readBy ACY Partner Indonesia
IP Addresses Explained cover with sample IPv4 and IPv6 values
300 × 250Ad Space AvailablePlace your ad here

Every time you open a website, send a message, or load an app, your device quietly finds another machine somewhere in the world and starts talking to it. That “finding” step relies on something simple but easy to overlook: the IP address. It is the number that tells the network exactly where a machine lives.

You do not need to be a network engineer to understand it. In this guide we will keep the math out of the way and focus on the ideas: what an IP address actually is, why there are two versions (IPv4 and IPv6), the difference between public and private addresses, and how names like example.com end up pointing at these numbers.

What an IP address really is

Think of the internet as an enormous postal system. If you want a package delivered, you need an address — a precise location the delivery service can route to. On a network, an IP address plays that exact role. It is the unique location of a device so that data knows where to go and where to come back to.

The “IP” stands for Internet Protocol, which is just the agreed set of rules that machines use to address and route data across networks. When your laptop asks a web server for a page, both sides are identified by IP addresses. The request travels out to the server’s address, and the reply finds its way back to yours.

A useful mental picture:

   Your device                         Web server
  ┌───────────┐      request      ┌─────────────────┐
  │ 203.0.113.5│ ───────────────▶ │   198.51.100.20 │
  │           │ ◀─────────────── │                 │
  └───────────┘      response     └─────────────────┘
        ▲   each side is found by its IP address   ▲

Without addresses, the network would have no idea where to send anything. The IP address is what makes “send this data to that machine, not any of the billions of others” possible.

An address, not a name

An IP address identifies a machine on the network. It is not the same thing as a domain name like acy-partner.com. The name is for humans; the IP address is what the network actually uses. We will connect the two later.

IPv4: the familiar four numbers

The version most people have seen is IPv4. It looks like four numbers separated by dots, each between 0 and 255:

192.0.2.1
203.0.113.5
198.51.100.20

This format is called dotted-decimal notation. Behind the scenes, an IPv4 address is a 32-bit number, which is a fancy way of saying it is built from 32 on/off switches. That gives roughly 4.3 billion possible addresses.

When IPv4 was designed decades ago, 4.3 billion sounded limitless. Today it is not. Phones, laptops, servers, smart TVs, sensors, and countless other devices all want to be online at once, and the world has essentially run out of fresh IPv4 addresses to hand out. This shortage is the main reason a newer version exists.

Why 255 is the magic number

Each of the four parts of an IPv4 address holds 8 bits. Eight on/off switches can represent 256 different values, from 0 to 255. That is why you never see a part larger than 255 in a valid IPv4 address.

IPv6: a much bigger pool

IPv6 is the successor built to solve the shortage. Instead of 32 bits, it uses 128 bits, written as eight groups of hexadecimal (base-16) digits separated by colons:

2001:0db8:85a3:0000:0000:8a2e:0370:7334

That looks intimidating, so IPv6 has shortcuts to make addresses shorter. Leading zeros in a group can be dropped, and one run of all-zero groups can be collapsed to ::. The address above can be written more compactly:

2001:db8:85a3::8a2e:370:7334

You may also meet two short addresses often:

  • ::1 — the IPv6 way of saying “this machine itself” (the loopback address).
  • :: — all zeros, used as a placeholder meaning “any address”.

The headline feature of IPv6 is scale. Where IPv4 offers about 4.3 billion addresses, IPv6 offers a number so large it is hard to picture — enough to give every device on Earth its own address many times over, with room to spare for decades.

Feature IPv4 IPv6
Size 32 bits 128 bits
Looks like 192.0.2.1 2001:db8::7334
Notation Dotted decimal Colon-separated hex
Total addresses ~4.3 billion Astronomically large
Status In use, exhausted Rolling out, the future

The two versions coexist today. Most networks and operating systems support both, and a lot of the internet still leans heavily on IPv4, so you will keep seeing both formats for a long time.

Public vs private IP addresses

Not every IP address is reachable from the open internet. Addresses fall into two broad camps, and knowing the difference clears up a lot of confusion.

A public IP address is unique across the whole internet and can be reached from anywhere. A web server hosting blog.acy-partner.com needs a public address so visitors around the world can find it.

A private IP address is used inside a local network — your home Wi-Fi, an office, a data center — and is not directly reachable from the outside. Certain ranges are reserved for private use, and you will see them constantly:

10.0.0.0     to  10.255.255.255
172.16.0.0   to  172.31.255.255
192.168.0.0  to  192.168.255.255

If you check your laptop’s address at home and see something like 192.168.1.42, that is a private address. Your router holds one public address shared by everyone in the house, and it translates between the private devices inside and the public internet outside. This sharing trick is a big part of why IPv4 has survived the address shortage as long as it has.

Same private address, different networks

Private ranges can be reused freely. The 192.168.1.10 on your home network and the 192.168.1.10 in an office across town are completely separate machines. Private addresses only mean something inside their own local network.

How DNS connects names to numbers

Here is the catch: IP addresses do the real work, but nobody wants to memorize 198.51.100.20 to visit a website. People remember names like acy-partner.com. Something has to translate the friendly name into the number the network needs.

That something is DNS, the Domain Name System. It works like a phone book for the internet: you give it a name, and it gives you back the matching IP address.

The flow looks roughly like this:

You type:   blog.acy-partner.com


   DNS lookup  ──▶  returns:  198.51.100.20  (an IP address)


   Your device connects to 198.51.100.20 and loads the page

So every web request quietly has two stages. First, a name is turned into an IP address through DNS. Second, the actual connection happens using that address. You only ever type the name; the number lookup happens in the background, usually in a few milliseconds.

This is also why a website can change servers without changing its name. The owner simply points the DNS record at a new IP address, and visitors keep using the same familiar domain. The name stays put; the number behind it can move.

One name, both versions

DNS can return an IPv4 address, an IPv6 address, or both for the same name. Your device picks whichever it can use. This is part of how the internet quietly shifts toward IPv6 without breaking anything for ordinary users.

Where this matters for you as a developer

You will run into IP addresses far more often than you might expect, even on the web side of things. When you run a local server, you will see localhost, which maps to 127.0.0.1 in IPv4 or ::1 in IPv6 — both meaning “my own machine”. When you configure a domain to point at your hosting, you are editing DNS records that hold IP addresses. When you read server logs, each visitor shows up by IP address.

You rarely need to do subnet math or memorize ranges. What helps day to day is the mental model: a name gets resolved to an address, the address identifies a machine, and a connection is made to that machine — often on a specific port, which is the next layer of detail. If you want to go one level deeper into how addresses and ports work together on the server side, the companion piece IP Addresses and Ports (server) picks up exactly there.

Recap

Let’s pull the threads together:

  • An IP address is the numeric location of a machine on a network — the address that lets data find its way there and back.
  • IPv4 uses four numbers like 192.0.2.1, offers about 4.3 billion addresses, and has effectively run out.
  • IPv6 uses longer hexadecimal addresses like 2001:db8::7334, with an enormous pool meant to last well into the future; both versions are in use today.
  • Public addresses are reachable across the internet; private addresses (like 192.168.x.x) live inside local networks and are reused everywhere.
  • DNS is the translator that turns human-friendly names into the IP addresses the network actually uses.

Once these pieces click, the rest of networking gets easier. A natural next step is to look at how DNS records are structured, or how addresses pair with ports to reach a specific service on a machine — both build directly on the foundation you now have.

Tags:ip addressipv4ipv6dnsnetworkingweb fundamentals
728 × 90Ad Space AvailablePlace your ad here

Related Articles

See All Articles

You Might Also Like

Browser compatibility and polyfills cover with code chip if not supported, polyfill
Web Fundamentals / Browsers

Browser Compatibility and Polyfills

Why the same web page can look or behave differently across browsers, and how feature support, progressive enhancement, polyfills, and transpilers help your site work everywhere.

Sep 15, 20269 min read
An Intro to Browser Developer Tools — ACY Partner Indonesia Blog
Web Fundamentals / Browsers

An Intro to Browser Developer Tools

Every browser hides a powerful toolkit behind one key. Meet DevTools and its main panels, and learn how they let you see the DOM, styles, network requests, and storage for yourself.

Sep 15, 202610 min read
Browser Security Basics cover with a same-origin shield code chip
Web Fundamentals / Browsers

Browser Security Basics: How Your Browser Quietly Protects You

A friendly, beginner-first tour of how your browser keeps you safe: the same-origin policy, tab sandboxing, the HTTPS padlock, mixed content, and a gentle intro to why input can be dangerous.

Sep 15, 202611 min read
Browser storage options shown on a dark ACY Partner blog cover
Web Fundamentals / Browsers

Browser Storage: Cookies, localStorage, and More

A beginner-friendly tour of where the browser keeps data: cookies, localStorage, sessionStorage, and IndexedDB. Learn what each one does and when to reach for it.

Sep 15, 20269 min read
Illustration of a browser engine running scripts through an event loop
Web Fundamentals / Browsers

How Browsers Handle JavaScript

A beginner-friendly look at how the browser parses, compiles, and runs JavaScript, why it has one main thread, and how script loading affects what you see on screen.

Sep 15, 20269 min read
Dark blue cover with the title How Browsers Work and a parse to layout to paint code chip
Web Fundamentals / Browsers

How Browsers Work: An Overview

A beginner-friendly tour of what your browser does between typing a URL and seeing a page: networking, parsing, the render tree, layout, paint, compositing, and the JavaScript engine.

Sep 15, 20269 min read