Options
Hard time grasping concept
louzam2115
Member Posts: 18 ■□□□□□□□□□
in Network+
Class
Bit Pattern
First Octet Range of Addresses
Number of Network Addresses
Number of Hosts Per Network
Default Mask
A
0xxxxxxx
1–126
126
16,777,214
255.0.0.0
B
10xxxxxx
128–191
16,384
65,534
255.255.0.0
C
110xxxxx
192–223
2,097,152
254
255.255.255. 0
D
1110xxxx
224–239
N/A
N/A
N/A
E
1111xxxx
240–254
N/A
N/A
N/A
Sorry about the format, I did a copy and paste, I am having a hard time trying to graps this topic, the book I am reading does not explain it very well. Can someone help me out here. I am trying to figure out why there are only that amount of network addresses and hosts available per class and how is it set.
Thanks
Bit Pattern
First Octet Range of Addresses
Number of Network Addresses
Number of Hosts Per Network
Default Mask
A
0xxxxxxx
1–126
126
16,777,214
255.0.0.0
B
10xxxxxx
128–191
16,384
65,534
255.255.0.0
C
110xxxxx
192–223
2,097,152
254
255.255.255. 0
D
1110xxxx
224–239
N/A
N/A
N/A
E
1111xxxx
240–254
N/A
N/A
N/A
Sorry about the format, I did a copy and paste, I am having a hard time trying to graps this topic, the book I am reading does not explain it very well. Can someone help me out here. I am trying to figure out why there are only that amount of network addresses and hosts available per class and how is it set.
Thanks
Comments

OptionsRicka182 Member Posts: 3,359Try reading through the Technotes That should give a real good explaination, at least for Net+. You don't really need to know about Class D & E, yet either. Just know they exist, and are for multiclass and testing. You could also check out Learn To Subnet. A very good site for FREE, which explains subnetting, but also covers IP addressing in depth.i remain, he who remains to be....

