An IP address is a numeric identifier for a host on an IP network. Two versions are in use. IPv4 has 32-bit addresses, written as four dotted octets like 192.0.2.1. There are only about four billion of them, and the pool was exhausted years ago; NAT and private networks (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) extend their utility. IPv6 has 128-bit addresses written in hexadecimal groups separated by colons like 2001:db8::1. There are enough for every grain of sand on Earth many times over.
Addresses are assigned to network interfaces, and a host can have many—loopback (127.0.0.1, ::1), physical Ethernet, Wi-Fi, VPN tunnels, container bridges. List them with ip addr show, ip -4 addr, ip -6 addr, or hostname -I.
Addresses live within subnets defined by CIDR notation (192.0.2.0/24 means the first 24 bits identify the network). Routing between subnets is governed by the kernel's routing table, inspectable with ip route. Private address ranges are routed only within local networks; public addresses are globally routable. NAT translates between the two, enabling many devices on a private network to share a single public IP.
Related terms: TCP/IP, ip command, cidr
Discussed in:
- Chapter 12: Networking — IP Addresses, Ports, and Sockets
Also defined in: Textbook of Linux