Author: | Navneet Gaur |
Date: | August 2011 |
Description: | The following document explains the way Classful IPv4 address range has been created |
Note 1 | How to stop notifications, that are generated when I edit any one of the pre-existing documents |
Note 2 | To view the included images clearly, click on them |
Note 3 | Irrespective of the dates of edit, Cisco Learning Network maintains the history and keeps each edited version in its database for later reference |
Note 4 | Index of all my documents |
This is an additional explanation to the table on Classful addressing in exam certification guide, Pg 110, ICND1, by Wendell Odom
The table is as follows:
Class | First Octet Range | Valid Network Numbers | Total number for this class of network | Number of hosts per network |
---|---|---|---|---|
A | 1 to 126 | 1.0.0.0 to 126.0.0.0 | 2^7 - 2* (126) | 2^24 - 2 (16,777,214) |
B | 128 to 191 | 128.0.0.0 to 191.255.0.0 | 2^14 (16,384) | 2^16 - 2 (65,534) |
C | 192 to 223 | 192.0.0.0 to 223.255.255.0 | 2^21 (2,097,152) | 2^8 - 2 (254) |
- 2* This is to subtract the first network number 0.0.0.0 and last network 127.0.0.0. Out of this 127.0.0.0 is reserved for loopback address, which can be assigned to loopback adapters.
The portion colored in blue is explained in the following paragraphs.
Point 1
The network number part of the bits is defined using the first octet.
Point 2
The bits that will be used to define the network number are determined by the default mask for that class.
Accordingly,
Explanation 1
Class A has a default mask of 8 bits that translates to 255.0.0.0 in decimal as follows.
Class A | 1st Octet 1st eight bits out of 32 bits | 2nd Octet Bits numbered 9 to 16 from the left | 3rd Octet Bits numbered 17 to 24 from the left | 4th Octet Bits numbered 25 to 32 from the left |
---|---|---|---|---|
Role of the bits as 'dictated by the mask' underneath the IP address | Network Bits | Host bits Bits used for numbering hosts | Host bits Bits used for numbering hosts | Host bits Bits used for numbering hosts |
nnnnnnnn | hhhhhhhh | hhhhhhhh | hhhhhhhh | |
Ip Address | *'0'0000000 | 00000000 | 00000000 | 00000000 |
Default network mask for "Class A" address' | 11111111 | 00000000 | 00000000 | 00000000 |
Mask in Decimal | 255 | 0 | 0 | 0 |
First octet is used to decide the range of network address' available for a particular class of Ip address'.
The default network mask dictates the total number of bits available for all network numbers in that range.
Therefore in 'class A' first 8 bits are used for network ranges, as well as the fact that the default mask dictates that first eight bits are all that would indicate the network identity.
Class A - *0xxxxxxx
First octet is used for numbering the networks as defined by default mask, first octet is also used to decide the range.
Available number of bits that can be 'modified' as represented by 'x' are 7 and therefore number of possible different network number combinations using those bits is equal to 2^7
The first bit - represented by '0', stays the same for all the combinations.
So the first combination is - '0' 0000000 = decimal 0
Then - '0' 0000001 = decimal 1
Then - '0' 0000010 = decimal 2
Finally - '0' 1111111 = decimal 127
Bits that can be changed are colored red.
Total combinations using the bits that can be changed - 2^7
Therefore the range of Class A ip address starts from 0 and ends at 127
Explanation 2
Class B has a default mask of 16 bits that translates to 255.255.0.0 in decimal as follows.
Class B | 1st Octet 1st eight bits out of 32 bits | 2nd Octet Bits numbered 9 to 16 from the left | 3rd Octet Bits numbered 17 to 24 from the left | 4th Octet Bits numbered 25 to 32 from the left |
---|---|---|---|---|
Role of the bits as 'dictated underneath the IP address | Network Bits | Network Bits | Host bits Bits used for numbering hosts | Host bits Bits used for numbering hosts |
nnnnnnnn | nnnnnnnn | hhhhhhhh | hhhhhhhh | |
Ip Address | *'10'000000 | *00000000 | 00000000 | 00000000 |
Default network mask for "Class B" address' | 11111111 | 11111111 | 00000000 | 00000000 |
Mask in Decimal | 255 | 255 | 0 | 0 |
First octet is used to decide the range of network address' available for a particular class of Ip address'.
The default network mask dictates the total number of bits available for all network numbers in that range.
Therefore in 'class B' first 16 bits are used for numbering the networks, as the default mask dictates that first sixteen bits should indicate the network identity.
Class B - 10xxxxxx.xxxxxxxx
First two octets are used for numbering the networks as defined by default mask, first octet is used to decide the range
Available number of bits that can be 'modified' as represented by 'x' are 14 and therefore number of possible different network number combinations using those bits is equal to 2^14
The first two bits - represented by '10', stay the same for all the combinations.
So the first combination is - '10' 000000.00000000 = decimal 128.0
Then - '10' 000000.00000001 = decimal 128.1
Then - '10' 000000.00000010 = decimal 128.2
Finally - '10' 111111.11111111 = decimal 191.255
Bits that can be changed are colored red.
Total combinations using the bits that can be changed - 2^14
Therefore the range of Class B ip address starts from 128 and ends at 191
Explanation 3
Class C has a default mask of 24 bits that translates to 255.255.255.0 in decimal as follows.
Class C | 1st Octet 1st eight bits out of 32 bits | 2nd Octet Bits numbered 9 to 16 from the left | 3rd Octet Bits numbered 17 to 24 from the left | 4th Octet Bits numbered 25 to 32 from the left |
---|---|---|---|---|
Role of the bits as 'dictated underneath the IP address | Network Bits | Network Bits | Network Bits | Host bits Bits used for numbering hosts |
nnnnnnnn | nnnnnnnn | nnnnnnnn | hhhhhhhh | |
Ip Address | *'110'00000 | *00000000 | *00000000 | 00000000 |
Default network mask for "Class C" address' | 11111111 | 11111111 | 11111111 | 00000000 |
Mask in Decimal | 255 | 255 | 255 | 0 |
First octet is used to decide the range of network address' available for a particular class of Ip address'.
The default network mask dictates the total number of bits available for all network numbers in that range.
Therefore in 'class C' first 24 bits are used for network ranges, as the default mask dictates that first twenty-four bits should indicate the network identity.
Class C - 110xxxxx.xxxxxxxx.xxxxxxxx
First three octets are used for numbering the networks as defined by default mask, first octet is used to decide the range
Available number of bits that can be 'modified' as represented by 'x' are 21 and therefore number of possible different network number combinations using those bits is equal to 2^21
The first three bits - represented by '110', stay the same for all the combinations.
So the first combination is - '110' 00000.00000000.00000000 = decimal 192.0.0
Then - '110' 00000.00000000.00000001 = decimal 192.0.1
Then - '110' 00000.00000000.00000010 = decimal 192.0.2
Finally - '110' 11111.11111111.11111111 = decimal 223.255.255
Bits that can be changed are colored red.
Total combinations using the bits that can be changed - 2^21
Therefore the range of Class C ip address starts from 192 and ends at 223
- While in the hosts part all the bits can be varied or used with a different value if required at one time or another
- Essentially, we have to understand that computers operate in binary and treat the whole string of 32 bits as one string
- We have broken it up in four parts so that we can easily deal with it
------------------------------
The End