The Internet protocol (IP) knows each host by a number, the so-called IP address. On any given network, this number must be unique among all the hosts that communicate through this network.
The IP address of someone browsing the world wide web is known to the server of the web site. Also it is usually in the header of email messages one sends. Depending on one's Internet connection the IP address can be the same every time, a static IP address, or different per session (but the first part being the same each time): a dynamic IP address.
Internet addresses are needed not only for unique enumeration of hosts, but also for routing purposes, therefore a high fraction of them is always unused. As there are only a limited number of 32-bit IP addresses currently available to be allocated, with rising demand for new devices, including personal communicators for up to 6 billion people world-wide, there is a real prospect of the world running out of IP addresses.
A number of measures have been taken to conserve the existing IPv4 address space (such as CIDR and the use of NAT and DHCP), but there is a general consensus that the Internet is going to have to upgrade its addressing scheme to the longer 128-bit IPv6 addressing scheme sometime in the next 5 to 15 years.
In IPv4, the current standard protocol for the Internet, IP addresses consist of 32 bits, which makes for 4,294,967,296 (over 4 US billion) unique hosts in theory. In practice the address space is sparsely populated due to routing issues, so that there is some pressure to extend the address range via IP version 6 (see below).
IPv4 addresses are commonly expressed as a dotted quad, four octets (8 bits) separated by periods. The host known as www.wikipedia.com currently has the number 2,187,229,895, written as 18.104.22.168. (Resolving the name "www.wikipedia.com" to its associated number is handled by DNS.)
A range of consecutive IP addresses (also called a netblock or subnet) can be specified in various ways. An older method uses a network number (a dotted quad, e.g. 22.214.171.124) together with a netmask (another dotted quad, for example 255.255.255.240) which in binary notation consists of a series of 1's followed by a series of 0's. Here the netblock is comprised of all the addresses, that, when binary ANDed with the netmask, result in the network number; 126.96.36.199 through 188.8.131.52 in our example.
A shorter form, known as CIDR notation, gives the network number followed by a slash and the number of 'one' bits in the binary notation of the netmask (i.e. the number of relevant bits in the network number). Using this notation, the netblock above could be referred to as 184.108.40.206/28 or as the 220.127.116.11/28 prefix.
The actual assignment of an address is not arbitrary. An organization, typically an Internet service provider, requests an assignment of a netblock from a registry such as ARIN (American Registry for Internet Numbers). The network number comprises a range of addresses which the organization is free to allocate as they wish. An organization that has exhausted a significant part of its allocated address space, can request another netblock.
For example, ARIN has allocated the addresses 18.104.22.168 through 22.214.171.124 to Verado, Inc. In turn, Verado has allocated the addresses 126.96.36.199 through 188.8.131.52 to Bomis. Bomis, in turn, has assigned the specific address 184.108.40.206 to the host that is www.wikipedia.com.
Some private IP address space has been allocated via RFC 1918. This means the addresses are available for any use by anyone and therefore the same RFC 1918 IP addresses can be reused. However they are not routeable on the internet. They are used extensively due to the shortage of registerable addresses and therefore Network address translation is required to connect those networks to the internet.
In IPv6, the new (but not yet widely deployed) standard protocol for the Internet, addresses are 128 bits wide, which, even with generous assignment of netblocks, should suffice for the foreseeable future. This big address space will be sparsely populated, which makes it possible to again encode more routing information into the addresses themselves. A version 6 address is written as eight 4-digit hexadecimal (16-bit) numbers separated by colons. One string of zeros per address may be left out, so that 1080::800:0:417A is the same as 1080:0:0:0:0:800:0:417A
Global unicast IPv6 addresses are constructed as two parts: a 64-bit routing part followed by a 64-bit host identifier.
Netblocks are specified as in the modern alternative for IPv4: network number, followed by a slash, and the number of relevant bits of the network number (in decimal). Example: 12AB::CD30:0:0:0:0/60 includes all addresses starting with 12AB00000000CD3.