Every computer on a network carries at least two IP addresses, and you can pull both without installing anything. The one your router hands out — called the private or local address — takes about 15 seconds to surface on Windows 11 through Settings > Network & internet > Properties. The one the outside world sees is a different number entirely, and it belongs to your router, not your machine. That distinction trips up more people than any command does. This guide covers both, names the exact menus and commands for Windows, macOS, and Linux, and flags the spots where the system will hand you the wrong number if you don't know where to look.
Private vs. Public IP: Which Number You Actually Need
A private IP address identifies your machine inside your own network — it's the number your router assigns, and it almost always falls in one of three reserved blocks defined by the Internet Engineering Task Force in RFC 1918: 10.0.0.0 to 10.255.255.255, 172.16.0.0 to 172.31.255.255, and 192.168.0.0 to 192.168.255.255. If your address starts with any of those, it's private and meaningless outside your home or office. Your public IP is the single address your internet provider assigns to your router, and every device behind it shares that one number when talking to the wider internet.
The practical split matters because the two numbers answer different questions. Setting up a printer, forwarding a port, or troubleshooting why your laptop can't see a colleague's machine on the same Wi-Fi all require the private address. Checking whether a website sees you in the right country, diagnosing why a streaming service thinks you're abroad, or configuring a remote-access rule on your router requires the public one. The IPv4 format — four groups of digits separated by dots, each 0 to 255 — is what most people mean, though IPv6 addresses (eight groups of hexadecimal characters separated by colons) are increasingly common and your machine likely holds one of each.
Here's where the confusion compounds: the address a "what is my IP" website shows you is never your computer's. It's the router's public address or, on some mobile and carrier networks, a shared address used by hundreds of subscribers at once through carrier-grade NAT. That shared-address scenario is worth knowing because it explains why port forwarding sometimes fails on mobile broadband no matter how correctly you configure the router — there's no unique public address to forward to.
The reserved ranges themselves have a wrinkle the top search results skip. The 172.16.0.0 block runs only to 172.31.255.255, so an address like 172.35.4.10 is a legitimate public address, not private. People see "172." and assume local. Check the second group of digits before you conclude anything.
Finding Your IP Address on Windows 11 Through Settings
The fastest path on Windows 11 needs no command line. Open Settings with Windows key + I, choose Network & internet, then click Properties next to your active connection name — Wi-Fi or Ethernet. Scroll to the Properties section and read the IPv4 address line. That's your private address, shown alongside the subnet mask, default gateway (your router's address), and DNS servers. The whole trip takes four clicks and works identically whether you're wired or wireless.
On Windows 10 the menu shifts slightly. Settings > Network & Internet > Status > View your network properties lists every adapter and its IPv4 address in one scrollable page. If you're on a metered or corporate connection, the Properties page may show the address as a range or hide it behind admin permissions — that's a policy set by your IT department, not a system fault.
For the public address on Windows, any browser search for "what is my IP" returns it, but the command line gives you a cleaner answer. Open Command Prompt and type curl ifconfig.me — Windows 10 build 1803 and later ship with curl built in. The terminal prints a single address and returns to the prompt. If curl isn't recognized, you're on an older build and should use the browser method instead.
A quirk worth flagging: a machine with both Wi-Fi and Ethernet, or with a VPN client installed, will list multiple IPv4 addresses. The Settings page shows the active adapter first, but a VPN's virtual adapter can hold a 10.x address that looks local. If you're troubleshooting connectivity, confirm which adapter actually carries traffic by checking the default gateway — the real one will match your router's address.
The ipconfig and ip Commands, and What Each Line Means
Command line gives you more than a number. Press Windows key + R, type cmd, and hit Enter, then run ipconfig. You'll get a block per adapter with the IPv4 address, subnet mask, and default gateway. Run ipconfig /all and the output expands to include the MAC address, DHCP lease times, and DNS servers — the lease line tells you when your router will reassign the address, which matters if you're setting up a static reservation.
The modern replacement is PowerShell's Get-NetIPAddress, which lists every address on every adapter with its prefix length and interface index in one table. Run it, then filter with Get-NetIPAddress -AddressFamily IPv4 to drop the IPv6 entries. The interface index column is the piece ipconfig won't give you cleanly, and you need it when configuring firewall rules or routing.
Interpreting the output takes one skill: match the adapter name to your connection. "Wireless LAN adapter Wi-Fi" holds the number you want when you're on Wi-Fi. "Ethernet adapter Ethernet" holds it when you're plugged in. Ignore adapters labeled "Media disconnected" — they carry no address at all, and a blank IPv4 line there is normal, not a fault.
If ipconfig returns 169.254.x.x, your machine failed to reach the DHCP server and assigned itself a link-local address as a fallback. That's the single most common "why can't I connect" signature on Windows, and it means the router isn't answering. Restart the adapter or the router before chasing anything else. A machine showing 169.254 is not on the network, full stop.
Finding Your IP Address on macOS in System Settings and Terminal
On macOS Ventura (13) and later, the old Network pane moved into System Settings. Open System Settings, click Network in the sidebar, and select your active connection — Wi-Fi or Ethernet. Click Details, then the TCP/IP tab. The IPv4 Address line is your private address, and the Router line is your gateway. On macOS Monterey (12) and earlier, the same information sits in System Preferences > Network, where the address displays directly in the connection summary without a Details click.
Terminal gives you the number in one line. Type ipconfig getifaddr en0 for Wi-Fi or ipconfig getifaddr en1 for Ethernet and press Return. The result prints bare, no labels. The en0/en1 naming catches people out because Apple's interface numbering doesn't always map to what you'd expect — on most modern Macs Wi-Fi is en0, but on some desktop models Ethernet claims en0 and Wi-Fi moves to en1. Run ifconfig with no arguments to see every interface and its address if you're unsure which is which.
For the public address, curl ifconfig.me works in Terminal on macOS 10.15 Catalina and later without any install. Alternatively, dig +short myip.opendns.com @resolver1.opendns.com queries OpenDNS's resolver and returns your public address as a single line — handy on networks where plain HTTP requests are filtered.
One macOS-specific trap: if you have a VPN active, ipconfig getifaddr en0 still returns your local Wi-Fi address, not the VPN tunnel's address. The tunnel usually appears as utun0 or a similar interface name. Run ifconfig and look for the utun entry if you need the address the VPN assigned. The System Settings TCP/IP tab also shows only the physical connection, so neither path alone tells the whole story on a VPN-connected Mac.
Finding Your IP Address on Linux With ip addr and hostname
Linux consolidated its networking tools years ago, and the old ifconfig command is deprecated on most distributions — Ubuntu stopped shipping it by default in 20.04 Focal Fossa. The current standard is ip addr, usually written ip a. It lists every interface with its IPv4 and IPv6 addresses, and the primary one sits under your active interface, typically named something like wlp2s0 for Wi-Fi or enp3s0 for Ethernet. Look for the line beginning with inet followed by the address and a slash-number suffix.
For just the number without the surrounding noise, hostname -I (capital I) prints every non-loopback IPv4 address on one line, space-separated. That's the one-liner worth memorizing because it works across Ubuntu, Fedora, Debian, and most derivatives without parsing. The lowercase -i flag behaves differently and often returns 127.0.1.1 on Debian-based systems — a quirk caused by the hosts file, not a real network address.
The loopback address 127.0.0.1 appears on every machine and is not your network address. It's how the machine talks to itself. If you run ip addr and see only 127.0.0.1 under the lo interface, the real adapter is either disconnected or down. Bring it up with sudo ip link set up and check again.
On distributions using NetworkManager — the default on Ubuntu desktop, Fedora Workstation, and most others — nmcli -p device show prints a structured report per interface including the IP4.ADDRESS line. The -p flag makes the output parseable and readable at the same time. This matters on servers where you're scripting a check, because nmcli reports connection state alongside the address, while ip addr shows the address even on a downed interface.
The Public IP: Router Admin Pages and Provider Tools
Your public address lives on the router, and the router's admin page shows it directly. Type the default gateway — the address your system reported as the router, often 192.168.1.1 or 192.168.0.1 — into a browser, log in, and find the WAN or Internet status section. The address listed there as the WAN IP or Internet IP is what the outside world sees. This is the only method that tells you the public address without involving a third-party website, which matters on networks where you'd rather not ping an outside service.
Router interfaces vary by manufacturer, and the labels shift. Netgear routers typically put it under Advanced > Internet Setup or on the main status page as "Internet Port." TP-Link models list it as "WAN" on the Status tab. Asus routers show it on the network map screen. If you can't find it, check the router's manual for the WAN status page — the address is always somewhere, because the router needs it to function.
The public address changes more often than people expect. Most residential providers assign it dynamically through DHCP, and it can shift after a router reboot, a modem swap, or a provider-side lease renewal — typically every 24 hours to several days depending on the provider's configuration. Business connections often pay for a static address that never changes. If you're hosting anything that needs a stable address, check whether your plan includes a static IP before you build around the dynamic one.
Carrier-grade NAT, mentioned earlier, is worth a second look here. On many mobile hotspots and some fiber and fixed-wireless plans, the address shown in the router's WAN section is itself a private address in the 100.64.0.0 to 100.127.255.255 range — a block reserved for shared carrier addressing. When that happens, the router's WAN number is not your public address; the carrier translates it. You can't port-forward through it, and the only fix is asking the provider for a dedicated public address, which some charge for and some don't offer at all.
Reading the Output When Multiple Addresses Appear
Three-address output is normal on a modern machine. A laptop on Wi-Fi with a VPN running and Docker installed can report a Wi-Fi address, a VPN tunnel address, and a virtual bridge address, all at once. The trick is identifying which one serves the purpose at hand. Physical adapters carry names tied to hardware — Wi-Fi, Ethernet, wlan0, en0. Virtual adapters carry names tied to software: utun for VPN tunnels on macOS, tun0 or wg0 for VPNs on Linux, vEthernet for Hyper-V switches on Windows.
Match the address to the question. Troubleshooting a printer on the same Wi-Fi? Use the physical Wi-Fi adapter's address. Connecting to a database on a corporate VPN? Use the VPN tunnel's address, because that's the one the corporate network routes to. Running a local development server you want a colleague to reach? Use the physical address and confirm no firewall blocks the port. Each scenario points to a different line in the same output.
| Scenario | Address type to use | Where it appears | Common mistake |
|---|---|---|---|
| Printer or file sharing on home Wi-Fi | Private, physical adapter | Wi-Fi Properties (Windows) or en0 (macOS) | Using the VPN tunnel address |
| Remote access through corporate VPN | Private, tunnel adapter | utun0 (macOS) or tun0 (Linux) | Using the physical Wi-Fi address |
| Port forwarding on home router | Public, WAN side | Router admin WAN status page | Using the private 192.168.x.x number |
| Diagnosing a streaming geo-block | Public, as seen externally | curl ifconfig.me | Assuming router WAN shows the true address on CGNAT |
The 169.254 fallback and the 127.0.0.1 loopback are the two addresses that are never the answer. If either appears where you expected a real network address, the adapter isn't communicating. Loopback means the machine is talking to itself by design; link-local means DHCP failed. Neither is a configuration you can use to reach another device.
A subtler case: dual-stack machines hold both an IPv4 and an IPv6 address, and some networks prefer IPv6. If a service works for some people and not others on the same network, check whether your machine is connecting over IPv6 while the other end expects IPv4. Running ip addr on Linux or ifconfig on macOS shows both, and the inet6 lines are the IPv6 ones. Windows shows IPv6 in the ipconfig output too, usually under a heading like "Temporary IPv6 Address."
Copying, Verifying, and Using the Address Safely
Before you paste an address into a support ticket or a configuration field, verify it's the right one. The fastest check is a ping to the default gateway — if the gateway responds, your machine is on the network and the address it reported is live. Run ping 192.168.1.1 (substitute your gateway) on any platform; a reply confirms the path works. No reply means the address or the connection is stale.
Copy addresses carefully. A single transposed digit in a port-forward rule or firewall exception produces a failure that looks like a permissions problem but isn't. On Windows, ipconfig | clip pipes the output straight to the clipboard. On macOS, ipconfig getifaddr en0 | pbcopy does the same. On Linux, hostname -I | xclip -selection clipboard works if xclip is installed, or you can select from the terminal directly.
Treat the private address as low-sensitivity and the public address as slightly more exposed. Neither is a secret in the way a password is, but the public address reveals your approximate location and provider to anyone who sees it, and it's the entry point for any inbound connection attempt. Don't post it in public forums when asking for help — redact the last group of digits and ask the question with the first three intact, which is enough for troubleshooting.
Static versus dynamic assignment is the decision that follows. If you're setting up a printer, a media server, or anything else other devices need to reach reliably, reserve the address in the router's DHCP table rather than typing it manually on the device. A DHCP reservation keeps the address stable without the conflicts that manual static assignment causes when two devices claim the same number. Check the router's admin page for a "DHCP reservation" or "address reservation" section, usually under LAN setup.
FAQ
Does my computer have its own public IP address?
No. The public address belongs to the router or, on carrier-grade NAT connections, to the provider's shared gateway. Your computer holds only a private address plus, on IPv6 networks, a globally routable IPv6 address that is technically its own — but the IPv4 public address is never the machine's. That's why two laptops on the same Wi-Fi report identical public addresses when checked through a website.
Why does my IP address show 169.254 something?
A 169.254.x.x address means the machine asked the router for an address through DHCP and got no reply, so it assigned itself a link-local fallback from the block reserved in RFC 3927. The computer is not on the network in any usable sense. Restart the network adapter first, then the router. If the address persists, the DHCP service on the router is down or the cable and Wi-Fi link is failing.
Can I find my IP address without any commands or settings menus?
Yes, for the public address only. Opening any search engine and typing "what is my IP" returns the address your provider assigns, with no software or menus involved. That method cannot show your private address, because the website has no way to see a number that only exists inside your own network. For the private address, you need Settings, System Settings, or a terminal.
How often does my public IP address change?
On most residential plans it changes whenever the provider's DHCP lease renews or the router reconnects — commonly every 24 hours to a few days, though some providers hold the same address for months. Business plans with a static IP keep it permanently. You can check whether it has changed by comparing the router's WAN address against a previous note; a VPN or proxy will also make external checks report a different address than the router holds.
What's the difference between IPv4 and IPv6 addresses, and which do I use?
IPv4 addresses are four numbers 0 to 255 separated by dots, like 192.168.1.42. IPv6 addresses are eight groups of hexadecimal digits separated by colons. Your machine likely has both, and most home networks run them in parallel. Use whichever the service you're configuring asks for — printers and older devices usually want IPv4, while newer cloud and mobile services may prefer IPv6. Both appear in ipconfig, ifconfig, and ip addr output.
Is it safe to share my IP address with a tech support person?
The private address is safe to share and useless outside your network. The public address is worth redacting to the first two or three groups when posting publicly, since it reveals your approximate location and provider. Legitimate support staff may need the full public address to check provider-side routing, but confirm who you're talking to and use a support portal rather than an unsolicited message before handing it over.
Why do I see a different IP address when I connect through a VPN?
A VPN routes your traffic through its own server, so external checks report the VPN server's public address instead of your router's. Your private address on the physical adapter doesn't change, but a new virtual adapter appears with the tunnel's address. Websites see the VPN address, which is the point of the service. Disconnect the VPN and the original public address returns, though the provider may have reassigned it in the meantime.