LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 02-14-2012, 12:23 AM   #1
konsolelover
Member
 
Registered: Jul 2011
Location: 127.0.0.1
Distribution: Arch, Ubuntu 11.04
Posts: 78

Rep: Reputation: 3
Lightbulb 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!

Last edited by konsolelover; 02-14-2012 at 01:34 AM.
 
Old 02-14-2012, 03:12 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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.
 
1 members found this post helpful.
Old 02-14-2012, 10:51 AM   #3
baldy3105
Member
 
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 891

Rep: Reputation: 184Reputation: 184
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.
 
1 members found this post helpful.
Old 02-14-2012, 12:59 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Typo? What typo?!
 
Old 02-15-2012, 12:11 AM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,348

Rep: Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749
You may also find this useful for testing/checking IP Calcs http://jodies.de/ipcalc
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] A question about CIDR Mask example... trist007 Linux - Newbie 10 09-18-2011 11:55 AM
Conditionally Setting up Different Network Connections Based on Available Networks c4onastick Linux - Networking 1 09-07-2009 02:23 PM
One computer, Two Networks ,Two Wireless Cards Boffy Linux - Wireless Networking 5 08-19-2008 11:05 AM
accessing computer across networks Madd the Sane Linux - Networking 3 10-26-2007 10:54 PM
Visitor Based Networks Mux General 0 12-04-2002 08:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration