Home > Archive > CCNA > September 2002 > Subnetting in Class B





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Subnetting in Class B
paraskapoor

2002-09-05, 1:53 pm

Hi.

Can someone give in resources or explain to me subnetting in Class B with the following subnet masks:

1. 255.255.255.0
2. 255.255.255.128
3. 255.255.255.192
4. 255.255.255.224

Thanks
mikop

2002-09-05, 1:57 pm

http://www.cisco.com/warp/public/701/3.html

read and then go through the examples.
donaldmc

2002-09-05, 2:17 pm

This is going to be very long I'm sorry if it's a pain for anyone. Subnetting can be a very daunting at first here are my notes that will make it a breeze. Using the magic Number system. Learned this from a cisco press book. But translated it in english and used a class C. If you want to use a class b just substitute the address it works the same. and if anyone needs these notes just e-mail me. I'll send them my entire notes, but be warned i've just started studing for my recert none of this my be on the test!

Subnetting

Remember these 3 key facts when subnetting
1. The Network part of the address is defined by class rules
2. The host part of the address is defined by the network mask; Binary 0’s
3. What’s left is the subnet

To determine the number of host and subnets use the equations (2n – 2) where “n” is the number of host bits or subnets.

In every subnet there is two address reserved for special ID numbers. All 0’s is the network; all 1’s is the broadcast

Each bit position has a decimal value, as shown in the table below.

128 64 32 16 8 4 2 1

1 0 0 0 0 0 0 0 = 128
1 1 0 0 0 0 0 0 = 192
1 1 1 0 0 0 0 0 = 224
1 1 1 1 0 0 0 0 = 240
1 1 1 1 1 0 0 0 = 248
1 1 1 1 1 1 0 0 = 252
1 1 1 1 1 1 1 0 = 254
1 1 1 1 1 1 1 1 = 255





Common Class C subnetting

Net Mask Number of Subnets Hosts Per Subnet

192 2 62
224 6 30
240 14 14
248 30 6
252 62 2

Determining the subnet mask on interesting octets

Address 199.1.1.100 01100100
Mask 255.255.255.224 11100000
Subnet # 199.1.1.?

If you already have the address and the mask create a table like the one above. Use the last numbered octet in the netmask and convert the preceding octets from decimal to binary. Now you have them lined up like you are going to add them up. If there is a 0 in any bit bring it down the only time you bring a 1 is if both correspond.

Address 199.1.1.100 01100100
Mask 255.255.255.224 11100000
Subnet # 199.1.1.96 01100000

There’s another way to find the number without writing down anything
First you find out what the mask number is. To do this you subtract the netmask-interesting octet from 256. 256 – 224 = 32. Then you find the nearest multiple of the number that is closet but lower are equal to the interesting octet. 32 x 3 = 96 so that’s your subnet number.

After you find the subnet number the first valid ip is easy to determine just add 1 to the forth octet.

Address 199.1.1.100
Mask 255.255.255.224
Subnet # 199.1.1.96
1st Valid IP 199.1.1.97

The next step would be to find the broadcast address which using binary is easy touo just add 1’s to all the host bit’s

Here’s how to find it in your head:



Remember the steps on how you found the magic number. You take you subnet number in this case 96 and add the magic number 32 and subtract 1 and you get the broadcast. 96 + 32 - 1= 127 there is your broadcast 199.1.1.127

Address 199.1.1.100
Mask 255.255.255.224
Subnet # 199.1.1.96
1st Valid IP 199.1.1.97
Broadcast 199.1.1.127

The last step is to find the last valid address this is easy just subtract 1 froth the forth octet of the broadcast address 127 – 1 = 126

Address 199.1.1.100
Mask 255.255.255.224
Subnet # 199.1.1.96
1st Valid IP 199.1.1.97
Broadcast 199.1.1.127
Last Valid IP 199.1.1.126

Deciding what the other subnets are

“If the same subnet mask is used for all subnets on a class A, B, OR C networks what are the valid subnets?

1. Write down or determine the network number and netmask.
2. Add the Magic number to the previous subnet octet in this case 32
3. keep going until 255

Address 199.1.1.100
Mask 255.255.255.224
1st valid Subnet 199.1.1.32
2nd valid subnet 199.1.1.64
3rd valid subnet 199.1.1.96
4th valid subnet 199.1.1.128
And so on until 255
pepe le pew

