10.9k 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 | 10.9k views
0
a class B network will have 65536 addresses max
+2
@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?
+7

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.

+16

@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 !

+1
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
+1

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

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

Ans should be 64 and 1022
+15

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

+1
Thanks... Got it..
0
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.

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

by Boss (19.7k points)
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
+4

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

+1

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.
+1
@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...
+3

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

0

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?

0

if so than why they showed in table like this? what does that mean? i can not understand. :-(

Caption
+1
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..
+1
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 :)
+2

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

0

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

+3
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...
+4

@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

+4

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

+1
Ok thanks.
+1
@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
0
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 .

by Active (3.8k points)
reshown by
0
0
Question is not asking "usable subnet" rt?
0
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?
+1
for class B it should be 11111100.00000000 coz in class B first 16 bit for network and rest 16 bits are host
0
+1
ohk so we first two octets are full we start subnetting from 3rd one.ie. we take 8.8.11111100.0000000
0
yes.. For class B.
+1
yes..technical defn of subnet::::: borrowing bits from host id
0
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.
0
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.
0
HERE in this queston it is not mentioned that whether for writting or reading?
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.
by (41 points)
reshown by
+5
previous year book are not made by GATE.
+1 vote
64 and 1022
by (29 points)
reshown by
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
by (31 points)

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.

by Junior (809 points)
edited

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

by (387 points)