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

Given an IP address with a subnet mask of 7 bits. How many hosts and Subnets are Possible ?

  1. 126 hosts and 510 subnet
  2. 128 host and 512 subnet
  3. 510 hosts and 126 subnet
  4. 512 hosts and 128 Subnet
asked in Computer Networks by Loyal (8.6k points) | 71 views

@Na462 is there any info about the NID part? because if subnet mask is 7 bits that means NID +SID part=7bits so rest of the 32-7 bits are there for the hosts .. i.e 25 bits for the host ..

That's exactly was my doubt i guess something is indeed wrong with the question :)
Option C..???
Is it correct?
Yes it's correct actually they considered as 7 extra bits on netmask as its class B so now we have 16+7 = 23. I didn't understand that how number of subnets are 126 it should be 128 and host then should be 510.
it is class B ip so so 16 NID bits and 16 HID bits and 7 bits are given as subnet bits so total no. of subnets=$2^7-2=126$ and now remaining are hid bits so total hosts are $2^9-2=510$ so option B is right.


Given ip address corresponds to class B so 16 bit are for net id and for rest 16 bit given 7 bit corresponds to subnet Id and 9 bit to host id part.

So total subnet=2^7-2(as 2 address are used as network id and broadcast address)


Similarly for host=2^9-2=510 host for each subnet

Why you guys are subtracting 2 from total subnet 2^7 ??

Its used in host becasue when we divide a network into subnets within a subnet we cant use the first and last ip address as it would be the netid and broadcast id. If u subtract 2^7 - 2 then u are actually wasting two subnets ( Every subnet has 510 usabke address)

@Na462 Please go through this link,

As per previous standard we used to subtract 2 addresses but as per new standard 2^n subnet are there for n bit subnet.


@Soumya :)

Read the comment very above by Bikram sir, The question was ambiguous and this convention is not standard we will not subtract 2 from subnets according to RFC,IEEE :)
We will follow the RFC,IEEE standard always so 2^n will be used.

@Na462 yes we should follow 2^n for subnetting but Gate is following 2^n-1 you can reffer previous year question also .

Please log in or register to answer this question.

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
47,937 questions
52,337 answers
67,819 users