In the tutorial on ip4 adress classes:
http://www.tutorialspoint.com/ipv4/ipv4_address_classes.htm
Class B has 16384 (2**14)
Network addresses and 65534 (2**16-2)
Host addresses.
Class C gives 2097152 (2**21)
Network addresses and 254 (2**8-2)
Host addresses.
In the tutorial on ip4 adress classes:http://www.vlsm-calc.net/ipclasses.php
Class B has 163842(2**14-2)
Network addresses and 65534 (2**16-2)
Host addresses.
Class C gives 20971520(2**21-2)
Network addresses and 254 (2**8-2)
Host addresses.
Both of them for class A ,the number of networks is 126 (2**7 – 2)
.
Which number of networks on class B and class C is correct?
For class B , the number of networks is (2**14-2)
or (2**14)
?
For class C , the number of networks is (2**21-2)
or (2**21)
?
Class B has 16384 (214) Network addresses and 65534 (216-2) Host addresses.
A Class C address consists of a 24-bit network address and an 8-bit local host address. The first three bits in the network address indicate the network class, leaving 21 bits for the actual network address. Therefore, there are 2,097,152 possible network addresses and 256 possible local host addresses.
Class B IP addresses are used for medium and large-sized networks in enterprises and organizations. They support up to 65,000 hosts on 16,000 individual networks. Class C addresses are most common and used in small business and home networks. These support up to 256 hosts on each of 2 million networks.
Class C Networks (/24 Prefixes) It is a 21-bit network number with 8-bit host number. This class defines a maximum of 2,097,152 (2 21 ) /24 networks.
Rather than point to a reference, I'm going to enumerate them all, and then use mathematics:
0.X.X.X
to 127.X.X.X
- a total of (127-0+1)=128 networks.
127.X.X.X
is reserved as the LocalHost network - most assume that means only 127.0.0.1
, but it's actually all of them.]
.X.X.X
, each network cannot use .0.0.0
or .255.255.255
, so that's the -2
in the Host count.128.0.X.X
to 191.255.X.X
- a total of (191-128+1) * (255-0+1) = 16,384 networks.
.X.X
, each network cannot use .0.0
or .255.255
, so that's the -2
in the Host count.192.0.0.X
to 223.255.255.X
- a total of (223-192+1) * (255-0+1) * (255-0+1) = 2,097,152 networks.
.X
, each network cannot use .0
or .255
, so that's the -2
in the Host count.In short, neither source is correct if they both say that there are 126 Class A networks.
As a final example: in the old "Classful" networks neither 0.0.0.0
nor 0.255.255.255
is a valid Host address, but any of 0.0.0.1
, 0.0.0.255
, 0.0.1.0
and 0.255.255.254
are.
[If you want a source, how about https://en.wikipedia.org/wiki/Classful_network#Introduction_of_address_classes]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With