Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Subnetting questions

Posted on 2005-03-14
13
Medium Priority
?
239 Views
Last Modified: 2010-04-10

Im taking some CCNA practice exams. The ONLY part thats giving me trouble are these two types of subnetting questions:

1. Enter the number of networking bits that would give a network with 2 host addresses.

I know the answer, but I dont know how I got it lol
its 255.255.255.252
or 30bits. I only know that from subnetting in real environments. How do you properly answer this question?


2. Enter the subnet mask dotted decimal value that would give a network with 2,046 host addresses
0
Comment
Question by:dissolved
  • 7
  • 4
  • 2
13 Comments
 
LVL 7

Accepted Solution

by:
minmei earned 1200 total points
ID: 13541658
Q1

subnet mask defines what is network and what is host. If only last 2 bits are host, then 00 01 10 11 are the only possibilities. Since each subnet has a network address (00) and a broadcast address (11) , that only gives two addresses left (01 and 10)

if subnet mask is

11111111.11111111.11111000.00000000

or

255.255.248.0

then you have 2 to the 11th power hosts (11 zeros) which is 2048. Subtract the two for network and broadcast (00000000000 11111111111) and you have 2046.

Make more sense?
0
 

Author Comment

by:dissolved
ID: 13541728
q1: is there a formula for this? I noticed they said number of hosts and not host bits. Im only used to questions that ask something in bits etc.

q2 is actually trial and error? You play with 2^x-2=your answer
Thats what I figured... I guess you just try all types of combos with questions like this.
0
 
LVL 11

Assisted Solution

by:-Leo-
-Leo- earned 800 total points
ID: 13541978
Q1: I would not say its a formula, but I do like this:

1. Convert number of hosts to the binary
2. Check if this number consists of all "1", if yes - add one more bit
3. Substract number of resulting bits from 32 (total possible number of networking bits)
4. Convert this to the dotted binary or decimal notation, if you need (question was how many networking bits ...)

If you need 2 hosts:

1. 2 = 10
2. All "1" - ? No!, number of bits = 2
3. 32 - 2 = 30
4. 11111111.11111111.11111111.11111100 = 255.255.255.252

if you need 3 hosts:

1.  3 = 11
2.  All "1" - ? Yes!, number of bits = 3 (2 + 1)
3. 32 - 3 = 29
4. 11111111.11111111.11111111.11111000 = 255.255.255.248

And so on ...

Q2: Same calculation:

1. 2046 = 11111111110
2. All "1" = ? No!, number of bits = 11
3. 32 - 11 = 21
4. 11111111.11111111.11111000.00000000 = 255.255.248.0

Hope this will help you!
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:dissolved
ID: 13543335
Leo, thanks. Where did you get the numbers "3=11" in questions 1?
0
 
LVL 11

Expert Comment

by:-Leo-
ID: 13543346

3 will be 11 in binary
2 will be 10 in binary
255 wil be 11111111 in binary


You know the joke: there is 10 types of people in the world: who understand the binary and who is not :)
0
 

Author Comment

by:dissolved
ID: 13543557
oh 3 is 00000011
2 is 00000010

Gotcha. thanks man
0
 

Author Comment

by:dissolved
ID: 13544229
so if you want 510 hosts, you would need 16 host bits?

255.255.0.0


1111111.11111111.00000000.00000000
                                     
Is this correct?
0
 
LVL 7

Expert Comment

by:minmei
ID: 13544728
Nope.

510 and add 2 (network and broadcast) = 512

512 = 2 to the 9th power = 9 bits for hosts

11111111.11111111.11111110.00000000 - hosts are zeros

subnet mask is

255.255.254.0

Do the math for 30 hosts. I'll check you.
0
 

Author Comment

by:dissolved
ID: 13544950
Wait I think I see. When ever they ask:
 "enter the number of networking bits that would give a network with 1022 hosts"

The first thing you do is add +2 to 1022. This is because one is reserved for network, the other reserved for broadcast. This gives us 1024.

Now, I just have to do the formula 2^x=y  to find the 1024.
2*2*2*2*2*2*2*2*2*2*2 =1024
Thats eleven "2s", or eleven host bits

11111111.11111111.11111000.00000000
255            255           248             0

eh, is this right?
0
 
LVL 7

Expert Comment

by:minmei
ID: 13544993
Close.

2 to the 10th power is 1024, not eleventh.  So what would the mask be now?
0
 

Author Comment

by:dissolved
ID: 13545183
11111111.11111111.11111100.00000000
255.255.252.0

22 networking bits  10 host bits

Is this correct?
0
 
LVL 7

Expert Comment

by:minmei
ID: 13545203
Absolutely.
0
 

Author Comment

by:dissolved
ID: 13545625
thanks!  finally the light has come on. Let's hope it doesnt go out LOL
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
This program is used to assist in finding and resolving common problems with wireless connections.
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
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 …

577 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