# GATE2007-67, ISRO2016-72

13.8k views

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.

edited
1
a class B network will have 65536 addresses max
4
@arjun sir check the qus 67 ?

http://gate.iitm.ac.in/gateqps/2007/cs.pdf

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

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 .

And that time in 2007 no official key released.

Reference:

https://en.wikipedia.org/wiki/Subnetwork#Subnet_and_host_counts

1

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.

21

@rickeshjohn

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 https://gateoverflow.in/128643/isro2017-26

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 !

2
Thanks Bikram sir. Nice explanation. Will keep this in mind for future questions. :)
1
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
0

Suppose a class B network: 128.16.0.0 Now if we make $2^6$ subnets first one will be:

$1000000.00010000. 000000|00.00000000\rightarrow$ mind the separator after 6 zeroes in third octet.

The first valid configurable address will be

$10000000.00010000.000000|00.00000001$

But people here are removing $2$ subnets (all $6$ zeroes and all $6$ ones) to remove base address and broadcast address. Doing so will render the above completely valid address unavailable. Consequently, we'll not have any network from

$10000000.00010000.000000|00.00000001$ to $10000000.00010000.000000|11.11111110$, and
$10000000.00010000.111111|00.00000001$ to $10000000.00010000.111111.11.11111110$.

And we certainly do not want to do that. So the subnet must remain $64$, and each of them will have $2^{10} - 2=1022$ hosts.

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: http://www.weird.com/~woods/classb.html

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..

1 flag:
✌ Edit necessary (Devasish Ghosh “wrong answer”)

selected by
1
why we have subtracted 2 ?
3
they are reserved , 1st for n/w id or subnet id, and last one all 1 , for broadcasting
1
14
Let's take 1 bit as subnet id....so what is use of it...

Ans should be 64 and 1022
20

@Gabbar see here: http://www.weird.com/~woods/classb.html

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

2
Thanks... Got it..
1
I think answer should be (d) bcoz they asked about max. no. of hosts per subnet..so 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
1
How 2^11 = 1024 ?...

2^11=2048
0
It was a typo- corrected..
0
What would be the number of subnets if it were a numerical type question ?
1
@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.
1
why we are subtacting 2 from number of subnets ??

ans should be 64 & 1022.
0
If one follows the Cisco convention (which you will find in any CCNA prep book), the number of subnets is $2^6 = 64$ and the number of hosts is $2^{10} - 2 = 1022$. We subtract $2$ from the number of hosts as the subnetwork ID and the broadcast address are reserved for that subnet.

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.

EDIT:
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 matched..so 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 same....so 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!!

edited
3

In systems that can handle CIDR a count of two is therefore subtracted from the host availability, rather than the subnet availability, making all 2n subnets available and removing a need to subtract two subnets."

" 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. "

As RFC is a standard source,  we should obey them .

References:

5

Confusion could not be there if we were asked how many hosts are " available / configurable or Usable"  , but here they are only asking maximum possible subnets and hosts/subnets in gate papers ...

Gate committee or paper setters consider available and maximum are both same term.

And standard says to count available hosts subtract 2 and to count available subnet not subtract 2 .

The RFC 950 specification recommended reserving the subnet values consisting of all zeros (see above) and all ones (broadcast). [ Old convention Year 1985]

RFC 1878 provides a standard by making all 2n subnets available and removing a need to subtract two subnets. [ New convention Year 1995 ]

" The all-zeros value and all-ones values are reserved for the network address and broadcast address respectively. In systems that can handle CIDR a count of two is therefore subtracted from the host availability, rather than the subnet availability, making all 2n subnets available and removing a need to subtract two subnets."

Read this wiki-page Subnet and host counts -https://en.wikipedia.org/wiki/Subnetwork#Subnet_and_host_counts

2
5

there also valid answer should be 2048 only since again they are asking maximum possible hosts...they should clearly ask how many hosts we can configure or out of all available, how many are possible something like that ...only asking maximum possible hosts per subnet doesnt mean excluding 2 for NID and DBA....very ambiguous ways to ask these questions!!

2

However, its good to debate on such questions but GATE official might contain answer according to classless only as delayed slots are not used nowadays but GATE asks according to that only .
2
Although,the answer will depend on whether we are reserving those addresses or not but anyway maximum possible usable hosts should be take into consideration  so exclude these two also.
2

thats what m saying...usuable hosts...this is lacking in the question...we can use all hosts now but even if we follow previous conventions then also atleast this question is not asking that..it's only asking how many maximum hosts u can have(nt usuable hosts)...thats why all should be included here..else if they would have asked how many hosts can be configured then there was a dielmma whether to exclude 2 hosts or not....though we can challenge their answer keys also if it again happens ...

