Computer Networks: CIDR based question
Hey,
I hope, I'm allowed to ask this question. First thing I want to tell you that it's not a homework question. Actually I appeared in an exam and I tried to solve this question but ... Q-An ISP has the following chunk of CIDR-based IP address 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 remaining with itself. Which of the following is a valid allocation of addresses 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 A) 245.248.132.0/22 and 245.248.132.0/21 A) 245.248.136.0/24 and 245.248.132.0/21 My approach: Only in option B, bitwise logical AND operation on IP addresses with their subnet gives the same address. So I think it's right option but I'm not sure.I don't know what is the right approach to solve this question.Any suggestions will be appreciated. TIA! |
No, it's A. (fingers crossed!!) In B, the subnets overlap, so it's illegal. You clearly need a /21 for "half" and a /22 for "quarter". In A the TOP half of the /20 goes to Org A, and the very bottom quarter goes to Org B, with the middle bit kept behind.
|
I concur, half of a /20 is /21, a quarter is /22 (which I'm sure is just a typo in chris's post) so D is out.
The networks in B overlap. The networks in C overlap. So A is the answer. To double check, /20 gives us a block of 16 class C's = 245.248.128.0 > 245.248.143.0 245.248.128.0/21 is an 8 block which would give 245.248.128.0 > 245.248.135.0 The remainder is 245.248.136.0/21 and if we split this with a /22 we get two blocks of 4 class C's which are 245.248.136.0/22 and 245.248.140.0/22 So giving away 245.248.128.0/21 and 245.248.136.0/22 leaves 245.248.140.0/22. Looks good. |
Typo? What typo?!
|
You may also find this useful for testing/checking IP Calcs http://jodies.de/ipcalc
|
All times are GMT -5. The time now is 04:11 AM. |