2002-09-06, 12:26 am

Man, that was long. Don't think I can remember all that, but excellent post though.

Mikop, very informative link, thanks!
vschristopher

2002-09-06, 11:31 am

quote:
Originally posted by paraskapoor
Hi.

Can someone give in resources or explain to me subnetting in Class B with the following subnet masks:

1. 255.255.255.0
2. 255.255.255.128
3. 255.255.255.192
4. 255.255.255.224

Thanks



Dear Paras
#1 is the default Class B subnet
#2 is a Variable Length Subnet mask it means that its a 9 bit address, i.e 1 bit has been borrowed by the left hand Octet so its 128 according to the Bit table we make.
#3 is also like that in this case 2 bit have been borrowed 128+64
#4 same is the case with this one too add up the values of 128,64,32,16,8,4,3,2,1 till u get 240
donaldmc

2002-09-06, 11:41 am

255.255.255.0 is the default of clas c
255.255.0.0 is class b

255.255.255.0 for cclass be is a subnetmask for /24 host bits
vschristopher

2002-09-07, 12:11 am

quote:
Originally posted by donaldmc
255.255.255.0 is the default of clas c
255.255.0.0 is class b

255.255.255.0 for cclass be is a subnetmask for /24 host bits



Yeah Donald lol thank you for finding out my mistake, the subnet mask for class C is 255.255.255.0

chris
paraskapoor

2002-09-11, 10:05 am

Hi guys.

Thanks for you input. Donaldmc - thanks for taking the time to explain that subnetting bit very carefully.

In the while, I have been doing some study and the reason why I put this post up was because of a bit of confusion I had in the Todd Lammle CCNA Study Guide - Sybex.

Therein Todd gives us some examples in chapter 3 on subnetting. For Class B, there is one example for the 255.255.255.128 and one (among others) for 255.255.255.192.

In the example 255.255.255.128, Todd has used the following mathematics for calculating the subnets:
256 - 255 = 1 + 1 = 2 + 1=3.....etc. Such that the subnets are 1,2,3,....

Note that he takes the value from the 3rd octet of the mask (255) to subtract from 256.

In the next Class B example for 255.255.255.192 he performs the same operation as follows:

256-192 = 64 + 64 = 128

Note he takes the 4th octet and makes that subtraction. All following examples use this second math of using the 4th octet to subtract.

That was my confusion (and now I think I made it yours )

In the example 255.255.255.128, it is clear that each value we get in the 3rd octet, there will be 2 values actually due to the 1 bit being used in the 4th octet.

What confused me was the differece in the mathematics - in the first example the 3rd octet is used and in the others the 4th octet is used. Someone tells me that even if the same mechanics as all other examples are used for 255.255.255.128, the results will be the same.

Any inputs here?
kris108

2002-09-11, 11:25 am

Subnetting a class B address with /24 would not seem to be much different than if it were a class C.

One thing I always remember is each subnet relates to a particular chunk size:

/24 = 255.255.255.0 = 256 Hosts = 1 network
/25 = 255.255.255.128 = 128 hosts = 2 networks
/26 = 255.255.255.192 = 64 hosts = 4 networks
/27 = 255.255.255.224 = 32 hosts = 8 networks
/28 = 255.255.255.240 = 16 hosts = 16 networks

See the patterns? Try and memorize the networks and hosts patterns as one goes up and the other goes down. Applying this to class b is not really much different than class c.

My only confusion is whether or not to remove 2 networks. Sometimes documentation will say that the first network and last network are unusable, but then other times i've read that this is no longer the case. However, I've seen many questions(practice) that ask what are the usable networks and hosts addresses.. most of the time the correct answer is -2 networks. Seems pretty wasteful if you ask me.

But lets say I"m a small company and I break up my /24 into /28's. Do I have 16x14 or 14x14 ? Do I really need to reserve the first and final networks, wasting 32 IPs? Doubt it.
davidbeecken

2002-09-11, 12:49 pm

kris, CCNA does not really deal with ip subnet-zero, so UNLESS it has been specified that subnet-zero is being used(which I dont think anyone will see on the test), you subtract the two.
chodan

2002-09-11, 3:40 pm

IP classes is a somewhat outdated concept.

