in Computer Networks
0 votes
0 votes
Please explain in very brief for below things. I'm confused in using these terminology

1. Subnet size and subnet mask size

2. Network I'd,block Id ,subnet id are they same?

3. IP addresses in network = No of host ?

4. How no of host ,no of subnets are related?

Please help me in clearing my doubt.

in Computer Networks

1 Answer

2 votes
2 votes
Best answer
To learn the concepts of these terms and their relations. You have to read book. By the way I am trying my best. Let's see where it goes.

$(1)$. We know ip address is $32$ bit no.

In subnetting

ip address = network id + subnet id + Host Id

In given subnet mask, no. Of $1$s is equal to ( network id + subnet id)

And we know if  subnet Id is $3$ bit it means no. Of subnet is $2^{3}$.

$(2)$. Network id and block id are some how same. We use term Block id as network id in Classless inter domain routing.

Eg: $$ in this $26$ is Block id or Network id.

$(3)$. We can say no. of ip addresses per network = no. of hosts per network. But usable host are always $2$ less bcz first ip address is reserved for Network ip address and last ip address is reserved for Directed broadcast.
Eg: if HID$=6$ bit then total ip address per network is $2^{6}$. But No. Of hosts $2^{6} - 2 =62$ hosts.

$(4)$. Already explained in part $1$.
selected by


@Rishav Kumar Singh 

thank you so much for help

Nicely explained:)

one more doubt, if number of subnet is asked then we have subtract 2 from the answer like we do for number of host?




@Mayankprakash No need to do that.

eg: if given network mask is

it can be represented as 11111111.11111111.11111111.11000000

and given network id =22

then no. Of  subnet will be ?

solution: we know, total no. Of 1s in network mask = network id + subnet id

26 = 22 + subnet Id

so subnet Id= 4

so no. Of subnets = 2^4 = 16.



Thanks bro :)
You have been real help for me

Related questions