What Is an IP Address?
An IP address (Internet Protocol address) is a numeric label assigned to every device that communicates over a network using the Internet Protocol. As defined in RFC 791 (IPv4, September 1981), it serves two core purposes: host identification and location addressing. Every packet transmitted across the internet carries a source IP address and a destination IP address — without them, routers cannot forward traffic to the correct destination.
Think of an IP address as the return address on a letter. When your browser requests a webpage, your public IP is included in that request so the web server knows where to send the response. Unlike a postal address, however, an IP address is assigned to your internet connection or network interface, not to a fixed physical location.
How IP addresses are allocated follows a strict hierarchy. The Internet Assigned Numbers Authority (IANA) is responsible for global IP address coordination, allocating large blocks to the five Regional Internet Registries (RIRs): ARIN (North America), RIPE NCC (Europe, Middle East, and Central Asia), APNIC (Asia-Pacific), LACNIC (Latin America and Caribbean), and AFRINIC (Africa). RIRs then sub-allocate to ISPs, who assign individual addresses to customers and networks.
There are two versions of IP in active use today: IPv4 and IPv6. Both serve the same addressing role, but differ significantly in format, capacity, and header design.
ℹ️ Note: An IP address identifies a network interface, not a physical device. A server with two network cards will have two IP addresses. A smartphone connected to both Wi-Fi and a cellular network simultaneously holds two public IPs at once.
IPv4 vs. IPv6: Format, Capacity, and Key Differences
IPv4, standardised in RFC 791, uses 32-bit addresses written as four decimal octets separated by dots — for example, 203.0.113.45. A 32-bit address space provides 2³² ≈ 4.3 billion unique addresses. This seemed ample in 1981, but global internet adoption exhausted IANA's central pool of unallocated IPv4 addresses in February 2011.
IPv6, standardised in RFC 8200 (July 2017, which obsoletes RFC 2460), uses 128-bit addresses written as eight groups of four hexadecimal digits separated by colons — for example, 2001:0db8:85a3:0000:0000:8a2e:0370:7334. Per RFC 4291 (IPv6 Addressing Architecture), consecutive all-zero groups may be collapsed to :: once per address, so the above simplifies to 2001:db8:85a3::8a2e:370:7334. The 128-bit space provides 2¹²⁸ ≈ 340 undecillion (3.4 × 10³⁸) unique addresses — enough to assign billions of addresses to every atom on the surface of the Earth.
The table below compares the two protocols directly:
| Feature | IPv4 | IPv6 |
|---|---|---|
| Address length | 32 bits | 128 bits |
| Total address space | ~4.3 billion | ~340 undecillion |
| Notation example | 203.0.113.45 | 2001:db8::1 |
| Header size | 20–60 bytes (variable options) | 40 bytes (fixed, extensions added) |
| NAT required? | Yes (address exhaustion workaround) | No (sufficient space for all) |
| IPsec support | Optional | Mandatory (RFC 8200) |
| Auto-configuration | DHCPv4 | SLAAC and/or DHCPv6 |
| Loopback address | 127.0.0.1 | ::1 |
| RFC | RFC 791 (1981) | RFC 8200 (2017) |
Most modern networks and devices are dual-stack: they support IPv4 and IPv6 simultaneously, preferring IPv6 when available. The What Is My IP tool shows both your IPv4 and IPv6 addresses if your connection supports them, so you can confirm your dual-stack status at a glance.
💡 Tip: To test IPv6 support from the terminal, run
curl -6 ifconfig.me. If it returns a2001:...orfd...address, you have IPv6 connectivity. If it returns a connection error, your ISP or router is IPv4-only.
Public vs. Private IP Addresses
IP addresses are split into public (globally routable) and private (locally routable) ranges. Understanding the difference is essential for network configuration, firewall rules, and diagnosing connectivity issues.
A public IP address is assigned by your ISP and reachable from anywhere on the public internet. It is what every external website, API, and service sees as the origin of your requests. Your public IP is what the What Is My IP tool displays.
A private IP address is used exclusively within a local area network (LAN) and is not directly reachable from the internet. RFC 1918 (February 1996) defined three address blocks reserved for private use:
| Range | CIDR Block | Total Addresses |
|---|---|---|
10.0.0.0 – 10.255.255.255 | 10.0.0.0/8 | 16,777,216 |
172.16.0.0 – 172.31.255.255 | 172.16.0.0/12 | 1,048,576 |
192.168.0.0 – 192.168.255.255 | 192.168.0.0/16 | 65,536 |
When a device with private address 192.168.1.42 sends a request to the internet, the router uses Network Address Translation (NAT) to substitute the private source address with its public IP before forwarding the packet. The destination server replies to the public IP; the router translates the response back and delivers it to 192.168.1.42. This is why all devices on a home network appear to the outside world as a single IP.
IPv6 has an equivalent for local-only networks: Unique Local Addresses (ULA), defined in RFC 4193, using the fc00::/7 prefix (in practice fd00::/8). They serve the same role as RFC 1918 addresses but within IPv6 topologies.
There is also a third range to be aware of: CGNAT (Carrier-Grade NAT) addresses, defined in RFC 6598 using the 100.64.0.0/10 block. ISPs that have exhausted their public IPv4 pool deploy CGNAT to share one public IP across hundreds of customers. If your IP lookup shows 100.64.x.x or a similar address, you are behind CGNAT.
⚠️ Warning: Your device's private IP (visible in System Settings or via
ip addr) is NOT the same as your public IP. Sharing a private IP with someone expecting to connect to you from the internet will not work — they need your public IP and any relevant port-forwarding rules on your router.
For a deeper explanation of subnets, CIDR notation, and how private ranges are structured, see the Subnetting and CIDR Explained guide.
What Does Your IP Address Actually Reveal?
This is the question most users care about. The answer is more nuanced than either "nothing" or "everything."
What IP geolocation CAN reveal:
- Country — essentially 100% accurate for most registered IP blocks
- Region/state — accurate in the majority of cases for fixed broadband
- City or metro area — accurate ~55–80% for dense urban broadband; notably less reliable for rural, mobile, satellite, and CGNAT deployments
- ISP name — accurate; derived directly from RIR WHOIS registration data
- ASN (Autonomous System Number) — accurate; identifies the network operator routing your traffic
- Connection type — often determinable (residential, datacenter, cellular, known VPN/proxy)
What IP geolocation CANNOT reveal:
- Your street address or building
- Your name, phone number, email address
- Your device make, model, or browser
- Your browsing history or session data
- Any personal identifying information
The geographic precision ceiling exists because IP blocks are registered to the ISP's administrative address — typically a network operations centre (NOC) — not to the subscriber's location. Mobile connections add further imprecision because the IP maps to the carrier's regional gateway, which may be hundreds of kilometres from the device. Under CGNAT, thousands of users share a single IP, making city-level attribution unreliable.
ℹ️ Note: Law enforcement can legally compel an ISP to identify the subscriber associated with a specific IP address and timestamp under appropriate legal authority (e.g., a court order). This capability is exclusive to law enforcement — it is not available to websites, advertisers, or any third parties querying the IP directly.
Run the IP Lookup tool to see the full geolocation, ASN, ISP, and connection-type data the internet associates with any IP address, including your own. For a comprehensive breakdown of how geolocation databases are built and where accuracy gaps occur, read the IP Geolocation Explained guide.
How to Find Your IP Address
Instant browser check
The fastest method is the DNSnexus What Is My IP tool — it auto-detects both your IPv4 and IPv6 addresses on page load with no form submission required.
Command-line methods
# Public IPv4 address (uses IPv4 explicitly)
curl -4 ifconfig.me
# Public IPv6 address (errors if your connection is IPv4-only)
curl -6 ifconfig.me
# Both IPv4 and IPv6 via ipify's dual-stack endpoint
curl https://api64.ipify.org
# Local (private) IPv4 on Linux/macOS
ip addr show | grep "inet " | grep -v "127.0.0.1"
# Local IP on Windows PowerShell
Get-NetIPAddress -AddressFamily IPv4 | Select-Object IPAddress, InterfaceAlias
# All interfaces on macOS
ifconfig | grep "inet "
💡 Tip: Always use an external service like
curl ifconfig.meto verify your public IP. Your OSifconfigorip addrcommands only show private/local addresses assigned to your interface — they do not show what the internet sees after NAT.
PTR records: reverse DNS
Every public IP can optionally have a PTR record (pointer record) that maps the IP back to a hostname — this is called reverse DNS. Run the Reverse DNS Lookup tool to check the PTR record for any IP, or query it directly:
# Reverse DNS for Google's public DNS resolver
dig -x 8.8.8.8 +short
# Output: dns.google.
# Reverse DNS for Cloudflare's resolver
dig -x 1.1.1.1 +short
# Output: one.one.one.one.
# If no PTR record exists, dig returns empty
dig -x 203.0.113.45 +short
# Output: (empty — no PTR record configured)
PTR records matter most for mail server deliverability: receiving mail servers use reverse DNS to verify that the sending IP's PTR record matches the SMTP banner hostname. A missing or mismatched PTR is a common cause of email being flagged as spam.
Static vs. Dynamic IP Addresses
Dynamic IP addresses are assigned by the ISP via DHCP (Dynamic Host Configuration Protocol) and are reallocated from a pool. Most residential and mobile connections use dynamic IPs. The address may remain stable for months on a home broadband connection with an always-on router, or change daily on a mobile connection as you move between cell towers. There is no guaranteed lease duration — it is ISP-specific.
Static IP addresses are fixed and do not change between sessions or reboots. Common use cases include:
- Web and mail servers — inbound connections require a consistent, known address
- Corporate remote access — VPN and firewall whitelists rely on a stable IP
- Email deliverability — PTR records for SMTP authentication require a stable IP
- CCTV and remote monitoring systems — where external access must always route to the same address
ISPs typically charge extra for static IP allocations; they are not included in standard residential plans. If you need a consistent public IP, request one from your ISP or use a managed hosting or VPN provider that offers dedicated IP options.
ℹ️ Note: Under CGNAT (
100.64.0.0/10, RFC 6598), hundreds of customers share a single public IPv4 address. This means IP-based access control (firewall whitelisting, rDNS identity checks) becomes unreliable, and services that rate-limit by IP may affect all CGNAT subscribers simultaneously. If you suspect you are behind CGNAT, check whether your router's WAN IP matches your public IP as reported by the What Is My IP tool — a mismatch confirms CGNAT.
Key Takeaways
- IP address = network identity, not physical location. Your IP identifies your internet connection, not a street address. Geolocation maps it to an approximate city at best.
- IPv4 is 32-bit (~4.3 billion addresses); IPv6 is 128-bit (~340 undecillion). Most modern connections are dual-stack and support both simultaneously.
- Public IPs are internet-routable; private IPs (RFC 1918) are LAN-only. Your router uses NAT to bridge them. What external servers see is your public IP only.
- Your IP reveals your ISP, ASN, and approximate city — never your name or street address. Law enforcement can subpoena the ISP for subscriber data; websites cannot.
- CGNAT is increasingly common. If your router WAN IP does not match your public IP, hundreds of customers share your external address — IP whitelisting won't work reliably.
- Static IPs are not default. Residential connections use dynamic IPs via DHCP. Request a static IP from your ISP if your use case requires a consistent public address.
Frequently Asked Questions
Q: What is an IP address?
An IP address (Internet Protocol address) is a numeric label assigned to every device communicating over a network that uses the Internet Protocol. Per RFC 791 (IPv4) and RFC 8200 (IPv6), it serves two functions: identifying the network interface and providing a location address so routers can forward packets correctly. Every packet sent over the internet carries a source and destination IP.
Q: What does my IP address reveal about me?
Your IP address can reveal your approximate city or metro area, your Internet Service Provider (ISP), and your Autonomous System Number (ASN). It does not reveal your street address, name, email, or any personal information. Obtaining personal details from an IP requires a legal request to the ISP by law enforcement — this information is not accessible to websites or third parties directly from the IP address.
Q: What is the difference between IPv4 and IPv6?
IPv4 uses 32-bit addresses (e.g., 203.0.113.45) providing ~4.3 billion unique addresses, while IPv6 uses 128-bit addresses (e.g., 2001:db8::1) providing ~340 undecillion. IPv6 was standardised in RFC 8200 to resolve IPv4 address exhaustion. Most modern connections are dual-stack, supporting both protocols simultaneously, with the system preferring IPv6 when available.
Q: What is the difference between a public and private IP address?
A public IP is globally routable on the internet and assigned by your ISP. A private IP (defined by RFC 1918 in ranges 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16) is used only within a local network and not directly reachable from the internet. Your router uses NAT to translate between them, making all LAN devices appear as a single public IP to external servers.
Q: How do I find my public IP address from the command line?
Run curl -4 ifconfig.me for your public IPv4 address, or curl -6 ifconfig.me for IPv6. These query an external service that returns your IP as seen from the internet, bypassing any NAT or local addresses. On Windows, use Invoke-WebRequest -Uri "https://api.ipify.org" | Select-Object -ExpandProperty Content in PowerShell.
Q: How accurate is IP geolocation?
Country-level accuracy is essentially 100%. City-level accuracy is approximately 55–80% for fixed broadband, and lower for mobile, satellite, and CGNAT connections. Geolocation data is derived from RIR registration records, which map IP blocks to the ISP's registered address rather than the subscriber's physical location. For full accuracy analysis, see the IP Geolocation Explained guide.
Q: Can my IP address change?
Yes — most residential and mobile connections use dynamic IPs assigned by DHCP. The address may change when your router reconnects, your DHCP lease expires, or your ISP rotates its address pool. Static IPs are fixed and used by servers and businesses. You can confirm whether your IP changed by checking before and after reconnecting using the What Is My IP tool.
Next Steps
With a solid understanding of what IP addresses are, how IPv4 and IPv6 differ, and what your address exposes to the world, the next step is to dig into the data your specific IP carries.
Use the IP Lookup tool to see the complete geolocation, ASN, organisation, and connection-type data the internet associates with your IP address — or any IP you want to investigate.
For a technical breakdown of how geolocation databases are assembled from RIR data and where precision gaps occur, read the IP Geolocation Explained guide.
To understand how Autonomous System Numbers work and how your ISP routes your traffic across the internet, see the ASN Lookup Explained guide.
If you've noticed your IP address changing between sessions — or you're wondering whether you need a fixed one — see Static vs Dynamic IP Address: Key Differences.
Browse all IP guides on DNSnexus.