Link to home
Start Free TrialLog in
Avatar of mrmut
mrmutFlag for Croatia

asked on

Subnetting

Can someone please explain to me subnetting principles, and how/why should one use that. Links are welcomed

Is subnetting important for common LANs?

Thank you.
SOLUTION
Avatar of lukefuno
lukefuno

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mrmut

ASKER

Theras2000 - I don't actually have a situation - I am trying to learn what that is, as I've heard people talk about that on the site. :) I probably don't really grasp TCP/IP completely, therefore the problems.


However, answers were good! Thanks to both of you!

Avatar of mrmut

ASKER

Great! Thanks!
OK, well I'll put some legs on it for you, using a basic scenario that exists on most people's home routers etc.  Usually your home ADSL/cable router will have an IP address like 192.168.0.1 with a mask of 255.255.255.0.  The mask is the most important thing in deisgnating a subnet.  This mask shows that a logical network exists labelled 192.168.0.0 and containing 256 possible computers from 0-255.  Actually the very irst and very last are unusable, so really you have 254 possible addresses.  Normally your router takes the first one (192.168.0.1) and your computers can have any of the 253 remaining (from 192.168.0.2 to 192.168.0.254).  This is the most basic and commonly found subnet.  Indeed the mask is called a 'subnet mask' because it is a key ingredient in specifying how big the subnet is.

You could manually create a new subnet, by telling one of your computers to be 192.168.1.10 or something similar, with a mask of 255.255.255.0.  Now this computer exists in a logical network labelled 192.168.1.x, with 256 possible computers (excepting the rules mentioned earlier).  This network 192.168.1.0 can never see the previous network 192.168.0.0, if the mask is 255.255.255.0, because that mask says that computers only see each other if the 1st 3 numbers are the same.  A new computer of IP 192.168.1.20 would be able to see the 192.168.1.10, because they are in the same subnet (assuming the mask is still 255.255.255.0).  You wouldn't do this in a home network, because (a) you'd never need mroe than 256 IPs and (b) your 2nd subnet wouldn't have internet access, because your ADSL router only know how to talk to the 1st subnet.

If you were able to edit the subnet mask to 255.255.0.0, things would be different.  Now any IPs with the same 1st 2 numbers can see each other (anything from 192.168.0.0 to 192.168.255.255).  This new subnet mask has defined the network as 192.168.x.x with 65536 possible computers (from 0.0 to 255.255).  In reality, you wouldn't want this many computers talking to each other.

Lets say that instead of being at home, you're at a business with a few routers available.  They want to have 2 subnets of just 128 computers each, instead of a single subnet of 256 computers.  Using our original router of 192.168.0.1, we could change the mask to 255.255.255.128.  Without explaining the maths, I'll just say that a mask of 128 allows 128 computers per subnet (whereas a 0 allowed 256).  So now, this subnet is officially from 192.168.0.0 to 192.168.0.127 (128 addresses).  We could then use a 2nd router, with an address like 192.168.0.129 and the same mask of 255.255.255.128.  This creates a subnet of 128 addresses from 192.168.0.128 to 192.168.0.255.  You can see here how we started with 256 addresses, and chopped it in half using subnets masks to make 2 subnets.  This is the reality of how companies deal with big blocks of IP addresses.  They cut them up into subnets, to keep things small and manageable.

Just for the sake of precision, I'll define the proper naming conventions.  In any given subnet, the first and last addresses are reserved.  The 1st is for the network name and the last is for broadcasting.  That is why the number of computers is always 2 less than the number of addresses.  So in the regular home network, the network is officially labelled 192.168.0.0 and the broadcast is 192.168.0.255.  This leaves numbers 1-254 available for devices (254 of them).  And for standards sake, the router/gateway is usually specified as the 1st of those devices, hence usually 192.168.0.1.  In the 2nd scenario I mentioned, we definied 2 networks (192.168.0.0 and 192.168.0.128) with broadcasts (192.168.0.127 and 192.168.0.255), leaving available devices (192.168.0.1-192.168.0.126 and 192.168.0.129-192.168.0.254).  I have left out mask notations (where 255.255.255.0 can also be described as /24), but I think this is beyond what you need.
Avatar of mrmut

ASKER

WOW. 8|

Thank you!
Avatar of lukefuno
lukefuno

if you want to you an break it down like this:

192.168.0.0 which is defined as a class c network usually for home use
the subnet mask is 255.255.255.0


so you can write it out like this: 192.168.0.0/24
24 means the first 24 bits are for the network ID, and the last 8 bits are for Host ID

if you wanted to break it down like theras2000 said, and you need 2 networks, you capture 1 bits from host and add it to the network portion, thus, giving you a new default subnet mast of 255.255.255.128 for both networks, and the 2 new network ids are 192.168.0.0/25 and 192.168.0.128/25.

you need to know binary number system.

192.168.0.0 = in binary = 11000000.10101000.00000000
255.255.255.0 = in binary = 11111111.11111111.11111111.00000000