Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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!
Last edited by konsolelover; 02-14-2012 at 01:34 AM.
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.
Last edited by acid_kewpie; 02-14-2012 at 12:59 PM.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.