What Is IPv4?
IPv4 - is a fourth version of the Internet Protocol, which today is the main protocol to most of the Internet. IPv4 protocol defines the rules for the operation of computer networks on the packet-exchange principle. This is a low-level protocol that is responsible for the connection between the nodes of the network on the basis of IP-address.
Addresses of nodes (hosts) in the network, according to the IPv4 have a length of 32 bits, giving a total 232 = 4,294,967,296 possible addresses in the address space. But not all addresses are used for the global space (Internet), some addresses allocated for special needs, such as organizing local area networks, virtual network interfaces and are used for testing purposes, are special addresses, and so on.
Presentation of IPv4 addresses
IPv4 addresses are usually written as four decimal numbers from 0 to 255 separated by dots. For example, the minimum possible address - 0.0.0.0, the maximum - 255.255.255.255. A number from 0 to 255, usually in computer storage systems requires 1 byte or 8 bits of information to store, so 8 * 4 = 32 bits or 4 bytes, which correspond to the stated address length.
Although there may be used and other representations, depending on the needs (for example, address 184.108.40.206) could be represented as:
- Dotted record of:
- Decimal numbers: 220.127.116.11
- Binary numbers: 01111011.00101101.01000011.01011001
- Hexadecimal numbers: 0x7B.0x2D.0x43.0x59
- Octal numbers: 0173.0055.0103.0131
- Not dotted record:
- Decimal integer: 2066563929
- Binary: 01111011001011010100001101011001
- Hexadecimal: 0x7B2D4359
- Octal: 017355103131
Classless Addressing (CIDR)
Initially addressing in IP-based networks was done by the network class principle (there were classes that shared address space for large blocks). However, this scheme proved impractical and today on the Internet classless addressing is used, known as Classless Inter-Domain Routing, or abbreviated CIDR.
Generally, CIDR blocks can describe range of IP-addresses as the Internet subnets. Thus, the standard for CIDR notation is a record of "/" and a number from 0 to 32 followed by the IP-address that indicates a number of bits of the subnet mask, for example, 18.104.22.168/24
The number 24 in this case would mean number of high bits in the subnet mask. Since IP-address consists of 32 bits, but the mask defined as 24 high bits, it is possible to calculate available subnetwork addresses as the rest of mask bits: 32 - 24 = 8 bits. That is 28 = 256 possible addresses in the subnetwork. Or, if imagine our mask as 23 bits instead of 24, then there would be nine address bits available for subnetwork addresses = 92 = 512, and on the contrary, if the mask is, for example, 25 bits, for subnetwork addresses remain 232-25 = 27 = 128 possible addresses. Thus, we can describe the networks consisting of different amounts of available addresses. In addition, one large network can be split in a few smaller subnetworks. Them are in turn may also be divided into subnets etc.
It should be noted that the number of real hosts (network nodes) in the subnet always at least two less than the number of possible addresses in subnet address block (except /31 and /32 networks). This is due to the fact that the first address is reserved as the network ID, and the last is the broadcast address.
Special IPv4 addresses
According to RFC-6890 there are defined the following special addressess and address blocks for IPv4 networks:
|Description||Reserved by |
|0.0.0.0/8||"This host on this network"||Yes||RFC-1122|
|100.64.0.0/10||Shared Address Space||No||RFC-6598|
|192.0.0.0/24||IETF Protocol Assignments||No||RFC-6890|
|22.214.171.124/24||6to4 Relay Anycast||No||RFC-3068|
As can be seen above part of the entire IPv4 address space is used for special purposes. As for today, IPv4 address space is almost completely exhausted. All available addresses are used for special purposes or distributed to various organizations for the needs of their networks.
Therefore in recent years is ongoing transition to the new IPv6 protocol.