subnet mask question

shyrjiin

Member
Aug 7, 2002
30
0
0
got a question on my homework that i'm having trouble with. i have to write a valid subnet mask for 10.x.y.z with 4500 subnets.. now the way we use to find it out is by using binary but i can't fathom using binary to find 4500 subnets.. we just started so i might also be stupid (the probable one) any help would be appreciated!
 

ScottMac

Moderator<br>Networking<br>Elite member
Mar 19, 2001
5,471
2
0
Some hints:

Start at the far right side; one full eight-bit octet will get you 256, right? Two octets (16 bits) will get you 65536. For every bit you move to the left, the number will double. Every bit you move to the right will half the number.

Good Luck

Scott
 

shyrjiin

Member
Aug 7, 2002
30
0
0
here's some others :)

200.200.200.x with 4 subnets = 255.255.255.224
1.x.y.z with 45 subnets = 255.254.0.0
150.150.x.y with 17 subnets = 255.255.248.0

hopefully they are right which would mean i have full understanding of what i'm doing..
 

shyrjiin

Member
Aug 7, 2002
30
0
0
here's another one :/.. i believe this one requires a short explanation and please keep in mind i've only had 2 hours of lecture time on this subject...

How many people are on a subnet with the following subnet mask?


255.255.248.1 ________

255.255.249.0 ________

255.255.250.0 ________

255.255.251.1 ________

255.255.251.0 ________

255.255.252.0 ________
 

Fatt

Senior member
Dec 6, 2001
339
0
0
10.0.0.0/21 or 255.255.248.0


It's easy.

10.0.0.0 is a class A so the default mask is 255.0.0.0

So if you want to subnet you have to "borrow bits" from left to right without skipping.

You also have to start in the 2nd octet because the first one is already being used.

So...
12 bits = 4095 subnets
13 bits = 8191 subnets

12 isn't enough and 13 is way to damn many but there's nothing you can do about the wasted subnets. At least not on the CCNA level, but VLSM is a whole 'nother topic.

OK, so you have to borrow 13 bits starting at the first available bit after the subnet mask, which is the 2nd octet, and once you are done borrowing (start using zeros again) you use them till the end.

So it looks like this:

11111111 . 11111111 . 11111000 . 00000000

If you add ALL the ones, that's 21, which is where the /21 comes from.

Translate it back into decimal:

1st octet = 128+64+32+16+8+4+2+1 = 255

2nd octet = 128+64+32+16+8+4+2+1 = 255

3rd octet = 128+64+32+16+8+0+0+0 = 248

4th octet = 0+0+0+0+0+0+0+0 = 0

or... 255.255.248.0
 

randal

Golden Member
Jun 3, 2001
1,890
0
71
Fatt, that is one of the best examples I have ever seen put down in text -- cut and pasted to send to the many IMs I get asking about subnets.

Thanks!
randal
 

Fatt

Senior member
Dec 6, 2001
339
0
0
Your welcome.

You might want to add something I left out though.

That part about how you need to add 2 networks or hosts to whatever you really want because you're not supposed to use the network or broadcast address.
 

shyrjiin

Member
Aug 7, 2002
30
0
0
thanks for replying but i got it down.. we had an extra class on friday and i can now say that i'm very comfortable doing it