The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
+28 votes

The address of a class $B$ host is to be split into subnets with a $6$-$bit$ subnet number. What is the maximum number of subnets and the maximum number of hosts in each subnet?

  1. $62$ subnets and $262142$ hosts.

  2. $64$ subnets and $262142$ hosts.

  3. $62$ subnets and $1022$ hosts.

  4. $64$ subnets and $1024$ hosts.

asked in Computer Networks by Veteran (59.8k points)
edited by | 9.9k views
a class B network will have 65536 addresses max
@arjun sir check the qus 67 ?

I think here ans will be option C after edit ?
Arjun Sir, what is the  official key ? c or d?


The Rule :

" In general the number of available hosts on a subnet is 2h−2, where h is the number of bits used for the host portion of the address. The number of available subnets is 2n, where n is the number of bits used for the network portion of the address. This is the RFC 1878 standard used by the IETF, the IEEE and COMPTIA. "

we should follow this standard now. In Gate look at options carefully .

Read this RFC

And that time in 2007 no official key released.



This question was asked in previous year's ISRO exam (2016). And their answer key also has option C as the correct answer. 

With all the confusion regarding the new and the old standards, I guess, for ISRO exams, we should stick with the old standard of subtracting 2 from networks, subnetworks and hosts.



Please Don't judge a question from any ISRO papers, 
ISRO asked completely wrong question too , they took questions either from Timothy Williams book or Old gate papers..

yes this question when asked in GATE 2007 that time no official answer key , also GATE committee followed old convention that time. ISRO took this as a reference.

This year ISRO even asked completely wrong question too 

Just read all discussion here 

finally ISRO admit that this question was wrong in their newly released answer key. They said no options are correct. 

In GATE if this concept comes again in next year, we should follow New convention , as new convention is based on RFC 1878 while old convention is based on RFC 950 , so new one is more acceptable . 

And yeah read what Wikipedia says " 

The RFC 950 specification recommended reserving the subnet values consisting of all zeros  and all ones (broadcast), reducing the number of available subnets by two.

However, due to the inefficiencies introduced by this convention it was abandoned for use on the public Internet, and is only relevant when dealing with legacy equipment that does not implement CIDR. The only reason not to use the all-zeroes subnet is that it is ambiguous when the prefix length is not available. RFC 950 itself did not make the use of the zero subnet illegal; it was however considered best practice by engineers."

and GATE committee nowhere mention which convention to follow ..

If GATE committee don't give marks for new convention we can challenge them !

Thanks Bikram sir. Nice explanation. Will keep this in mind for future questions. :)
at any cost the no of subnets will not be 62 they should be 64 and the no of hosts can be made 2^n in present routers of cisco  i have read it some where so  64 ,1024  can be right

12 Answers

+42 votes
Best answer

In class B .. first 2 octet are reserved for NID and remaining for HID .. so first 6 bits  of  3rd octet are used for subnet and remaining 10 bits for hosts ..

Maximum number of subnets  = $\large 2^{6}-2=62$

Note that 2 is subtracted because subnet values consisting of all zeros and all ones (broadcast), reducing the number of available subnets by two in classic subnetting. In modern networks, we can have 64 as well. See here:

and no of hosts = $\large 2^{10}-2=1022$.

2 is subtracted for Number of hosts is also. The address with all bits as 1 is reserved as broadcast address and address with all host id bits as 0 is used as network address of subnet.

So option (C) is correct..

answered by Boss (17k points)
selected by
why we have subtracted 2 ?
they are reserved , 1st for n/w id or subnet id, and last one all 1 , for broadcasting
got it..thanks for quick reply..
Let's take 1 bit as subnet what is use of it...

Ans should be 64 and 1022

@Gabbar see here:

Given a choice of 64 and 62, 64 is better now. But 1024 can never be possible making C choice the answer. 

Thanks... Got it..
I think answer should be (d) bcoz they asked about max. no. of hosts per it includes both first and last ip of every subnet...they didn't ask about Valid host addresses... and the concept of excluding 1st and last subnet is obsolete.

@Arjun sir , please correct me If I'm wrong
How 2^11 = 1024 ?...

It was a typo- corrected..
What would be the number of subnets if it were a numerical type question ?
@aksh here answer is both one correct  if u substract or not substract by 2....i think gate is given some extra information ...other it given marks both of them...its not a problem.
+43 votes

This question is asking maximum no of subnets and hosts/subnet...NOT how many hosts are configurable. So, no need to Subtract $2$ in either case.
Subnet bits $=6$
means $2^6$  or $64$ subnets are possible..
and, total hosts=$2^{10}$ or $1024$ hosts..again no need to subtract $2$ since question is asking maximum no of hosts possible not how much we can configure.
So, option d should be right according to what they mean by maximum.

