Your IP address is the number your device uses on the network it is attached to right now. On a home or office network it is almost always a private address beginning 192.168, 10, or 172.16 through 172.31. Your internet provider assigns the public address your traffic leaves from, and servers see that public address, not your device's private one.

Most people picture an address as a fixed label glued to the device. It is closer to a room key issued at a hotel desk. The key works for the lobby you are in, the desk decides how long you keep it, and the number on the door is not the street address of the building. This article walks through how the assignment works, where the number physically lives, why different websites disagree about it, and what you can and cannot control.

What an address actually is

An IPv4 address is 32 bits, conventionally written as four numbers from 0 to 255 separated by periods, for a total of about 4.29 billion possible values. That pool was exhausted at the top-level allocation authority in 2011, and regional registries ran dry over the following years. The shortage is the reason private ranges and address sharing exist at all.

Three blocks are reserved for private use and never routed on the public internet: 10.0.0.0 through 10.255.255.255, 172.16.0.0 through 172.31.255.255, and 192.168.0.0 through 192.168.255.255. A fourth, 100.64.0.0 through 100.127.255.255, is set aside for carrier-grade sharing and is worth recognizing because it looks private but is not one of the classic three. If your address falls in that fourth range, you are behind your provider's own sharing layer, one step further from the public internet than a typical home router.

A handful of special ranges matter for diagnostics. Loopback uses 127.0.0.0/8, and the address 127.0.0.1 always means the device itself. The block 169.254.0.0/16 is self-assigned when a device cannot reach a DHCP server, which is why an address starting 169.254 is a reliable symptom of a broken local connection rather than a routing problem upstream.

IPv6 addresses are 128 bits, written as eight groups of four hexadecimal digits, and are normally assigned in blocks rather than one per device. A typical home connection receives a block large enough for billions of addresses. That abundance is why IPv6 removes the need for the address-sharing layer described next. Most readers asking where their IP is are still on IPv4 with IPv6 alongside it, so both numbers can exist at once.

How NAT hides your device

Network address translation sits at the boundary between your local network and the internet. Your router keeps a table mapping each outbound connection to a public port number. When your laptop requests a page from 192.168.1.20, the router rewrites the source to its public address plus a unique port, remembers the mapping, and reverses it when the reply arrives.

The mechanism explains several behaviors that otherwise look strange. Inbound connections fail unless you create an explicit port-forward rule, because the router has no table entry to match them to. Two devices on the same network can each open a connection to the same server without colliding, because the port number distinguishes them. And a server that logs your public address sees one entry for every device in the household, which is why websites cannot count visitors by unique address alone.

Carrier-grade translation stacks a second layer. Your provider may place hundreds or thousands of customers behind one public address, assigning each a block of ports from the shared pool. This is common on mobile networks and increasingly common on residential fiber. The practical consequence is that your "public" address may be shared with strangers, and it can change when you reconnect.

Address translation was designed as a workaround, not a security feature. It does block unsolicited inbound connections by default, which is a real benefit, but it is not a firewall and does not inspect traffic. A frequently repeated claim that the shared address protects your identity is overstated; it obscures the topology, not the traffic.

Where the number is stored

Your address lives in several places at once, and each has a different lifetime. The operating system holds a lease on the local address, the router holds a mapping table for translations, and the provider holds a record of which subscriber held which public address at which time. These records do not always agree, and that mismatch explains most confusion about where an address "is."

Your own device knows only its local address and its default gateway. It has no direct knowledge of the public address the router presents. To learn that, it must ask an outside server, which is exactly what address-checking websites do. The reply is the address the server saw, plus whatever metadata the connection carried.

The provider's record is the authoritative one. Providers retain logs of address assignments for periods set by law and policy, which vary by jurisdiction and can run from weeks to years. Law enforcement requests target that record, not your device. This is the single most important structural fact about IP addresses: they identify a connection at a moment in time, and the provider holds the key to who held it.

Reading the address itself

The number carries routing information in its structure. Internet routing works on prefixes, and a prefix length written after a slash tells you how many leading bits are fixed. A /24 fixes the first 24 bits, leaving 256 addresses in that block; a /16 fixes 16 bits, leaving about 65,000. Providers announce prefixes to each other, and traffic follows those announcements. The address is a locator in a routing system, and that is its primary job.

Geolocation databases infer a physical location from the prefix, not from the device. Accuracy varies widely. Country-level guesses are usually correct, region-level guesses are often right, and city-level guesses are frequently wrong, sometimes by hundreds of miles. Databases update on cycles ranging from days to months, so a recently moved connection can be pinned to the old location for a while. Mobile addresses are the least accurate, because a single prefix may serve an entire metropolitan area or several.

You can inspect the structure directly. Look up your prefix in a routing database and you will find the network that announces it, which is often your provider rather than your town. That is a more reliable statement about where your address "is" than any city label a lookup site shows.

Why different sites disagree

Two websites reporting different addresses for the same device usually means your traffic left through two different paths. The most common causes are a virtual private network, a proxy, a split-tunnel configuration that routes some traffic through the tunnel and some directly, and dual-stack connections where IPv4 and IPv6 exit through different gateways.

IPv6 is a frequent culprit. If your device has both an IPv4 and an IPv6 address, a site that prefers IPv6 will see the IPv6 address, while a site that only handles IPv4 sees the other. The two addresses belong to different pools and can geolocate to different places. This is not a fault; it is the normal result of a network running both protocols.

A second cause is caching. Some sites remember the address from an earlier session, or resolve your connection through a content delivery network node that forwards a header rather than the raw connection address. That header can be stale or can reflect the CDN's view rather than the origin server's.

