Skip navigation
Login   |   Register
Cisco Learning Home > CCENT/CCNA R&S Study Group > Documents
Up to Documents in CCENT/CCNA R&S Study Group
Currently Being Moderated

Fundamentals of Classful IPv4 addressing

VERSION 8 
Created on: Aug 11, 2011 9:43 PM by Navneet.Gaur - Last Modified:  Aug 25, 2014 9:53 PM by Navneet.Gaur

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

https://learningnetwork.cisco.com/message/406093

Note 2To view the included images clearly, click on them
Note 3Irrespective of the dates of edit, Cisco Learning Network maintains the history and keeps each edited version in its database for later reference
Note 4Index 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:

 

ClassFirst Octet Range
Valid Network Numbers

Total number for

this class of network

Number of

hosts per network

A1 to 1261.0.0.0 to 126.0.0.02^7 - 2* (126)2^24 - 2 (16,777,214)
B128 to 191128.0.0.0 to 191.255.0.02^14 (16,384)2^16 - 2 (65,534)
C192 to 223192.0.0.0 to 223.255.255.02^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

nnnnnnnnhhhhhhhhhhhhhhhhhhhhhhhh
Ip Address*'0'0000000000000000000000000000000

Default network mask

for "Class A" address'

11111111000000000000000000000000
Mask in Decimal255000

 

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
 
by the mask'

underneath the IP address

Network BitsNetwork Bits

Host bits

Bits used for

numbering hosts

Host bits

Bits used for

numbering hosts


nnnnnnnnnnnnnnnnhhhhhhhhhhhhhhhh
Ip Address*'10'000000*000000000000000000000000

Default network mask

for "Class B" address'

11111111111111110000000000000000
Mask in Decimal25525500

 

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
by the mask'

underneath the IP address

Network BitsNetwork BitsNetwork Bits

Host bits

Bits used for

numbering hosts


nnnnnnnnnnnnnnnnnnnnnnnnhhhhhhhh
Ip Address*'110'00000*00000000*0000000000000000

Default network mask

for "Class C" address'

11111111111111111111111100000000
Mask in Decimal2552552550

 

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

Comments (1)

Actions

Bookmarked By (6)

More Like This

  • Retrieving data ...