|
Classless IP addressing
IntroductionThe web page entitled IP Protocol described the use of classes of IP addresses, as a way of making more efficient use of the possible 32 bits in the addresses. At the time of developing the concept of classes, the internet was quite small, with low growth expectations. However in the last few years, the growth rate has been phenomenal, with a corresponding enormous demand for IP addresses - to the extent that there is now a shortage of addresses. And it is the use of classes that has caused this shortage, as it is now clear that far from adding efficiency, the use of classes has caused massive wastefulness in IP addresses. The problem is that a large number of organisations requiring IP addresses typically require 500 to 2000 unique computer addresses. A class C network address only provides for 254 unique computer addresses, so all these organisations have to be given class B addresses. But a class B network address has the ability to provide 65,534 unique computer addresses, and since the organisation only needs 500 to 2000 of them, something like 64,000 to 65,000 unique computer addresses will never be used, and so are wasted. It therefore has become neccessary to develop a different way of specifying how many of the 32 bits define the network address, and how many define the unique computer addresses.
Classless IP addressingThe method developed is to have a system that enables any combination to be used, and to then add a suffix to the conventional dotted decimal notation, which specifies how many of the 32 bits define the network address. So a classless IP address has the generic form of aaa.bbb.ccc.ddd/x where the x is the number of bits used to define the network address. The table below shows how this provides for a very large number of permutations of available network addresses and unique computer addresses per network.
The above table shows the number of bits specifying the network address in the range from 8 up to 30. It is of course possible to use values less than 8, but in practice these are unlikely to be used. And 30 is the maximum limit at the other end of the scale. The above system therefore allows an organisation to be allocated a network IP address which matches quite closely the approximate of number of computers which the organisation expects to use on the network. So if an organisation is likely to have 750 computers on their network, the organisation could be allocated an IP address such as aa.bb.cc.dd/22 - this allows up to 1022 computers on the network. About 250 IP addresses are wasted by this allocation, but this is much better that wasting 65,000 IP addresses.
How it works at the binary levelThe above sections explain the concept of classless IP addressing, so now it is useful to examine how it all works at the binary level, which is the level at which computers operate. Look at a typical IP address in classless dotted decimal notation such as 134.36.80.30/22 Now convert the address portion to binary format - it looks like 10000110 00100100 01010000 00011110 The computers, or other devices on the network, also need to know how many bits identify the network, and how many bits identify the computer or device. This is done by the suffix " /22 " - the computers or other devices use the number 22 to generate a 32 bit word called a bit mask, or in some cases a sub-net mask The bit mask has a series of 1`s to show which bits in the 32 bit IP address indicate the network id, and a series of 0`s to indicate which bits in the 32 bit IP address indicate the computer or device id. So for the above value of 22 in the suffix, the bit mask is 11111111 11111111 11111100 00000000 The 32 bits of the IP address are logically `and-ed` with the 32 bits of the bit mask to identify which bits of the IP address identify the network, and which bits indentify the computer or device. For the IP address above therefore, the result is
The bit mask of 11111111 11111111 11111100 00000000 which was derived from the suffix " /22 "can, just like IP addresses, be represented by a series of numbers in dotted decimal notation. So the bit mask above can be be represented by 255.255.252.0 So an alternative way of describing the address 134.36.80.30/22 is to show the address and the bit mask as two seperate numbers in dotted decimal notation -
and it is the same thing.
© 2001 Ron Turner Return to the IP protocol home page
|
|