Optionsqsub Member Posts: 303Class C
192.168.1.X
X can be numbers 1  254.
0 and 255 are reserved.
192.168.1.0 = network ID
192.168.1.255 = broadcast
Now let's look at class B.
191.168.X.X
Two numbers are used to address instead of one.
191.168.1.1254
191.168.2.1254
191.168.3.1254
191.168.4.1254
191.168.5.1254
.
.
.
191.168.254.1254
191.168.255.1254
If you do the math, you would end up with a number like 65,000 for possible address'
Now let's take a look at class A
23.X.X.X
You can change up three numbers.
Which will make a lot more.
Makes any sense?
The first digit of the ip address will tell you what class it is.
X.0.0.0
If X is between 1  126 = Class A
If X is between 128  191 = Class B
If X is between 192  223 = Class C (Can't remember class C off the top of my head)
127 = reserved.
Someone correct me if I'm wrong.
EDIT: Fixed class C, I knew it was 192, just did a typo.World Cup 2006  Zidane  Never Forget. 
Optionskeatron Member Posts: 1,213 ■■■■■■□□□□Yes the first "octet" will tell you the class. Correction for class C is 192223 instead of 182223

Optionskjpou1 Member Posts: 13 ■□□□□□□□□□The key to understanding the classes and ranges is binary math. You really do
not have to know all of this for the Network+ exam but to understand the term
you use Bit Pattern you need to have a little bit of binary math background.
Also if you know how to calculate the ranges and where they come from you will not have to rely on your memory.
An octet is 8 bits. An IP address is made up of 4 octets giving you 4 x 8 bits
= 32 bits in all. For the classes all you have to look at is the first octet
to see where they get their ranges.
First the bits are numbered as followed from LEFT to right and numbered 7 to 0
not 8 to 1:
bit #: 7  6  5  4  3  2  1  0
Value: 128  64  32  16  8  4  2  1
It does not matter why it is like that jut remembered that it is like that.
The value is obtained by using 2 to the power of the bit number. For example
the first bit LEFT to RIGHT has a bit value of 7 so 2^7 or 2x2x2x2x2x2x2 = 128
and so on from LEFT to RIGHT same for bits 6 through 0 (zero).
I started doing binary math 22 years ago but have had to explain it a number of
times to different people. The way I do it is start with 1 and double the
value 7 times from right to left. Who cares about why, we really just need to
get the bit values Some find knowing the technical above is the key to
understanding it.
Now to understand the ranges you ask about.
Class A addresses must always have a 0 in the first bit of the octet. OK so
let's do it.
You have an octet, 8 bits, so the binary range would be from:
binary  decimal
0 xxxxxxx
0 0000001  1 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1 = 1
0 1111110  126 0 + 64 + 32 + 16 + 8 + 4 + 2 + 0 = 126
A '1' in the bit number corresponding from the table above means to add that
value.
* NOTE * 127 01111111 is a special case octet value so it is not used in the
class A range thus the range 1 to 126 and not 1 to 127. Check the internet for
what the 127 is used for.
** NOTE ** a zero value, 00000000, is not valid thus the range starting with 1.
Class B addresses must always have a 10 in the first and second bits of the
octet. OK so let's do it.
You have an octet, 8 bits, so the binary range would be from:
binary  decimal
10 xxxxxx
10 000000  128 128 + 0 + 0 + 0 + 0 + 0 + 0 + 0 = 128
10 111111  191 128 + 0 + 32 + 16 + 8 + 4 + 2 + 1 = 191
A '1' in the bit number corresponding from the table above means to add that
value.
Class C addresses must always have a 110 in the first, second and third bits of
the octet. OK so let's do it.
You have an octet, 8 bits, so the binary range would be from:
binary  decimal
110 xxxxx
110 00000  192 128 + 64 + 0 + 0 + 0 + 0 + 0 + 0 = 192
110 11111  223 128 + 64 + 0 + 16 + 8 + 4 + 2 + 1 = 223
A '1' in the bit number corresponding from the table above means to add that
value.
RANGES
Now for the ranges:
The symbol ^ is used to specify "to the power of".
The number of networks is calculated using the mask and the formula is (2^
number of network bits). We are calculating networks here not subnets which
uses a different formula.
CLASS A RANGES:
Because the range for class A addresses is 0xxxxxxx have only 7 bits for the
network. So using the formula above you have.
2^7=128 but a host value of 0 and 127 are not valid in class A so subtracting 2
from this gives 126 network addresses.
The number of hosts is calculated using the mask and the formula is (2^ number
of host bits)  2. If you go further than Network+ you will learn why there is
a minus 2 here. I am only trying to explain where the numbers came from for the
ranges.
Class A addresses uses the first octet always to specify the network and the
rest of the octets are hosts. So if the first octet is used and there are 3
left that gives us 3 x 8 = 24 bits.
2^24=16,777,216  2 = 16,777,214 host addresses.
CLASS B RANGES:
Class B addresses use the first 2 octects of an IP address which is 16 bits but
because the range is 10xxxxxx for class B you have only 14 bits for the
network. So using the formula above you have.
2^14= 16,384 network addresses.
Class B addresses uses the first 2 octets always to specify the network and the
rest of the octets are hosts. So if the first 2 octets are used and there are
2 left that gives us 2 x 8 = 16 bits.
Using the same formula above for calculating hosts (2^ number of host bits)  2.
2^16=65,536  2 = 65,534 host addresses.
CLASS C RANGES:
Class C addresses use the first 3 octects of an IP address which is 24 bits but
because the range is 110xxxxx for class C you have only 21 bits for the
network. So using the formula above you have.
2^21= 2,097,152 network addresses.
Class C addresses uses the first 3 octets always to specify the network and the
rest of the octets are hosts. So if the first 3 octets are used and there are
1 left that gives us 1 x 8 = 8 bits.
Using the same formula above for calculating hosts (2^ number of host bits)  2.
2^8=256  2 = 254 host addresses.
I will not go into Class D's and E's because you only need to know they exist
for the Network+ exam.
I hope this helps.
Kenneth