2
Yes, I think too . Maybe their mentality is to find hosts which have obviously their host addresses and not broadcast address.
3
old rules substract 2 in case of subnets, but new rules allows using all subnets, so it is 64 subnets. but hosts will be 1022 only. 1024 are vaild addresses. 1022 are valid hosts.

so as per old rules answer is 62, 1022

as per new 64, 1022.

as you say @sudsho, it looks like "host with broadcast ip is also available but not usable". is it true? just think. no host with broadcast ip is there. when roter see broadcast ip as dest. address, it floods packet on all 1022 hosts. thats it. no host assigned with roadcast ip, same with net/ip.
2
@Sheshang again u have used the word valid hosts...and m again saying this is missing in the question thats why most appropriate answer is this only...and pratically also we have cisco's routers which manages all these very effectively...for that gate 2008 question..best answer was 2048..since only 2046 was in the options we can go wih that..but here we are exactly having an answer matching with their english...its their fault to frame a question like that..we cant assume that they would have mean valid hosts atleast if we have some options like this...
4

and if anyone still has some doubt then,please read that rfc first mentioned by bikram sir...in networks,RFCs are more standard than books and there clearly it is said that we need nt exclude anything either from subnets or hosts...modern day softwares are grown up kids....please see the NID,host range and DBA also...and then read last 2 lines....i hope then it'll be all clear...and please read the word obselete with utmost sincerity...thanks!!

1

thanks @sudsho.

Host all zeroes and all ones excluded. (Obsolete)

by this what i meant is:

"while listing the above numbers  ips with all 0s and all 1s are subtracted already. so wtever count is given about hosts ( and same for subnets) are complete. now no need to subtract any thing from that."

is my interpretation right?

1

if so than why they showed in table like this? what does that mean? i can not understand. :-( Caption
2
no no nothing is subtracted already....in 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 only..like 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..
2
u didnt read the paragraph above this table...it'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 :)
3

infact this question isnt abt that sheshang....it's only asking how many maximum possible hosts u can have..like 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 configurable....like maximum u can eat is 3....same is the case here....so dont get confused!!

1

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.

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
subnets are included in Tables 1-1 and 1-2 per the current,
standards- based practice for using all definable subnets .

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

4
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 valid...it's only asking how many u have...so 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...
5

@sheshang

"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 :

https://en.wikipedia.org/wiki/Subnetwork#Subnet_and_host_counts

5

@Manojk

For that 2008 question -> https://gateoverflow.in/480/gate2008-57 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.

2
Ok thanks.
2
@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
1
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?

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 .

reshown by
0
1
Question is not asking "usable subnet" rt?
1
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?
2
for class B it should be 11111100.00000000 coz in class B first 16 bit for network and rest 16 bits are host
2
ohk so we first two octets are full we start subnetting from 3rd one.ie. we take 8.8.11111100.0000000
1
yes.. For class B.
2
yes..technical defn of subnet::::: borrowing bits from host id
1
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.
1
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.
1
HERE in this queston it is not mentioned that whether for writting or reading?

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

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.

reshown by
6
previous year book are not made by GATE.
64 and 1022

reshown by
1 vote
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
1 vote

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

https://learningnetwork.cisco.com/inbox?objectType=2&objectID=660637

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.

edited

## Related questions

1
9.4k views
The message $11001001$ is to be transmitted using the CRC polynomial $x^3 +1$ to protect it from errors. The message that should be transmitted is: $11001001000$ $11001001011$ $11001010$ $110010010011$
In a token ring network the transmission speed is 10$^7$ bps and the propagation speed is 200 meters/$\mu$s. The 1-bit delay in this network is equivalent to: 500 meters of cable. 200 meters of cable. 20 meters of cable. 50 meters of cable.
Consider the following segment of C-code: int j, n; j = 1; while (j <= n) j = j * 2; The number of comparisons made in the execution of the loop for any $n > 0$ is: $\lceil \log_2n \rceil +1$ $n$ $\lceil \log_2n \rceil$ $\lfloor \log_2n \rfloor +1$
The order of a leaf node in a B$^+$ - tree is the maximum number of (value, data record pointer) pairs it can hold. Given that the block size is $1K$ $bytes$, data record pointer is $7$ $bytes$ long, the value field is $9$ $bytes$ long and a block pointer is $6$ $bytes$ long, what is the order of the leaf node? $63$ $64$ $67$ $68$