Tags:
Last response: in Networking
Share
March 14, 2002 5:05:54 PM

i have a question regarding subnet masks...

what the heck is it?... and how is it used effectively?...

i have my local network set up under 255.0.0.0 subnet mask, with no problems... i have read in various places "to just keep the default subnet mask at 255.255.255.0"... any reason for their comments?....

thx for "schooling me"....

March 14, 2002 6:12:09 PM

harumph. OK, here goes:

subnet mask basically is saying how many bits to use for "subnet" and how many bits to use for "address" (within the subnet)

So if your subnet mask is 255.0.0.0 you are using 8 bits for subnet and 24 bits for address. This is also know as a class A subnet

BTW - you made a typo - there is not such thing as a 40 bit IP address.

Anyway, if your mask is 255.255.255.0 you are using 24 bits for subnet and 8 bits for address. This is also known as class C

Those are pretty straightforward. It gets a little trickier when you subnet an ordinal class - like doing something like 255.255.255.128 which mean 25 bits for subnet and 7 bits for address.

the 25 bits can be seen if you convert the above decimal number to binary, which would be:

11111111.11111111.11111111.10000000

Which then give you a possible 2^7 - 2 addresses = 126 (network and broadcast have to be eliminated).

You can carry it further ad infinitum (masks of 255.255.255.252 are theoretically possible) which would give you only 2 addresses in each subnet.

One other thing - to understand masks you have to first understand subnets. A subnet is an IP "dividing" technique, whereby all nodes an a given IP "lan" (one side of a router, if you will) exist in the same subnet. So if you have a LOT of machines on a lan, you will want a LARGE subnet (class A for example) and if you have a small number of machines you will use a smaller subnet (class C).

Hamfisted enough ? ;-)

<i>It's always the one thing you never suspected.</i>
March 14, 2002 6:19:56 PM

http://www.howtosubnet.com/
i would be supprised if you got it the first time around. if you dont get it, keep reading and creating your own examples, it will just click when you get it.

i went to the tomshardware forums and all i got was this lousy signature.
Related resources
March 15, 2002 1:02:21 AM

holy cow !!!!

i just spent the last 45 minutes learning from that web site - "howtosubnet.com"...

then going back and reading what "jlanka" wrote actually makes sense... you are right, it takes a few "readings" to understand...

it seems that for a small lan, without any outside (i.e. internet) connection, the subnet mask really does not matter... is that correct?....

along those same lines, if i use a class A subnet mask, and only the first octet of the IP address is used for the network addresses, then i should actually name my computers "a.b.c.d" where i vary the "a" variable and keep the "b.c.d" constant... is this correct?...
March 15, 2002 4:45:31 AM

the only reason you would want to subnet would be, you have a class c address, and two buildings. you would subnet them so you could use the addresses in both buildings, behind routers that is. you've got it backwards, if you have a class a address, you are given the network part, first octet, you cant change it, then you can do what ever you want to with the host part. a.b.c.d a is the part you are assigned, b.c.d is the host.

i went to the tomshardware forums and all i got was this lousy signature.
March 15, 2002 4:50:28 AM

oh yea, dont worry about this kind of ip address. in a couple years, maybe sooner, the world is going to ip v.6. i forget how many ip addresses that is, but its enough to assign an ip address to every man woman and child in the world.

i went to the tomshardware forums and all i got was this lousy signature.
March 15, 2002 7:41:05 AM

I think ipv6 is 64 bit? Thats a whole hell of a lot.

<i>It's always the one thing you never suspected.</i>
March 15, 2002 7:47:43 AM

Quote:
it seems that for a small lan, without any outside (i.e. internet) connection, the subnet mask really does not matter... is that correct?....

Nope. Subnet mask always matters. I think what you're trying to say is that usually you will not "subdivide" a class A B or C subnet. But for machine config, you always need a subnet mask, because you are always in a subnet.

Quote:
along those same lines, if i use a class A subnet mask, and only the first octet of the IP address is used for the network addresses, then i should actually name my computers "a.b.c.d" where i vary the "a" variable and keep the "b.c.d" constant... is this correct?...

hmmmm... I'll try to read in to what you're saying. Do you mean the name of your machine, as in www.tomshardware.com? If so, naming has nothing to do with addressing. It's just a table lookup (DNS)

Is that what you meant? Or something different?

<i>It's always the one thing you never suspected.</i>
March 15, 2002 8:42:20 AM

I'm not sure you should be classifying subnets into classes. IP's yes.

Anyway these are the classes of IPs.

Class

A 0._._._-126._._._
B 128.0._._-191.255._._
C 192.0.0._-254.255.255._

127 possible Class A licences at 16 million each.
16,000 Class B at 65,000 each.
2,000,000 Class C at 254 each.

IP version 4 btw, which will be gone soon enough =).

<font color=red>:</font color=red> <font color=white>:</font color=white> <font color=blue>:</font color=blue>
March 15, 2002 11:00:24 AM

Quote:
I'm not sure you should be classifying subnets into classes. IP's yes.

True enough. Semantics snafu. Good call.

<i>It's always the one thing you never suspected.</i>
March 15, 2002 11:03:19 AM

(this stuff is actually fun to learn)..

so let me restate my earlier post (with corrections)..

on a simple level,

if my subnet = 255.0.0.0
then my ip addresses can be a.b.c.d where i can vary the "b", "c" and "d" octets... and hence i can have upto 2^24-2 number of computers on the network....

if my subnet = 255.255.255.0
then my ip addresses can be a.b.c.d where i can vary only the "d" octet...and hence i can have upto 2^8-2 number of computers on the network....

this is why an earlier post made the comment that for MANY computers, use a class-A, and for small number of computers, use a class-c...

did i get it right this time?....

along those same lines, what is the rationale for having a "unique" subnet mask as opposed to a "common" one such as the one i am using?...

thanks...
March 15, 2002 11:31:54 AM

Quote:
did i get it right this time?....

Yes - everything you said was correct.
Quote:
what is the rationale for having a "unique" subnet mask as opposed to a "common" one such as the one i am using?...

I'm going to read in to what you're saying here again. By "common" I think you mean class A B or C. By "unique" I think you mean subnetting a class A B or C. Is that right?

if so, the answer is that a given company may be assigned (by the InterNIC) a class A B or C address block. So let's say IBM is assigned a class A. Well, they really don't want to put all their tens of thousands of machines into one gigantic subnet, so they sub-divide that into smaller subnets thus causing the need for "unique" or non-standard subnet masks. Same goes for class B and even C. We have some small lans here at work, and are subdividing a class C. This way each lan has up to 32 (actually 30, allowing for network and broadcast) machine on it.

Quesion: For my example in the previous sentence (the class C), what would be the subnet mask in dotted decimal notation? If you get that one right you are hereby dubbed a subnet nerd! ;-)

<i>It's always the one thing you never suspected.</i>
March 15, 2002 2:42:49 PM

30 machines on each lan...

let's reverse engineer this one....

30 = 2^x-2
32 = 2^x
where x = 5, and hence 2^5-2 = 30....

this equates to a subnet mask of:
11111111.11111111.11111111.11100000

or 255.255.255.224....

professor - did i get it right?...
March 15, 2002 2:57:41 PM

Congrats. You may now assume the position.

"Thank you sir may I have another" - Kevin Bacon

<i>It's always the one thing you never suspected.</i>
March 16, 2002 9:05:13 AM

Quote:
I'm not sure you should be classifying subnets into classes. IP's yes.

Why not?

Cisco does it.

<b><font color=blue>~ Whew! Finished...Now all I need is a Cyrix badge ~ </font color=blue> :wink: </b>
!