Lesson 2 of 715 minutesHands-on

Find your IP addresses: the private one and the public one

Your device doesn’t have one IP address. It has at least two that matter, and they’re almost never the same. In this lesson you’ll find both on your own computer or phone, learn to tell them apart at a glance, and see why the internet only ever sees one of them.

In this lesson

  • Find your device’s private address on Windows, Mac, Linux, iPhone or Android
  • Find your public address, the one websites see
  • Tell a private address from a public one at a glance

You’ll need: any computer or phone connected to your home Wi-Fi. A phone with mobile data makes the last exercise more interesting, but it’s optional.

Two addresses, two jobs

Think of a big office with one public phone number. Callers from outside dial that number, and the receptionist puts them through to the right desk using a short internal extension. The extensions only work inside the building; nobody outside can dial “extension 23” directly.

Your home network works the same way:

  • The private address is the extension. Your router gives one to every device in the house (laptop, phones, TV, printer) so they can find each other. It only means something inside your network.
  • The public address is the main number. Your internet provider gives it to your router, and every device in the house shares it when talking to the outside world. This is the address websites see.

The router is the receptionist. When your laptop asks a website for a page, the router swaps the laptop’s private address for the public one on the way out, and remembers who asked, so that the reply is passed back to the right device. That swap is called NAT, and Course 4 looks at it in detail.

Try it yourself Β· part 1

Find your private address

Open the section for the device you’re using. You’re looking for two numbers: your device’s own address, and the address of your router (sometimes called the gateway). Write both down; you’ll need the router’s in the next lesson.

πŸͺŸ Windows
  1. Press the Windows key, type cmd and press Enter. A black window opens: the Command Prompt.
  2. Type this and press Enter:
    ipconfig
  3. Scroll to the section for the connection you’re using, usually Wireless LAN adapter Wi-Fi (or Ethernet adapter if you’re plugged in with a cable). It looks like this:
    Wireless LAN adapter Wi-Fi:Connection-specific DNS Suffix . : IPv6 Address. . . . . . . . . . . : 2001:db8:4a1c:200::1b3e Link-local IPv6 Address . . . . . : fe80::8c2a:51ff:fe3d:9a10%12 IPv4 Address. . . . . . . . . . . : 192.168.1.23 Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : 192.168.1.1
  4. IPv4 Address is your device’s private address. Default Gateway is your router. Don’t worry if you have no IPv6 lines, or several; we’ll come back to those.
  5. Seeing lots of adapters? VPN apps and virtual machines add their own. Use the one called Wi-Fi or Ethernet.
🍎 Mac
  1. Open System Settings and click Wi-Fi (or Network, then your connection, if you use a cable).
  2. Click Details… next to the network you’re connected to, then open the TCP/IP tab.
  3. IP address is your device’s private address. Router is your router’s.

On an older Mac (before macOS Ventura) it’s System Preferences β†’ Network β†’ Advanced β†’ TCP/IP.

Prefer the Terminal? On most Macs the Wi-Fi connection is called en0:

ipconfig getifaddr en0
ipconfig getoption en0 router

If the first one prints nothing, try en1 instead of en0.

🐧 Linux

Open a terminal and run:

ip -4 addr show

Look for the line starting with inet under your Wi-Fi or Ethernet connection (names like wlan0, wlp2s0 or enp3s0). Ignore lo, which is the computer talking to itself. Then find your router:

ip route show default

The address after default via is your router.

πŸ“± iPhone or iPad
  1. Open Settings and tap Wi-Fi.
  2. Tap the β“˜ next to the network you’re connected to.
  3. Under IPv4 Address, IP Address is your device’s private address and Router is your router’s.
πŸ€– Android
  1. Open Settings and go to Network and internet (on some phones Connections), then Wi-Fi or Internet.
  2. Tap the gear icon or the name of the network you’re connected to.
  3. Look for IP address, sometimes under Advanced or View more. The router may be shown as Gateway.

Phone makers name these menus differently, so yours may not match word for word, but the information is always somewhere in your Wi-Fi network’s details.

Try it yourself Β· part 2

Find your public address

  1. On the same device, open our IP address checker. The big number at the top is your public address: the one your router uses for the whole house, and the one every website you visit sees.
  2. Compare it with the private address you found in part 1. They’ll be completely different. That’s not an error: you’re looking at the office’s main number and your desk’s extension.
  3. Now try it on a second device on the same Wi-Fi, like your phone. Its private address is different from your laptop’s, but its public address is the same, because both go out through the same router.
  4. Using a VPN? Then the checker shows the VPN server’s address instead of your home one. That’s exactly what a VPN is for. Switch it off for a moment if you want to see your real public address.
  5. Optional: on your phone, switch Wi-Fi off and reload the checker on mobile data. Now you get a completely different public address, this time belonging to your mobile network instead of your home connection.

Telling private from public at a glance

Private addresses come from three blocks that were set aside for use inside networks. Nobody owns them, every home and office reuses them, and the internet never delivers traffic to them directly. If an address starts like one of these, it’s private:

Starts withFull rangeWhere you’ll usually see it
192.168.192.168.0.0 to 192.168.255.255Most home routers
10.10.0.0.0 to 10.255.255.255Some home routers, offices, phone hotspots
172.16. to 172.31.172.16.0.0 to 172.31.255.255Offices and some routers

Anything outside those ranges, like the address the checker showed you, is normally a public address. Two other ranges are worth recognising, because they’ll help you later in the course:

  • 169.254.x.x means your device asked the router for an address, got no answer, and gave itself one. A device with an address like that can’t reach the internet. It’s one of the first things to check when Wi-Fi says “connected” but nothing loads, which is exactly the problem Lesson 7 solves.
  • 100.64.x.x to 100.127.x.x is used by some internet providers that share one public address between many customers, called CGNAT. You won’t see it on your laptop, but you may see it on your router’s status page in Lesson 3.

What about the long addresses with colons?

If you saw something like 2001:db8:4a1c:200::1b3e, that’s an IPv6 address, the newer and much larger kind. Many connections now have both kinds side by side. IPv6 was designed with so many addresses that every device can have its own public one, so the private-and-shared trick above matters less there. If your connection uses IPv6, the checker may show you one of those long addresses instead.

The one starting with fe80 is different again: it’s a link-local address that only works on your own network, a bit like 169.254 for IPv6. You can see whether your connection has working IPv6 with our IPv6 test.

Why your public address might look different tomorrow

Most home connections get a dynamic public address: your provider can hand your router a new one when it restarts, or every so often, without telling you. Your private addresses can change too, because the router hands them out for a limited time. Neither is a problem for normal browsing. If you’re curious, Why Does My IP Address Keep Changing? explains when and why it happens.

Key takeaways

  • Every device on your home network has a private address; the whole house shares one public address.
  • Websites only ever see the public address. Your private address never leaves your network.
  • Addresses starting 192.168, 10, or 172.16 to 172.31 are private.
  • 169.254.x.x means the device couldn’t get an address from the router.
  • The “Default Gateway” or “Router” address you found is your router. You’ll log in to it next lesson.

Check yourself

Three questions. Pick one answer each and you’ll see why.

1. Which of these is a private address?

2. Your laptop and your phone are both on your home Wi-Fi. Using regular IPv4, what address does a website see for each of them?

3. Your laptop says it’s connected to Wi-Fi, but its address is 169.254.37.10. What does that tell you?

Want the background in more depth? Read Public vs Private IP Addresses, the full explainer this lesson builds on.

Scroll to Top