en

IPv4 (Internet Protocol version 4) is the fourth version of the Internet Protocol and the most widespread way of addressing hosts on a network. An IPv4 address is a 32-bit number written as four decimal octets separated by dots, for example 192.168.0.1. This is exactly the address that DNS returns in response to a query, finding it in the domain's A record.

How an IPv4 address is structured

Each of the four octets takes a value from 0 to 255, so the entire IPv4 space holds about 4.3 billion addresses. An address is logically split into two parts: the network and the host. Some addresses are reserved for private ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16), which are used inside local networks and are not routed on the internet.

When a browser receives an IPv4 address from DNS, it opens a connection to it and sends a GET request over the HTTP protocol. The whole journey is described in more detail in the article How a browser works.

IPv4 and IPv6

Because the pool of free addresses ran out, the IPv6 protocol appeared with 128-bit addressing. For now both versions coexist, and in DNS they are handled by different record types:

  • A record — maps an IPv4 address to a domain.
  • AAAA record — maps an IPv6 address to a domain.
  • Private and public addresses — public addresses are unique on the internet, while private ones repeat across different local networks behind NAT.

Understanding the structure of IPv4 helps make sense of routing, Dynamic DNS configuration and load balancing.

Structure of an IPv4 address
Learn more