IP addresses

By Martin McBride, 2017-10-12
Tags: ip address
Categories: networks network hardware

Every computer on a network has a unique number, called an IP address. IP stands for Internet Protocol.

An IP address consists of 4 numbers. For example:

216.58.206.36

An IP address is four bytes long

Each of the four numbers can have any value between 0 and 255 (denary, or base 10). You might recognise this as being the range of values that can be represented by one [[Bytes|byte]]. In fact, and IP address is a four byte quantity, and the IP address above can be represented by a hexadecimal value:

D8 3A CE 24

These are the hex equivalents of the denary numbers above. However, an IP address is rarely written in hexadecimal, it is almost always written in the denary format.

Since each byte can have 256 possible values, and an IP address is four bytes long, the total number of unique IP addresses available is:

256 x 256 x 256 x 256 = ‭4,294,967,296‬

That is, a little over 4 billion unique values.

IP addresses and the Internet

The Internet is one giant network, and every computer attached to the Internet must have its own, unique IP address.

Four billion IP addresses might seem like a lot, and certainly when the Internet was first being developed in the 1950s it seemed like it would be enough. In those days, computers were very expensive and only governments, universities and large companies owned one.

These days computing devices are, of course, very common. As of 2015, there were over three billion people on the internet, in addition to all the computers owned by corporations. IP addresses can be shared to some extent, but a shortage of unique IP addresses is becoming an increasing problem.

Only computers which are directly connected to the Internet need a unique IP address. For example, most home computers connect through a Network router. The router has a unique IP address (usually assigned automatically by the Internet Service Provider), but the individual computers attached to the router use local IP addresses.

IPv6

The current system of IP addresses is called IPv4. This uses 4 bytes, that is 32 bits, per address.

A new system is currently being rolled out called IPv6. It uses 16 bytes, that is 128 bits per address. The total number of IPv6 addresses is 2 to the power 128, which is a very large number - it is about 3 x 1038, or 300 billion billion billion. We won't run out of addresses again for a very long time.

See also

Sign up to the Creative Coding Newletter

Join my newsletter to receive occasional emails when new content is added, using the form below:

Popular tags

555 timer abstract data type abstraction addition algorithm and gate array ascii ascii85 base32 base64 battery binary binary encoding binary search bit block cipher block padding byte canvas colour coming soon computer music condition cryptographic attacks cryptography decomposition decryption deduplication dictionary attack encryption file server flash memory hard drive hashing hexadecimal hmac html image insertion sort ip address key derivation lamp linear search list mac mac address mesh network message authentication code music nand gate network storage none nor gate not gate op-amp or gate pixel private key python quantisation queue raid ram relational operator resources rgb rom search sort sound synthesis ssd star network supercollider svg switch symmetric encryption truth table turtle graphics yenc