Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

subnetting

Posted on 2013-01-12
6
Medium Priority
?
533 Views
Last Modified: 2013-01-15
I am a fairly new IT student and I am stuck with figuring out subnetting.  I have read my book and searched the internet  and am still confused.  I have two areas I still am having trouble with.

One area is finding the number of host addresses when given so many bits of mask on the host portion.  Would I use the method of 2^H-2?    Ex.  3 bits of mask on host portion so 2^3-2= 6 host addressed available.  Is this correct?

Second area is kinda the same. Number of bits on a netowrk portion how many subnets?  Would I use 2^s?  so say 8 bits of the network portion would mean 2^8= 256 subnets available or would you use S=P-N.  If so how do you know what is the number for P?

If someone could let me know if I m on the right track or explain in a better way for me to grasp this it would be great.
0
Comment
Question by:Bodiddly
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 12

Assisted Solution

by:TomRScott
TomRScott earned 1200 total points
ID: 38771203
First of all, thanks for being up front about your status as a student. Some come here and try to pull a fast one and get others to do their homework for them. You have been honest and are asking for help in understanding how to figure it out yourself.

The basic formula is 2^bits - 2.
2^3=8; 8 - the subnet address and the broadcast address is = 6.

For a 24 bit subnet mask (ie. 192.168.1.0 /24) you end up with 8 bits for the host addressing.  2^8=256.  Less the subnet address 192.168.1.0 and the broadcast address 192.168.1.255 you end up with 254 usable host addresses.

One last item to consider is the gateway address.  Easy to remember for a private subnet because you are supplying the gateway and, of course, you remember that is one of your hosts.  HOWEVER, when leasing a  public subnet from an ISP or other outside entity, folks often forget about the ISPs gateway and that it needs to use one of the host addresses.

In that instance for a 29 bit mask, you have 3 bits for hosts. Thus 2^3=8 less subnet, broadcase AND gateway address leaves you with 5 host addresses that you can use for yourself.

 - Tom
0
 
LVL 26

Assisted Solution

by:Fred Marshall
Fred Marshall earned 400 total points
ID: 38771261
Second area is kinda the same. Number of bits on a netowrk portion how many subnets?  Would I use 2^s?  so say 8 bits of the network portion would mean 2^8= 256 subnets available or would you use S=P-N.  If so how do you know what is the number for P?

Hmmmm .... you can't relate the number of bits in the network address to the number of subnets (in the host address) UNLESS you say that these are all going to be 8-bit or /24 subnets.  Otherwise the number of subnets depends on how you define them.  There can be lots of little ones and maybe but one huge one.

CIDR notation states the number of bits in the network address:
/24 means 24 bits in the network address.
With /24 there are 32-24=8 bits in the host addresses.
/23 32-23=9
/22 32-22=10
/21 32-21=11
and so forth.

With /24 or 8 bits in the host addresses, there can be 2^8=256 addresses in 1 subnet.
With /24 there can be 2x2^7 =  2 x 128 or 2 subnets of 128 each.
With /24 there can be 4 x 2^6 = 4 x 64 or 4 subnets of 64 each.
With /24 there can be 2x2^6 + 1x2^7 or 2 subnets of 64 each and 1 subnet of 128 each.
and so forth.
Then with /23 you will have 2x more addresses and can split up the range similar to the above for /24 starting with 512 addresses for the largest subnet possible taking up all the addresses.
UNLESS you mean all /24 subnets. In that case:
/23 has 2 256-address subnets
/22 has 4 256-address subnets
/21 has 8 256-address subnets
etc.

I guess I should not say "/22" though when I really mean 2^10 addresses which are not yet broken up into subnets.  That's because /22 usually means *a subnet* of address range determined by 10 bits.  I really meant that /22 was a starting point.

Then you subtract 2 from each subnet for network and broadcast addresses to yield the number of host addresses that are usable.
0
 
LVL 12

Assisted Solution

by:TomRScott
TomRScott earned 1200 total points
ID: 38771464
Sorry that I did not address the second question.

FMarshall has some good points.

I would add that there are a number of subnets that should not be used. 0.0.0.0 and anything starting with 127 in the first octet (127.x.x.x).

There are some other "reserved" or "undefined" subnets as well.

Beyond that one loses subnets in a similar manner to losing host addresses. Just as binary host addresses should not be all 0's or all 1's, the same is true for subnet addresses and for similar reasons.

 - Tom
0
Simplify Your Workload with One Tool

How do you combat today’s intelligent hacker while managing multiple domains and platforms? By simplifying your workload with one tool. With Lunarpages hosting through Plesk Onyx, you can:

Automate SSL generation and installation with two clicks
Experience total server control

 
LVL 15

Assisted Solution

by:Frabble
Frabble earned 400 total points
ID: 38771731
You're correct on the number of usable host addresses. The 2 addresses you lose are the all 1's address which is the broadcast address and the all 0's address which is used to define the "network"address, though it was used as the broadcast address and still is by some equipment.

The number of subnets is calculated from the bit difference between the number used for the subnet and that for the given network. For example, given a /16 network and making /19 subnets, the number of subnets is (19 - 16 )^2. If you're not supplied with a given network mask then the default mask of the address class is used, so for class A addresses you would use /8, class B /16 and class C /24.
As mentioned above, you may have to subtract 2, the legacy all 0's and all 1's subnet addresses. In practice you should be able to use them, in exam questions you might need to take them into account. Cisco discuss this here:
http://www.cisco.com/en/US/tech/tk648/tk361/technologies_tech_note09186a0080093f18.shtml
0
 
LVL 12

Accepted Solution

by:
TomRScott earned 1200 total points
ID: 38772934
Good point regarding the legacy nature of omitting subnets that are all 0's or 1's in binary.

However, I work under the assumption that some legacy routers are still in the field and therefore avoid any possibility that a legacy router will create a problem.

One way to "get back" some of that subnet space without having creating a legacy problem is to make your smallest subnets one the "outside" of a given address space that you are subnetting.  Thus, If I am breaking up a block of 256 (254) addresses into multiple subnets, I'll have two 64 (62) host subnets in the middle of the address space, flanked with 32 (30) host subnets, flanked with 16 (14) host subnets and so on. Such as the following.

2, 4, 8, 16, 32, 64, 64, 32, 16, 8, 4, 2.
The two 2-host subnets are not usable according to the legacy standard, but you only lose two addresses each.

Of course you can break up some of the "outer" subnet spaces into smaller subnets as wel.  For instance:

4, 8, 16, 16, 16, 64, 64, 16, 16, 16, 8, 4.
OR
4, 8, 8, 8, 8, 8, 8, 8, 64, 32, 32, 8, 8, 8, 8, 8, 8, 8, 4.
Note: The two 2-host subnets have been dropped in the last two examples.

 - Tom
0
 

Author Comment

by:Bodiddly
ID: 38780697
That was very helpfull.  Thank You very much.  I now understand what I am supposed to being doing. Followed this explanation better than I did my book.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is in regards to the Cisco QSFP-4SFP10G-CU1M cables, which are designed to uplink/downlink 40GB ports to 10GB SFP ports. I recently experienced this and found very little configuration documentation on how these are supposed to be confi…
This article explains the fundamentals of industrial networking which ultimately is the backbone network which is providing communications for process devices like robots and other not so interesting stuff.
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question