in Computer Networks
182 views
1 vote
1 vote
An Internet Service Provider (ISP) has the following chunk of CIDR-based IP addresses available with it: 245.248.128/20. The ISP wants to give half of this chunk of addresses to Organization A, and a quarter to Organization , while retaining the remaining with itself. Which of the following is a valid allocation to A and B ?

(A)  245.248.136.0/21 and 245.248.128.0/22

(B)  245.248.128.0/21 and 245.248.128.0/22

(C)  245.248.132.0/21 and 245.248.132.0/21

(D)  245.248.136.0/22 and 245.248.132.0/21
in Computer Networks
182 views

1 Answer

2 votes
2 votes
Best answer

Just think of being 20 network bits as already given in the question.

remaining 32-20 = 12 bits for the host 

total number of hosts possible is 2^12

In that A takes half so 2^12/2 = 2^11 each is divided and one part is given to A

the other part of 2^11 is divided further as 2^11/2 = 2^10 each where that becomes the quater of 2^12 so that is given to B

If all the above classification is done the number of bits borrowed is calculated first: 

1 bit is borrowed for A so network bits becomes 21 and for B its 2 bit borrowed so it becomes 22.

By this option C and D eliminates 

Now in option A we can say that

For A, first bit borrowed from host is set to one where this makes the third octet of the IP as 

10001000 and ranges from 136 to 151(136 +15) hence IP it has 245.248.136.0/21

further for B two bits are borrowed and first bit must be 0 (as 1 is taken above) so the third octet of IP looks like :

10000000 and ranges from 128 to 131(128 + 3) hence IP it has and 245.248.128.0/22

Hence Option A satisfies. 

This is a repeated gate question and also if still it’s not clear I can plot the diagram of the division of subnets and show how it is been classified 

Open for any corrections !! 

 

selected by

Related questions