ALthough it is useful early on for learning the basics of IP, it gets in the way of learning subnetting and similar tasks, and it doesn't really apply to resolving ip range using a subnet mask, when doing that forget classes and just do your binary anding.
Don't let the old classes of A, B, and C distract you from the job at hand.
donaldmc

2002-09-12, 1:38 pm

Sorry I haven’t been here in a couple of days I’ll try and clarify some stuff. Subnetting is not outdated it is a daily occurrences and you need to know the “theory” even if you can get a subnet calculator for free. Paraskapoor that guy is trying to do it the hard way the “magic number” way is the easiest I’ve found. I can’t explain it any better then I have. Try not to remember three different ways to subnet stick with the easiest for you and learn it. If you feel you need to write out you should have plenty of time to do it. You do have to memorize some things but it’s way easier then you think, just relax if you made it this far you’re smart enough to do it. I also believe there was question about network – 2. You might consider this wasteful it is, but it’s the way it is these address are actually being used you just can’t assign them 1 is the broadcast and 1 is the network, and it’s not nearly as wasteful as broadcasting everything across an entire network when bandwidth cost more then private IP’s. Sorry if I get a little choked up about subnetting it’s just, just so close to my heart (lol) yeah right

Good luck
donaldmc
chodan

2002-09-12, 1:45 pm

quote:
Originally posted by donaldmc
Subnetting is not outdated it is a daily occurrences and you need to know the “theory” even if you can get a subnet calculator for free.


If you are referring to my post then you misread it.
I wrote classes are an outdated concept not subnetting.
duanesnyder

2002-09-12, 6:05 pm

Wow..... I don't know if donaldmc's post helped on the answer to the start of this thread, but after i finish memorizing it, I know it will help me. I needed a refresher on subnetting and I have never seen a better one than that.

Thanks donaldmc


Duane
donaldmc

2002-09-13, 7:08 am

thanks duane. Subnettinig is so easy to forget and sometimes so confusing to learn I got that info from Cisco Press CCNA preparation library. I definantly recommend that paakage it has aa lot of information and even if your just interested in learning cisco it has a book in the pakage that goes over all kinds of topics not covered by the CCNA such as ATM, RBE, and DSL tecchnologies definetly a good read!
Luchnia

2002-09-13, 8:42 am

donaldmc, I really appreciated your notes on subnetting. However, I was going back through my notes and I am confused about something you had in your notes:

"Then you find the nearest multiple of the number that is closet but lower are equal to the interesting octet. 32 x 3 = 96 so that’s your subnet number." What do you mean nearest multiple of the number that is closest, but lower....? This evades me. You have 32x3, but where did you get that 3 from and what do you mean by that. I don't have any problem finding the breakout bits, etc., but I am curious as to how you come up with this?

I usually take a long route to get my addresses, and would appreciate any help here. Using the calculator is one thing, but I really like to know the entire concepts behind a subject.

One of the worse problems I seem to have is when I am given a scenario of several thousand addresses and several subnets scattered across multiple buildings and I have to come up with the address range. It seems to take me forever to do that.

Since this seems it might be easier to come to the same conclusion, I would like to do that.

Thanks again, for your notes and I appreciate your reply to this question.

Peace
davidbeecken

2002-09-13, 9:22 am

I wrote something which has helped some people on this topic.

http://www.ciscotrack.com/subnetting.html
donaldmc

2002-09-13, 10:12 am

Luchnia no problem, here’s what I mean be nearest multiple but not over it. The 3 is the multiple. Here’s another example:

Address 199.168.1.65
Netmask 255.255.255.224

You want to find the subnet. First thing you do is subtract your interesting octet (that’s the octet that’s not 255) from 256.
256-224 = 32
32 is your “magic number” So now you want to find your nearest multiple without going over, kinda like the Price Is Right you lose and your in another subnet!
32 x 2 = 64
32 x 3 = 96
32 x 4 = 128
your not going to do anything else with your 3 0r 2 in the case it just brings you to your conclusion the nearest multiple without going over is 64.

So your subnet is 192.168.1.64

Just remember your magic number it comes in handy later!

I Hope this answers your question if not ask again!
Sponsored Links





Free Braindumps | MCSE braindumps software forum

Copyright 2003 - 2008 examnotes.net