TCP_IP Tutorial – Part 2

Print

In this tutorial on TCP/IP we’ll be looking at how IP numbers and classes are derived. IP addresses are composed of 32 bits which are divided into 4 octets, as can be seen in the following binary example. The decimal equivalent that we are more used to seeing of this example would be 12.19.27.15. Now, the two do not look anything alike. Binary is what the computer works with, while we are more comfortable with the decimal equivalent.

Let’s take a look at how binary is translated into the decimal equivalent. Since each octet has eight bits, we’ll be converting each octet. Binary is based on the power of two. With 8 bits, we’ll calculate the values from bit position 20 to bit position 27 and list the values below them. We’ll refer to this table we created when converting from binary to decimal.

Now, let’s look again at our binary example. The first octet in our example is 00001100. To convert to decimal, we add the corresponding value if there is a 1 in the bit position. Since we have a 1 in the second and third position, we add 8 plus 4 to get our decimal equivalent. We repeat this for the other three octets, identifying which bit positions have a 1 and adding to find the decimal equivalent. This is how the IP number 12.19.27.15 was derived from the binary code that the computer uses.

Now, our table for converting from 8-bit binary numbers to the decimal equivalent: let’s go ahead and figure out what our lowest and our highest values are in an IP number. The lowest binary number would have all zeroes and the highest binary number would have all ones. For the low number we’d be adding all zeroes, and for the high number we add up all the bit values. Our lowest possible 8-bit number, then, would be 0, and our highest possible 8-bit number would 255. This means that the lowest IP number possible with these four octets is 0.0.0.0 and the highest IP number possible is 255.255.255.255.

IP numbers are divided into IP ranges called classes, which can be leased or licensed to businesses or organizations that require IP numbers for Internet use. IP numbers range from 1.0.0.0 to 126.255.255.255. These are called “Class A” networks. Class A networks are very large, with over 60 million IP numbers, and are assigned to very large organizations who often subnet and lease their IP numbers to smaller organizations and businesses.

Class B networks have a range of IPs from 128.0.0.0 to 190.255.255.255. Class B networks have a little over 64,000 IP addresses and are assigned to mid-size organizations and businesses.

Class C networks have the range of IPs from 190.0.0.0 to 223.255.255.255. Class C networks have 254 usable IP addresses and are assigned to smaller organizations and businesses.

Class C networks have the range of IPs from 190.0.0.0 to 223.255.255.255. Class C networks have 254 usable IP addresses and are assigned to smaller organizations and businesses.

Class D networks have the range of IPs from 224.0.0.0. to 239.255.255.255. Class D networks are reserved for multicasting.

Class E networks have the range of IPs from 240.0.0.0 to 254.255.255.255. Class E networks are reserved for testing and research purposes.

You might have noticed that some of the IP numbers are not accounted for in these classes we have listed. There are some IP numbers that are not used for classes or IP addressing. The 0 network, which is 0.0.0.0 to 0.255.255.255, is not used in IP addressing. The range of IPs from 127.0.0.0 to 127.255.255.255 are reserved for loopback testing functions and are not used in IP addressing either. The range of IPs from 255.0.0.0 to 255.255.255.255 are reserved for broadcast messages and are also not used in IP addressing.

[End of Transcript]