3.1k views

In the IPv4 addressing format, the number of networks allowed under Class $C$ addresses is:

1. $2^{14}$
2. $2^{7}$
3. $2^{21}$
4. $2^{24}$
edited | 3.1k views

bits
Size of network
number
bit field
Size of rest
bit field
Number
of networks
per network
in class
Class A     0     8     24     128 (27)     16,777,216 (224)     2,147,483,648 (231) 0.0.0.0 127.255.255.255
Class B     10     16     16     16,384 (214)     65,536 (216)     1,073,741,824 (230) 128.0.0.0 191.255.255.255
Class C     110     24     8     2,097,152 (221)     256 (28)     536,870,912 (229) 192.0.0.0 223.255.255.255
Class D (multicast)     1110     not defined     not defined     not defined     not defined     268,435,456 (228) 224.0.0.0 239.255.255.255
Class E (reserved)     1111     not defined     not defined     not defined     not defined     268,435,456 (228) 240.0.0.0 255.255.255.255

We have $32\text{ bits}$ in the $\text{IPV4}$ network

Class A $=\text{ 8 network bits + 24 Host bits}$

Class B $=\text{ 16 network bits + 16 Host bits}$

Class C $=\text{ 24 network bits + 8 host bits}$

Now for Class C we have $3\text{ bits}$ reserved for the network id...
Hence remaining bits are $21.$ Therefore total number of networks possible are $2^{21}$.

Similarly in Class B we have $2\text{ bits}$ reserved...
Hence total number of networks in Class B are $2^{14}$.

And we have $1\text{ bit}$ reserved in Class A, therefore there are $2^7$ networks.

And a better reasoning for the bit reservation is given here. have a look.

edited
+1

Isnt the correct answer be 221-2, because first and last network IDs are not used as Network ID of any network

+3
@anchitjindal07 the question asks for the number of networks "allowed" in class C network, and therefore base address and broadcast address are also allowed in it.
ans c)

1
2