IPv4 (Internet Protocol version 4) has been around since the early 1980's and is still the dominant networking protocol being used today to route traffic throughout the Internet. IPv4 uses 32-bit (four-byte) which translates to 4294967296 (232) addresses. As the Internet grew larger, this became insufficient and thus stimulated the development of IPv6 in the 1990's which has been in commercial deployment since 2006.
IPv4 consists of 2 sections which are the network identifier and the host identifier. The network identifier consists of the most significant bits of the IPv4 address, the length of which is variable. The remaining bits become the host identifier.
Example of an IPv4 address in dotted-decimal notation
The IPv4 addresses used to be divided into class A, class B, class C, class D and class E. Class A, B & C had 8 bits, 16 bits & 24 bits respectively as their network identifier. Class D was multi-cast and class E was reserved. Then came the introduction of Classless Inter-Domain Routing (CIDR). With CIDR, IP addresses are able to be allocated with a variable number of bits in the network identifier. This enabled a more efficient allocation of IP addresses.
Example of an IPv4 address in CIDR notation ( /24 means the 24 most significant bits is the network identifier)
While most of the IPv4 addresses can be used on a public network like the Internet, there are some private ranges which are only meant for use in local area networks and broadcast operations.
On February 3, 2011, the IPv4 pool was exhausted and no more allocations could be made. With the advent of Internet of things, more and more devices will be connected to the Internet. This is where IPv6 will come in as there will be a whole lot more addresses that can be allocated from that pool.