ByteTools

What Is an IP Address?

Updated 2026-11-04

An IP address is a number that identifies a device on a network so that other devices can send data to it. It works like a postal address: routers read the destination address of each packet and forward it step by step until it arrives. Two versions are in use today: IPv4 (for example 192.0.2.10) and IPv6 (for example 2001:db8::10).

IPv4 and IPv6 formats

An IPv4 address has 32 bits. It is written as four decimal numbers from 0 to 255, separated by dots, such as 203.0.113.25. Each number is one byte, called an octet. There are 232, or about 4.3 billion, possible IPv4 addresses. This is fewer than the number of devices in the world, which is why address sharing became necessary.

An IPv6 address has 128 bits. It is written as eight groups of four hexadecimal digits, separated by colons: 2001:0db8:0000:0000:0000:0000:0000:0010. Two rules make it shorter:

  • Leading zeros in a group can be removed: 0db8 becomes db8.
  • One run of groups that are all zero can be replaced by ::, but only once in an address.

So the address above is normally written 2001:db8::10. IPv6 has 2128 addresses, enough that every network can receive a very large block.

Public and private addresses

A public address is unique on the internet and can be reached from anywhere (if no firewall blocks it). A private address is only valid inside a local network. Many home and office networks reuse the same private ranges at the same time, because these addresses are never routed on the public internet.

RFC 1918 defines three private IPv4 ranges:

RangeCIDRAddresses
10.0.0.0 – 10.255.255.25510.0.0.0/816,777,216
172.16.0.0 – 172.31.255.255172.16.0.0/121,048,576
192.168.0.0 – 192.168.255.255192.168.0.0/1665,536

Other special IPv4 ranges you will meet:

  • Loopback, 127.0.0.0/8: the device talks to itself. 127.0.0.1 is called localhost. In IPv6 the loopback address is ::1.
  • Link-local, 169.254.0.0/16: a device gives itself this address when it asks for an address by DHCP and gets no answer. If you see 169.254.x.x, DHCP is probably not working. IPv6 uses fe80::/10 for link-local addresses, and every IPv6 interface has one.
  • Carrier-grade NAT (CGNAT), 100.64.0.0/10: a shared range (RFC 6598) that internet providers use between their customers and their own NAT devices. If the WAN address of your router is in this range, you do not have a real public IPv4 address.
  • Documentation ranges: 192.0.2.0/24, 198.51.100.0/24 and 203.0.113.0/24 (and 2001:db8::/32 for IPv6) are reserved for examples, like those in this article.

In IPv6, unique local addresses in fc00::/7 (in practice fd00::/8) are the counterpart of private IPv4 ranges. Global unicast addresses currently start with 2000::/3.

How NAT shares one public address

Network Address Translation (NAT) lets many private devices use one public IPv4 address. When your laptop at 192.168.1.20 opens a website, the router replaces the source address with its own public address and remembers the connection in a table, using port numbers to tell connections apart. When the reply returns, the router translates it back and passes it to the laptop.

NAT has a side effect: outside hosts cannot start a connection to a device behind it unless you set up port forwarding. This is not a real security feature, but it does mean that a service at home is not reachable by default. With CGNAT the provider performs a second NAT, so port forwarding on your own router does not help.

Static and dynamic addresses

A dynamic address is assigned automatically, usually by DHCP, and can change over time. Most home internet connections and most devices in a local network use dynamic addresses. A static address is set by hand or reserved for one device, so it never changes. Servers, printers and network equipment normally need static addresses, because other systems depend on finding them at the same place.

How to find your IP address

There are two addresses to know: the private address of your device, and the public address that websites see. The public one is shown by our what is my IP tool. It also shows whether you connect over IPv4 or IPv6.

To see the private address of your device:

  • Windows: run ipconfig in Command Prompt.
  • macOS: run ipconfig getifaddr en0 in Terminal (Wi-Fi is usually en0).
  • Linux: run ip addr.

If the address on the status page of your router differs from the one shown by an online tool, your router is behind NAT or CGNAT, or you use a VPN or proxy.

IPv6 adoption basics

IPv6 was designed to replace IPv4 because the older address space is exhausted. In practice both run side by side, which is called dual stack. Many large networks, mobile carriers and content providers support IPv6, but a lot of smaller sites and company networks still use only IPv4, so you cannot assume that IPv6 works everywhere.

Some practical points:

  • IPv6 usually does not need NAT, because every device can have a global address. A firewall is therefore important.
  • A typical home network receives a /56 or /64 block, and each local network uses a /64. See our subnetting guide for the details.
  • A domain publishes its IPv6 address in an AAAA record, as explained in how DNS works.

Next steps

If you want to split a network into smaller parts or check how many hosts a range holds, use the subnet calculator. To learn what the numbers after the slash mean, read the article on subnet masks and CIDR.

Related guides