Infrastructure & Networking
What is an IP address?
An IP address, Internet Protocol address, is a numerical label assigned to every device connected to a computer network that uses the Internet Protocol for communication. IP addresses serve two fundamental functions, identifying the device or network interface as a unique entity on the network, and providing the location information needed to route data packets from their source to their destination across the internet.
Every server that hosts a website, every router that routes internet traffic, every device that connects to the internet, smartphones, laptops, smart home devices, has an IP address. When a browser navigates to https://example.com the browser first resolves the domain name to an IP address through DNS: finding the numerical address of the server hosting example.com. The browser then connects to that IP address, establishing a TCP connection and initiating the HTTPS request. Without IP addresses the internet’s routing infrastructure would have no mechanism for directing data packets to their intended destinations.
IP addresses exist in two versions, IPv4 and IPv6, that differ in format, address space, and capabilities. IPv4, the original version, uses 32-bit addresses expressed as four decimal numbers separated by dots, 192.168.1.1. IPv6, the successor, uses 128-bit addresses expressed as eight groups of hexadecimal digits separated by colons, 2001:0db8:85a3:0000:0000:8a2e:0370:7334. IPv4’s 32-bit address space provides approximately 4.3 billion unique addresses, a number that proved insufficient as internet-connected devices proliferated. IPv6’s 128-bit address space provides 340 undecillion addresses, effectively unlimited for any foreseeable future.
IPv4 address structure
IPv4 addresses are the most familiar form of IP address, encountered in network configuration, server setup, and web infrastructure management.
Address format: an IPv4 address consists of four octets, eight-bit numbers, separated by dots. Each octet represents a value from 0 to 255, the decimal representation of an eight-bit binary number. 192.168.1.100 is a typical IPv4 address, four octets, each between 0 and 255, separated by dots.
In binary representation each octet is eight bits, 192 is 11000000 in binary, 168 is 10101000, 1 is 00000001, 100 is 01100100. The complete 32-bit binary representation is 11000000.10101000.00000001.01100100. This binary structure underlies how IP addresses are divided into network and host portions through subnet masking.
Network and host portions: an IPv4 address is divided into a network portion and a host portion by a subnet mask. The subnet mask identifies which bits of the IP address represent the network, shared by all devices on the same network, and which bits represent the host, unique to each device within that network. 255.255.255.0: binary 11111111.11111111.11111111.00000000: indicates that the first 24 bits are the network portion and the last 8 bits are the host portion.
An IP address of 192.168.1.100 with a subnet mask of 255.255.255.0 means the network is 192.168.1.0 and the host is 100 within that network. All devices on this network share the 192.168.1. prefix and are assigned unique numbers in the last octet.
CIDR notation: Classless Inter-Domain Routing notation expresses the subnet mask as a prefix length appended to the IP address with a slash. 192.168.1.0/24 indicates that the first 24 bits are the network portion, equivalent to a subnet mask of 255.255.255.0. 10.0.0.0/8 indicates an 8-bit network prefix, a large network with 24 bits available for host addresses. CIDR notation is used extensively in DNS and network configuration.
Private vs public IP addresses: not all IPv4 addresses are routable on the public internet. Three ranges are reserved for private networks, 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16. Private IP addresses are used within internal networks, home networks, corporate networks, data centre internal networks. Private addresses are not routable on the internet, they cannot be used as public server addresses.
Public IP addresses are assigned by Regional Internet Registries, ARIN for North America, RIPE NCC for Europe, APNIC for Asia-Pacific, and are globally routable on the internet. A web server accessible on the internet must have a public IP address or be accessible through a device with a public IP, such as a router performing Network Address Translation.
IPv6 address structure
IPv6 addresses use a significantly different format, reflecting the much larger address space and additional features of IPv6.
Address format: an IPv6 address consists of eight groups of four hexadecimal digits separated by colons. 2001:0db8:85a3:0000:0000:8a2e:0370:7334 is a full IPv6 address. Hexadecimal digits include 0-9 and a-f: each hexadecimal digit represents four bits, so four hexadecimal digits represent 16 bits per group and eight groups represent 128 bits total.
Address compression: full IPv6 addresses are lengthy and often contain consecutive groups of zeros. IPv6 provides compression rules to shorten addresses. Leading zeros within a group can be omitted, 0db8 becomes db8. One or more consecutive groups of all zeros can be replaced with ::: but only once per address. 2001:0db8:0000:0000:0000:0000:0000:0001 compresses to 2001:db8::1. This compression makes IPv6 addresses more manageable while the full 128-bit address remains unambiguous.
IPv6 address types: IPv6 defines several address categories beyond the unicast addresses most familiar from IPv4. Unicast addresses identify a single interface, 2001:db8::1. Multicast addresses identify groups of interfaces, packets sent to a multicast address are delivered to all members of the group. Anycast addresses identify a set of interfaces where packets are delivered to the nearest interface, used by CDN networks and DNS infrastructure for geographic routing.
Link-local addresses: IPv6 addresses beginning with fe80::/10 are link-local, valid only on the local network segment and not routable beyond it. Every IPv6 interface automatically configures a link-local address, useful for local network communication without requiring address configuration.
IP addresses and DNS
The relationship between IP addresses and DNS is the fundamental addressing mechanism of the web, DNS translates human-readable domain names into the IP addresses that network infrastructure uses for routing.
A records: IPv4: DNS A records map domain names to IPv4 addresses. example.com A 93.184.216.34 associates the domain example.com with the IPv4 address 93.184.216.34. When a browser resolves example.com it queries DNS for the A record and receives the IPv4 address, which it then connects to.
AAAA records: IPv6: DNS AAAA records map domain names to IPv6 addresses. The AAAA name, quad-A, reflects that an IPv6 address is four times as long as an IPv4 address in terms of bits. example.com AAAA 2606:2800:220:1:248:1893:25c8:1946 associates the domain with an IPv6 address. Browsers that support IPv6 prefer AAAA records over A records when both are present.
Multiple A records for load distribution: a domain can have multiple A records pointing to different IP addresses, example.com A 93.184.216.34 and example.com A 93.184.216.35. DNS clients receive multiple addresses and connect to one, browsers typically try the first address and fall back to others if the connection fails. Multiple A records provide simple DNS-based load balancing: though without health awareness, traffic distribution may be uneven and failed servers continue to receive DNS queries until their records are removed.
DNS TTL and IP address propagation: DNS records include a TTL, Time To Live, that specifies how long resolvers should cache the record. When an IP address changes, moving a site to a new server, reducing the TTL before the change ensures the new IP address propagates quickly after the DNS record is updated. A TTL of 300 seconds means the new IP address is in use globally within 5 minutes of the DNS update. A TTL of 86400 seconds, 24 hours, means some resolvers may continue sending traffic to the old IP address for up to 24 hours.
IP addresses and web hosting
IP addresses are central to web hosting infrastructure, determining how servers are addressed, how SSL certificates are provisioned, and how hosting is configured.
Dedicated vs shared IP addresses: web servers may use dedicated IP addresses, one IP per domain, or shared IP addresses, multiple domains sharing one IP. Historically dedicated IP addresses were required for SSL certificates: each HTTPS domain needed its own IP for TLS to present the correct certificate. SNI, Server Name Indication eliminated this requirement, SNI allows multiple SSL certificates to be served from the same IP address by including the hostname in the TLS handshake. Modern web hosting predominantly uses shared IP addresses with SNI for SSL.
IP addresses and server location: an IP address’s registration with Regional Internet Registries reveals its geographic assignment, the country, region, and often the specific data centre where the IP is registered. IP geolocation databases use this registration information alongside network routing data to associate IP addresses with geographic locations. Geo-redirects: routing users to region-specific content, use IP geolocation to determine a visitor’s location and redirect accordingly.
IP addresses for origin server identification: CDN platforms connect to origin servers by IP address, the CDN’s edge servers forward cache miss requests to the origin’s IP address. Protecting the origin’s IP address from public discovery, preventing attackers from bypassing the CDN, is an important security practice. Origin IP addresses should not appear in public DNS records, SSL certificate transparency logs, or email headers.
IP addresses and redirects
IP addresses interact with redirect management in several specific contexts, from configuring redirect infrastructure to implementing IP-based routing logic.
IP address configuration for redirect domains: domains configured as redirect sources need their DNS records pointing to the redirect management infrastructure’s IP addresses. A DNS A record for the redirect source domain points to the redirect platform’s IP address, or CNAME record pointing to the redirect platform’s domain. All traffic to the redirect source domain flows to the redirect platform’s infrastructure.
Anycast IP addresses for global redirect performance: redirect management platforms built on CDN or edge network infrastructure use anycast IP addresses, the same IP address is announced from multiple geographic locations simultaneously. Network routing protocols direct each user’s request to the nearest anycast node. A user in Tokyo connecting to an anycast IP for a redirect platform reaches the Tokyo edge node, not a server in the United States. Anycast addressing is the network-level mechanism enabling globally low-latency redirect responses.
IP-based redirect rules: some redirect configurations route requests based on the client’s IP address, serving different redirect destinations to users from specific IP ranges. Enterprise applications may redirect internal IP ranges, corporate office IP addresses, to internal resources while redirecting external IP ranges to public destinations. IP-based redirect logic is implemented at the application or edge function level, evaluating the client IP against configured ranges and selecting the appropriate redirect destination.
IP address in server logs for redirect analysis: web server logs record the client IP address for every request, including redirect responses. Analysing server logs for IP address patterns reveals geographic distribution of redirect traffic, identifies unusual traffic sources, and provides data for understanding redirect usage. IP address data in redirect logs helps distinguish legitimate user traffic from bot traffic, bots may originate from known data centre IP ranges while legitimate users connect from residential and mobile IP ranges.
Common IP address concepts
Static vs dynamic IP addresses: servers typically use static IP addresses, permanently assigned and consistently associated with the same server. Static addresses are required for DNS, a server whose IP address changes cannot maintain consistent DNS records without dynamic DNS updates. Dynamic IP addresses, commonly assigned to consumer internet connections, change periodically. Home users and mobile devices typically have dynamic IP addresses. Servers and business internet connections typically use static addresses.
NAT, Network Address Translation: a technique that allows many devices on a private network to share a single public IP address. A home router receives one public IP address from the internet service provider and assigns private IP addresses to all connected devices. When a device on the private network makes an internet request the router translates the private IP address to the public IP address, allowing the response to be routed back through the router to the originating device. NAT is the mechanism that made the IPv4 address shortage manageable, enabling billions of devices to share the limited pool of public IPv4 addresses.
Localhost: 127.0.0.1 in IPv4 and ::1 in IPv6, the loopback address representing the device itself. A server application running on a computer and listening on 127.0.0.1 is only accessible from the same computer, not from the network. Localhost addresses are used for local development, running web servers locally for testing before deploying to public servers.