1,172 views
0 votes
0 votes
what is the length of subnet ID. plz someone explain me with an example..plz..

2 Answers

0 votes
0 votes

I think ,

An ip address in class c has 24 bit reserved for network id and 8 bit for host id part .

Now since they say they need 4 subnets . so subnets bits are actually borowed from host id 

so 4 subnets , Log2 (4) = 2 bits are taken from host id .

so now remaining size of host field is 8-2= 6 bits 

 length of subnet id is 26 bits ( 24 bits of host + 2 bit of subnet ) 

So now subnet size will be 2^6 

But no of Ip address that would be assigned here 2^6 - 2 .

edited by
0 votes
0 votes
If we have to make 4 subnets then we have to choose 2 bits (00, 01,10,11) . As it is class C, 3 octets are for NID and 1 octet is for HID. Among Hosts we have to choose 2 bits so no of remaining hosts are configured  from last 6 bits i.e. 2^6 -2

Related questions

0 votes
0 votes
2 answers
1
2 votes
2 votes
3 answers
4
Laahithyaa VS asked Sep 9, 2023
932 views
. What will be the value returned by the following function, when it is called with 11?recur (int num){if ((num / 2)! = 0 ) return (recur (num/2) *10+num%2);else return 1...