Monday, September 12, 2011

IPv4 Address Classes

Here's a chart to show you why the IP classes are broken up the way they are so you can quickly identify them.


As shown above, Class A addresses are those in which the first octet's value ranges between 1 and 127. The key to remembering this is that numbers from 1-127 will always have the first bit turned off [or 0xxxxxxx] when expressed in binary form. 1-127 can also be expressed as 00000001-01111111. It should also be noted that any 127.x.x.x address is a "loopback" address used only for testing purposes and will never be assigned to a network device, so while Class A addresses technically range from 1-127, some sources may imply that the class spans from 1-126.

Class B addresses will always have the first bit on and second bit off [or 10xxxxxx] in the first octet. This means everything between 128 [10000000] and 191 [10111111] would be considered a Class B address.

Class C and the consecutive classes D and E will follow suit by adding another on-bit in front each time you progress a tier. For example, Class C addresses will start with 110xxxxx, Class D with 1110xxxx and Class E begins with 1111xxxx and drops the off-bit we were carrying so that we can close the rest of the 0-255 spectrum. So, Class C addresses range from 192 [11000000] to 223 [11011111].

The Classes also define how many bytes or octets are used to express the network ID and how many are used for the host ID. In short, Class A addresses use the first octet for the network ID and the remaining three octets are used to distinguish the host ID. NETWORK.HOST.HOST.HOST

Class B uses the first and second octet to outline the network ID, leaving the third and fourth octets for the host ID. This results in a greater number of possible networks when compared to Class A, but with fewer hosts on each of those networks. NETWORK.NETWORK.HOST.HOST

The pattern continues with Class C, using the beginning three octets for the network ID and the final octet for host IDs, resulting in far fewer possible hosts. This concept is illustrated in the picture below. NETWORK.NETWORK.NETWORK.HOST




I found that picture in an old networking folder on my computer but I can't find the source to site it. I will gladly take it down if requested by the owner. I can be reached at admin@remedycomputing.com.

I will write more later on easily converting numbers between dotted-decimal form [172.16.30.56], binary form [10101100.00010000.00011110.00111000] and hexadecimal form [AC.10.1E.38].

No comments:

Post a Comment