Unit content
IP addressing
The Internet Protocol uses IP addresses to identify network interfaces and provide addresses that routers can use for forwarding packets between networks.
IPv4
An IPv4 address contains $32$ bits and is usually written as four decimal octets:
192.0.2.15
The notation is a human-readable representation of the underlying binary address.
IPv6
IPv6 uses $128$-bit addresses, commonly written in hexadecimal groups, providing a vastly larger address space and other protocol improvements.
Network prefixes
An IP address is interpreted together with a prefix length that identifies a network range. For example,
192.0.2.0/24
contains addresses sharing the first $24$ bits.
Routers make forwarding decisions primarily from these destination prefixes rather than from arbitrary host names.
Public and private addressing
Some address ranges are reserved for private networks and are not globally routed on the public Internet. Other addresses can be globally reachable depending on routing and firewall policy.
An IP address is therefore a network-layer locator, not a permanent identity of a person, device or application. Interfaces can change addresses, and one host can have several addresses.