LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-22-2014, 04:02 PM   #1
new2bash
LQ Newbie
 
Registered: Jan 2014
Posts: 15

Rep: Reputation: 0
Unhappy Subnetting question: How many subnets and hosts.


I hope this question fits this section of the forum.

I've been spending some time learning subnetting and practicing the questions on http://www.subnettingquestions.com/ . I saw this question and was confused.


Question: How many subnets and hosts per subnet can you get from the network 172.30.0.0 255.255.255.192?

Answer: 1024 subnets and 62 hosts

Seeing 62 hosts is easy, you just figure out the range of that network...
Network: 172.30.0.0
First usable: 172.30.0.1
Last usable: 172.30.0.62
Broadcast: 172.30.0.63

But how in the heck are they getting 1024 subnets from that small range? I can see getting a few /29's out of that, but nothing near 1024.

I'm either reading the question wrong or there's an error with the answer.... I'm betting on the former.

Any help is very much appreciated.

Thank you.
 
Old 02-23-2014, 06:13 AM   #2
Doc CPU
Senior Member
 
Registered: Jun 2011
Location: Stuttgart, Germany
Distribution: Mint, Debian, Gentoo, Win 2k/XP
Posts: 1,099

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
Hi there,

Quote:
Originally Posted by new2bash View Post
I've been spending some time learning subnetting and practicing the questions on http://www.subnettingquestions.com/. I saw this question and was confused.
I was confused, too, because classful subnetting has been obsolete for about 20 years now. You're reading the wrong sources. It's like you'd study electronics today and put your main focus on vacuum tubes. Silly. Obsolete.

Quote:
Originally Posted by new2bash View Post
Question: How many subnets and hosts per subnet can you get from the network 172.30.0.0 255.255.255.192?
The question doesn't make sense unless you're considering the historical network classes. Obviously they imply a class B network here as a basis. Historical Class B is netmask 255.255.0.0 or /16 in modern CIDR.

Quote:
Originally Posted by new2bash View Post
Answer: 1024 subnets and 62 hosts

Seeing 62 hosts is easy, you just figure out the range of that network...
Let's get into that assuming we're really talking about stone-age basics.

Code:
Netmask of a Class B network:  255.255.0.0     = 11111111.11111111.00000000.00000000
Your subnet mask:              255.255.255.192 = 11111111.11111111.11111111.11000000
                                                -------------------------------------
                                                 CCCCCCCC CCCCCCCC NNNNNNNN NNHHHHHH
If you have to stay inside the Class B network range, you must not touch the mask bits I labeled with "C" (for "Class"). That leaves you 10 bits for the network address, and 6 for the host address. 10 bits make 1024 combinations, 6 bits make 64 combinations. Minus 2 for network and broadcast address leaves 62 possible host addresses in each subnet.

In today's CIDR, there are no classes any more. There are just network and host address bits, the "C" bits in the above example would all be "N".
What remained, however, were the reserved private, non-routed address ranges, like for example 192.168, which is probably the most famous one, and is typically set up in /24 subnets (netmask 255.255.255.0). That's still in compliance with the historical Class C networks. But this is completely up to the system administrator; he might just as well use /20 networks (255.255.240.0), or /27 (255.255.255.224) if that is appropriate for his particular network.

[X] Doc CPU
 
1 members found this post helpful.
Old 02-24-2014, 06:26 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,237

Rep: Reputation: 3654Reputation: 3654Reputation: 3654Reputation: 3654Reputation: 3654Reputation: 3654Reputation: 3654Reputation: 3654Reputation: 3654Reputation: 3654Reputation: 3654
What do the calculators say you should get?
 
  


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
A question about subnetting and vlan Ypebe Linux - Networking 2 06-08-2011 04:32 PM
Subnetting question chibi2666 Linux - Newbie 16 02-25-2009 11:20 AM
Subnetting question chibi2666 Linux - Networking 3 02-18-2009 11:55 PM
Subnetting question pnellesen Linux - Networking 11 08-30-2006 04:19 PM
subnets and subnetting johnMG Linux - Networking 25 12-20-2005 11:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:01 PM.

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