IP & network guide

IP addresses, IPv6 and CIDR

An IP address identifies an interface on an IP network. The address tells software where traffic should go; the surrounding prefix tells routers and hosts which part represents the network and which part identifies addresses inside it.

IPv4 and IPv6

IPv4 addresses are 32 bits long and are normally written as four decimal numbers such as 203.0.113.10. IPv6 addresses are 128 bits long and use hexadecimal notation, for example 2001:db8::10. IPv6 provides a vastly larger address space and is commonly deployed alongside IPv4 in dual-stack networks.

A website may see a different address family depending on your connection, ISP, VPN, network configuration and the route selected by the client.

Public, private and special-use addresses

Public addresses are routable across the public internet. Private IPv4 ranges such as 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 are intended for internal networks and are not directly routed across the public internet.

There are also loopback, link-local, documentation and other reserved ranges. That is why a useful IP lookup should identify the scope before treating an address as a normal public endpoint.

What CIDR means

CIDR notation combines an address with a prefix length. In 192.168.1.0/24, the /24 means the first 24 bits describe the network. That leaves 8 bits for addresses inside the block, giving 256 total IPv4 addresses from 192.168.1.0 through 192.168.1.255.

Increasing the prefix length makes the block smaller. A /25 contains half as many addresses as a /24. Decreasing it makes the block larger.

Try it

See the boundaries for yourself

Use the subnet calculator for a CIDR block, or the range calculator to turn arbitrary IPv4 start and end addresses into the smallest exact set of CIDR blocks.

ASN ownership is different from geolocation

An Autonomous System Number identifies a network that participates in internet routing. Looking up an IP's ASN can tell you which ISP, cloud provider, hosting company or organisation announces the address range.

GeoIP databases try to associate an IP range with a country, region or city. That information is approximate. It often reflects the ISP's network layout or registration data and should not be treated as a precise physical location for a device or person.

Useful checks when investigating an IP

  1. Check the scope. Is it public, private, loopback or otherwise reserved?
  2. Check the address family. IPv4 and IPv6 use different notation and prefix sizes.
  3. Look up the ASN. This often gives stronger network-owner context than GeoIP alone.
  4. Try reverse DNS. A PTR record may reveal a useful hostname, although many addresses have none.
  5. Treat location as approximate. Country and city data can be useful context but not proof of a precise location.
Terminal shortcut

Prefer the command line?

Turn CIDR notation into real network boundaries in the Terminal.

> subnet 192.168.1.10/24 Run in Terminal ->