What Is an IP Address? Understanding the Basics
Every device on a network needs an address, or nothing knows where to send the data meant for it. On the internet and on your home network, that address is the IP address. You have probably seen one, something like 192.168.1.10, without ever needing to think about it. This guide explains what an IP address is, the difference between public and private addresses, how IPv4 and IPv6 differ, and how to find your own, so that the next time a router setting or a firewall rule mentions one, it makes sense.
What an IP address is
An IP address (Internet Protocol address) is a number that identifies a device’s network connection and tells other devices where to deliver data. It does two jobs at once. It identifies the interface (your laptop’s Wi-Fi adapter, a server’s network card) and it says where it is in the network, because part of the address names the network the device belongs to. That second job is what allows routers to forward a message across many networks until it reaches the right one.
An IP address belongs to a network connection, not to the device forever. A laptop has a different address at home, at work and in a cafe, and a device with both Ethernet and Wi-Fi has one address per connection.
IPv4 and IPv6
There are two versions in use today.
- IPv4 uses 32-bit addresses written as four numbers from 0 to 255, separated by dots:
203.0.113.25. That allows roughly 4.3 billion addresses, which sounded like plenty in the 1980s and ran out for new allocations years ago. - IPv6 uses 128-bit addresses written as eight groups of hexadecimal digits separated by colons:
2001:db8:85a3:0:0:8a2e:370:7334. The address space is so large that it will not run out in any practical sense, and it is the long-term replacement for IPv4.
Many networks run both side by side. Many websites and providers support IPv6, and your device will use it automatically when it is available. The structure of both formats is covered in understanding IP address format and function.
Public and private addresses
Not every address is reachable from the internet. Some ranges are reserved for private use, and any network can use them without asking anyone. Defined in RFC 1918, the private IPv4 ranges are:
| Range | Typical use |
|---|---|
10.0.0.0 to 10.255.255.255 |
Large company and cloud networks |
172.16.0.0 to 172.31.255.255 |
Medium networks, some container platforms |
192.168.0.0 to 192.168.255.255 |
Home routers and small offices |
Your phone and laptop at home almost certainly have private addresses from the last range. Your public address is the one your internet provider assigns to your router, and it is what websites see. A feature called NAT (network address translation) lets many private devices share that single public address: the router keeps a table of which internal device asked for what, and sends the replies back to the right one. Many mobile and some home connections go a step further, with the provider sharing one public address between many customers (carrier-grade NAT, which uses the range 100.64.0.0/10).
Other addresses you will meet
- 127.0.0.1 (loopback): always means “this computer”. A web server running on your own machine is reachable at this address.
- 169.254.x.x (link-local): some systems (Windows and macOS by default) give themselves one of these when they expect a DHCP server to hand out an address and none replies. Seeing one on a device that should have a normal address usually points to a DHCP, network or router problem.
- The default gateway: the address of the router that leads out of your local network, often
192.168.0.1or192.168.1.1.
How devices get their address
Most devices are handed an address automatically by DHCP (Dynamic Host Configuration Protocol), usually run by your router. The device asks, the router offers an unused address for a set time (a lease), along with the gateway and DNS server addresses. A server or a printer is often given a fixed address instead; see static vs dynamic IP addresses for when to use each.
IP addresses are for machines, and names are for people. When you type a website name, DNS (the Domain Name System) translates it into an IP address before your device connects. If names stop working but addresses still do, the problem is DNS; see DNS not resolving on Linux.
How to find your IP address
# Windows
ipconfig
# Linux
ip -br address
ipconfiglists every adapter with its IPv4 Address, subnet mask and Default Gateway.ip -br addressprints one line per interface (-brmeans brief) with its state and addresses.
Those show the addresses of your local network interfaces, normally private ones. To see your public address, the one websites see, search “what is my IP” or run a lookup from a command line against a service you trust. The two are usually different.
Privacy and security
An IP address reveals roughly where you connect from, typically the city or region of your provider, not your street address. Websites and services use it for things like language and fraud checks, and advertisers can use it to group visits. A VPN or a proxy replaces the address that websites see with the address of the VPN server. Private addresses on your own network are not reachable from the internet, but that alone is not a security measure; a router firewall and up-to-date software are what protect you.
Common questions
Is my IP address the same as my MAC address?
No. A MAC address is a hardware identifier for a network adapter that works only on the local network segment and normally stays the same (some devices can change or randomise it). An IP address is a logical address that changes as you move between networks.
Does my IP address change?
Your private address can change when a device gets a new DHCP lease, for example after being offline for a while; a normal renewal keeps the same address, and routers usually hand a device the same one again. Your public address may change when your router restarts or when the provider decides, unless you pay for a static one.
Can someone find my exact location from my IP address?
Not precisely. Geolocation from an IP address is approximate, usually the provider’s service area, and only the provider (or a service that logs your account activity) can tie it to a person.
