An Internet Service Provider (ISP) has the following chunk of CIDR-based IP addresses available with it: 245.248.128.0/20. The ISP wants to give half of this chunk of addresses to Organization A, and a quarter to Organization B, while retaining the remaining with itself. Which of the following is a valid allocation of addresses to A and B?
Options are :
- 245.248.136.0/21 and 245.248.128.0/22
- 245.248.128.0/21 and 245.248.128.0/22
- 245.248.132.0/22 and 245.248.132.0/21
- 245.248.136.0/24 and 245.248.132.0/21
My attempt:
Given address is :
245.248.128.0/20 = 11110101.11111000.1000 0000.00000000
so, we have last 12 bits for hosts . Now if we give half hosts to Organization A , (now we have only last 11 bits for hosts).possible address for Organization A .i.e.,
245.248.128.0/21 = 11110101.11111000.10000 000.00000000
and also ,
245.248.136.0/21 = 11110101.11111000.10001 000.00000000
and a quarter to Organization B ,i.e. ,
245.248.128.0/22 = 11110101.11111000.100000 00.00000000
Now , we have remaining last 10 bits for hosts.
Hence , both option (1) and (2) are matches.
Why option (2) is wrong ?
Can you explain it in a formal way, please?
This question from competitive exam GATE (see-Q-no.-34) and answer key is given by GATE is option (1) (see-set-A-Q-no.-34) .