This is becoming a very debatable question now....firstly whatever explanation i have given is right according to question formation...people are arguing that we should subtract $2$ hosts from the available, for use..i agree..but this question was about maximum possible and one option also i gone with this...

Now what to do if something like this happens again in future?

From all previous year questions over this topic it seems like we have to mind read them as what they actually mean...means for the gate questions they are treating maximum possible hosts and available hosts all as go only according to that else it would be very difficult to prove their thoughts wrong..

Now if asked how many maximum subnets we can use..dont subtract anything. This at least i can prove easily but mind it. GATE still uses previous conventions of subtracting $2$ subnets..atleast this is what shown here in $2007$..

If they ask maximum hosts or configurable hosts, anything. They actually wants us to subtract $2$ from the hosts and then answer. For gate questions i think English doesnt matter..u should answer according to the past experiences and questions they have asked.

At last, for this question maximum subnets are $64$ and hosts are $1022$ is the actual answer but according to old conventions $62$ and $1022$.So, go with.
Option $C$(closest). Choose wisely in the exam. I have explained each aspect of the question.
I rest here and there should not be any more confusion regarding this!!

answered by Boss (19.7k points)
edited by
no no nothing is subtracted simple terms now we dont have any IP wastage...we can use all 0s in HID part as NID as well as an valid IP also..nwe routers are degined this way now CISCo routers have DHCP implemented over their router only....but theoritically it is not possible since router dont have AL and DHCP requires AL....means now we need nt waste 2 IPs for NID or DBA..according to our need ,softwares will handle this..
u didnt read the paragraph above this's given that this is the traditional way....atlast they have mentioned now these practices are obselete....please read all paras of rfc u'll get it :)

infact this question isnt abt that's only asking how many maximum possible hosts u can if u have 5 apples(though u cant eat 2,according to old traditions) still maximum u have is 5 only right...not how many hosts are valid or maximum u can eat is 3....same is the case dont get confused!!


ok @sudsho, i am not against you but i am still confused so i am putting last comment on this doubt. plz do not get me wrong.

i read para. above table.

The number of available network and host addresses are derived from
   the number of bits used for subnet masking.  The tables below depict
   the number of subnetting bits and the resulting network, broadcast
   address, and host addresses.  Please note that all-zeros and all-ones
   subnets are included in Tables 1-1 and 1-2 per the current,
   standards- based practice for using all definable subnets [4].

   Table 1-1 represents traditional subnetting of a Class B network

this tells story about subnets. and traditional way is new way. the way which we are talking that all 0s and all 1s are not allowed was known as classic way of subnetting. two ways classic/traditional are for subnetting. hosting is done in same manner still.

so subnets are 64, that is right, but i still thinks that there is no host available in real with ip assigned all 0s or all 1s. 1024 valid/total/available ips. 1022 are  valid host ips. ( read it as valid "host ips", not as "valid host" ips.

anyway thanks for your concern but i am still in doubt.. ao i rest here

no no bro its fine...its a gate question u shouldnt agree only by what i say :)
look ur doubt is whether we can configure those 2 hosts or not right?
i also have that doubt...but it's possible now...even if we say its not possible then also i have already mentioned in my answer that this question isnt abt that....that how much we can configure or how much are's only asking how many u for this question we need to consider every host we have....

rest if they would have asked how many hosts are valid or something like this...then i truely believe marks should be given to everyone despite the fact u subtracted 2 from hosts or not...


"In general the number of available hosts on a subnet is 2h−2, where h is the number of bits used for the host portion of the address.

The number of available subnets is 2n, where n is the number of bits used for the network portion of the address. This is the RFC 1878 standard used by the IETF, the IEEE and COMPTIA. "

Reference :



 For that 2008 question -> it is looking for maximum number of hosts per subnet  .

the number of available hostes per subnets 2h - 2 = 2^11 - 2 = 2048 - 2 - 2046

Now question asks for maximum number of hosts , which is  based on the standard number of available hosts = 2046

in all prev gate papers they use  2- 2  for calculating  total number of available hosts .

Hence the option 2046 is correct.

Ok thanks.
@sudsho, while your proposition is right,

they have to mention including non configurable,

without a subnet id, the subnet doesn't exist, there's no way to assign a division of space,which is why the subnet is for,