A third cause is that the site is reading something other than your address. Browser fingerprinting, cookies, and account logins can all inform a location estimate independently. If a site shows a city you left last week, check whether it is using stored data rather than a live lookup.

Comparison of address types

Type Example range Visible to remote servers Typical lifetime
Loopback 127.0.0.1 No Permanent
Link-local 169.254.0.0/16 No Until reconnect
Private (home) 192.168.0.0/16 No DHCP lease, often 24 hours
Private (large) 10.0.0.0/8 No DHCP lease
Shared carrier 100.64.0.0/10 Only the provider's public address Session-dependent
Public IPv4 Provider-assigned Yes Hours to weeks
Public IPv6 Provider block Yes Days to months

The table makes the hierarchy clear. Only the last two rows are what an outside server sees, and only the provider knows which subscriber held them.

How long an address lasts

Address assignments follow a time course, and knowing it explains why your address changes when it does.

Stage What happens Typical timing
Device connects Router offers a local address Seconds
Lease granted Device holds local address 24 hours, renewed at half-life
Router reboot Local leases may be reissued Immediate
Provider session Public address held Hours to weeks
Router reboot Public address may change Immediate
Provider maintenance Public address may change Unpredictable
Move or new service New public address On activation

The local lease is the part you control most directly. Most home routers issue a 24-hour lease and renew it at the 12-hour mark, so a device that stays connected keeps the same local address indefinitely. A device that disconnects for longer than the lease can come back with a different number. Setting a static local address or a DHCP reservation in the router removes that variability entirely.

The public address is the part you control least. Some providers tie it to the router's hardware identifier and keep it stable for months; others rotate it on every reconnect. There is no universal rule, and the behavior can change when a provider upgrades its network.

Edge cases worth knowing

A virtual private network replaces the address a server sees with the tunnel exit's address. The local address and the provider-assigned address are both still real; the server simply sees a third one. Disconnecting the tunnel restores the original path, which is the fastest way to confirm a tunnel is the cause of a discrepancy.

Mobile networks share addresses aggressively. A phone on cellular may sit behind carrier-grade translation with hundreds of other users, and its apparent location can be the provider's regional gateway rather than the phone's actual position. Expect city-level accuracy to be poor.

Satellite connections route traffic through ground stations that can be far from the subscriber. A rural connection may appear to originate in a city hundreds of miles away. The same applies to some fixed wireless and business circuits that backhaul traffic to a regional hub.

Corporate networks often route all traffic through a central egress point. An employee in one city can appear to be in another because every request leaves through headquarters. This is by design and is one of the reasons address-based access rules are unreliable for identifying people.

A device that shows 169.254 has failed to reach a local address server. That is a local wiring or router problem, not an address lookup problem, and it should be fixed before any conclusion is drawn about the public address.

Common misconceptions

The most persistent misconception is that an IP address identifies a person. It identifies a connection, and the mapping to a subscriber is held by the provider and released only through legal process. Two people behind one router share an address, and one person can use many addresses across a day.

The second is that an address is a precise location. Prefix-based inference gives a rough region at best. City labels on lookup sites are estimates derived from databases that are sometimes stale, and they should be treated as hints rather than facts.

The third is that changing your address makes you anonymous. A new address changes one identifier among many. Browser fingerprints, cookies, account sessions, and traffic patterns persist across address changes. Address rotation is a privacy measure with limited scope, not a guarantee.

The fourth is that address translation is a firewall. It blocks unsolicited inbound connections by default, which is useful, but it does not filter content, inspect packets, or stop outbound connections. Treating it as security leads to overconfidence.

A counterintuitive detail: your public address can remain the same for months even though your local address changes daily. The two leases are independent, and the provider's assignment often outlasts the router's. People who check only one of the two numbers draw the wrong conclusion about whether their address "changed."

Practical steps to find and verify your address

Start with the local address, because that is the one you can act on. On Windows, open a command prompt and run ipconfig; the IPv4 address line under the active adapter is your local address. On macOS, open System Settings, go to Network, and read the address under the active service. On Linux, run ip addr show and read the inet line for the active interface. On a phone, the address appears in the Wi-Fi settings for the connected network.

Then check the public address with two independent lookup sites and compare. If they agree, you have a consistent view of the egress address. If they disagree, check for a VPN, a proxy, or a dual-stack connection before assuming a fault.

To confirm a tunnel is the cause, disconnect the VPN and repeat the lookup. A change back to the earlier address proves the tunnel was responsible; no change points elsewhere.

To stabilize a local address, set a DHCP reservation in the router rather than a manual static address. A reservation keeps the address server in control and avoids conflicts with other devices. A manual static address works but requires you to track which numbers are already in use.

To stabilize a public address, ask the provider whether the assignment is sticky. Some offer a static address option, often as an add-on. There is no setting on your side that guarantees a public address stays the same.

Red-flag warnings to watch for:

A lookup site that demands payment to reveal an address you can see for free elsewhere. A site that shows a wildly different city and cannot explain whether it used a live lookup or stored data. An address beginning 169.254, which means the device never reached the local address server. A "hide your IP" tool that claims to prevent all tracking; it changes one identifier, not all of them. A provider record request that arrives by email rather than through legal process.

What an address cannot tell you

An address cannot reliably identify a person, a household member, or a device behind a shared connection. It cannot prove location beyond a rough region. It cannot survive a provider reassignment, a reboot, or a move. And it cannot be treated as a permanent identifier in any system that matters.

This is a general educational explanation of networking mechanics, not a security assessment or legal opinion. Address retention rules and lawful-request procedures vary by jurisdiction and change over time, so consult a qualified local professional for advice specific to your situation. If you believe you are in immediate danger, contact local emergency services rather than relying on any address lookup.