When not mentioned we have to enable a subnet id and a broadcast ID in the subnet
If we subtract $2^6 - 2$ then we are removing all the hosts whose subnet is 000000 and 111111, meaning neither 10000000.11111111.00000000.00000001 nor 10000000.11111111.11111100.00000001 will be part of any network, despite being valid. Why?
+5 votes

Answer should be C

Maximum number of subnets = 2^6-2 =62. 
Note that 2 is subtracted from 2^6. The RFC 950 specification reserves the subnet values consisting of all zeros (see above) and all ones (broadcast), reducing the number of available subnets by two.

no of hosts = 2^10 -2 = 1022 .

answered by Active (3.8k points)
reshown by
@Arjun sir please verify
Question is not asking "usable subnet" rt?
sir this is que no 72 where i have doubt ..if we use class B for subnetting of 6 subnets then according to that we have 6 1's and remaning all bits are now 0.i.e we have 8.11111100.00000000.00000000

so accodringly we have 2^6-2 =62 subnets

and 2^18-2 =262412 hosts .As they are asking for maximum subnet and hosts?
for class B it should be 11111100.00000000 coz in class B first 16 bit for network and rest 16 bits are host
ohk so we first two octets are full we start subnetting from 3rd we take 8.8.11111100.0000000
yes.. For class B.
yes..technical defn of subnet::::: borrowing bits from host id
ohk sir what about que no 32?

ie TM is unidirectional orbidirectional? Isnt it that both should be correct ? i mean obtions A as well as C.
No, TM with bidirectional movement can accept not just regular set. Only if the writing capability is removed it accepts a regular set. "Unidirectional" is one way to remove the writing capability as then the written letters won't be read again by the TM.
HERE in this queston it is not mentioned that whether for writting or reading?
+2 votes
first 2 octets for NID in class B , subnet number takes 6 bits more .. total length = 16 +6 .
no of subnets = 2^6 ..
no bits remains for HID part = 2+8 = 10
no of hosts per network = 2 ^ 10 -2(exclude all 0s and 1s)
 = 1022
64 subnets 1022 hosts ...
But while i was doing previous year ques from book i didnt find that option.
answered by (47 points)
reshown by
previous year book are not made by GATE.
+1 vote
64 and 1022
answered by (29 points)
reshown by
0 votes
The matter of 2 subnets has a lot to debate over, but by default we have to assign a subnet ID and a broadcast ID,

Since the subnet will not exist without subnet ID

And as far as maximum goes, if it's specifically told to include those two ID's, is the only case when we do
answered by (31 points)
0 votes

hahahha :) this question is so debatable , so why not I participate in this :p

As per me both C and D are technically incorrect in some perspective

If you gonna ask it on CISCO learning or some else technical learning platform , it should be 64 subnets and 1022 hosts. As now we don't have restriction on subnet which was earlier and was called all-zeros and all-ones subnet problem, where we were not supposed to use the first and last subnet in a network.

I asked it on cisco learning portal 

When you say host it means a IP that can be assigned to an end-user device and in any subnet we can't assign two IP one is Subnet ID ( or N/w ID ) and other is DBA address.

So if such question is asked , full marks should be awarded irrespective to the answer C and D.

answered by Junior (749 points)
edited by
0 votes

See, the option they are given is all wrong. There is no rule that you have to subtract 2 from the number of subnets, yes we are going to subtract 2 from the number of hosts because all 0's and all 1's in host part are reserved for the network address and broadcast address for the respective subnet.

The rule that says subtract 2 is for class A only where all 0 and 127.x.y.z is reserved for special purposes, and that is why  the range of class A is 1 - 126

So total number of subnet = 2 ^ 6 = 64

and number of hosts in each subnet is 2 ^ 10 - 2 =1022

answered by (297 points)
–1 vote
ans c)
answered by Loyal (5.2k points)
reshown by
after creating a subnet, inside it 2 IP addresses are excluded one to rep. Subnet ID and other for subnet's DBA,

not before, so answer is D

Answer should be (C)

we know in CLASS B:

HOST ID = 16

we always borrow bits from host id when we do subnetting

here 6 bits are used for subnetting so,

for hosts, 10 bits are used

Total no. of host possible or IP addresses = 2^10 = 1024, one is used for subnet address and one as the broadcast

so,no. of hosts =1024-2


now, with 6 bits we can have 2^6 = 64 subnets and here also 2 will be subtracted for subnet address and broadcast 62 subnets will be the answer.


If in question 1022 is not the option then we can also have 1024 as answer.

similarly in case of subnet also, 62 is best choice but if not given then we can choose 64 also a/c to modern subnetting.

–1 vote
C is the correct answer
answered by (17 points)
reshown by

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
49,408 questions
53,590 answers
70,871 users