Link to home
Start Free TrialLog in
Avatar of David_4321
David_4321

asked on

Subnetting

Lo everybody

Im trying to get my head around subnetting, aparrently its one of the hardest concepts to understand with networking. Anywho, I beleive subnetting is a way of limiting a number of computers on a particular class network (please correct me if im wrong). What im trying to work out is which subnets maks have to be used for different number of hosts, can someone please explain how, for example, to work out which subnet masts to use for 1,000,000, 9000, and 60.

Any reply will be much appreciated

Thanks

Dave
Avatar of liddler
liddler
Flag of Ireland image

In it's simplest form:
for big networks  - use Class A mask (255.0.0.0) > 60,000 hosts
Mediunm networks - Class B (255.255.0.0) 254 - 60,000 hosts
Small networks - Class C (255.255.255.0) < 254 hosts
You can cut a Class C network down, so a 255.255.255.128 mask gives you 2 127 host subnets


rfc definition is at http://www.faqs.org/rfcs/rfc950.html
Avatar of ADSaunders
ADSaunders

Hi David_4321,
Try these sites for free subnet calculators:
http://www.wildpackets.com/support/downloads
http://support.solarwinds.net/updates/New-customerFree.cfm

Regards .. Alan
Avatar of David_4321

ASKER

Thanks for the replies however i would really like to know how to calculate them rather then using a program. Thanks
see http://www.ralphb.net/IPSubnet/subnet.html for a tutorial
The most basic subnet masks divided the IPv4 address range into 5 classes, A B and C D and E
D and E are reserved for multicasting and E was reserved for furture use.

Class A subnets have have a mask of 255.0.0.0. and 256*256*256 addresses -2 (for network and broadcast addresses or 1,6777,214
Class B subnets have a mask of 255.255.0.0 and have 65,534 usable addresses
Class C subnets have a mast of 255.255.255.9 and have 254 usable addresses

These boundries might not fall into handy chunks for your network, so more restrictive masks can be used if your routing protocol understands variable length subnet masks.


One of the easiest ways to do this is to use a table for the commonly used (and practical masks)

Net bits
 mask     total-addresses
  255.255.240.0  4096
 
  255.255.248.0  2048
 
 255.255.252.0 1024
 
 255.255.254.0 512
 
 255.255.255.0 256
 
 255.255.255.128 128
 
 255.255.255.192 64
 
 255.255.255.224 32
 
 255.255.255.240 16
 
 255.255.255.248 8
 
 255.255.255.252 4

or to use a subnet calculator.

http://www.telusplanet.net/public/sparkman/netcalc.htm

above you see the example for 64 nodes (255.255.255.192)
for your 9000 example 255.255.192.0 would have 16384 nodes (the next step down is 8192 nodes)
and for your 1000000 example 255.240.0.0 would have 1048576 nodes
David_4321,
Simply put (if such a thing can be simple!!) CIDR subnet calculation looks at the IP address as a 32 bit number rather than 4 8 bit quartets.
If you 'lay out' your 64 bits, and take a point anywhere along it, then those bits to the left of that point become the subnet address (rounded to 4 bit quartets), and those bits to the right when evaluated as decimal give the count of hosts on that subnet. Thus
11111111 11111111 11111111 11111111
                          ^
gives a network address of 255.255.255   and can address 255 nodes.
whereas
11111111 11111111 11111111 11111111
                              ^
equates to a network address of
11111111 11111111 11111111 11110000
or 255.255.255.240
and can address 15 nodes (Bin 1111)

Your subnet mask calculation, is simply to lay out all 32 bits as above, then reverse each bit.

.. Alan
Go to page http://www.learntosubnet.com they have realy cool videos that will explain the whole concept in detail.
what you will have t know is convert bianries to decilams and decimals to bianries, take it easy, it takes some time before you will feel comfortable with it.

Good Luck

Sebo
Sorry everyone, im being a right dumbass. I'm still not getting it. If one of you can please explain how you worked out which subnet to use for 1,000,000 hosts (please explain so a dumbass can understand) i might be able to work out the rest

Thanks, and sorry

Dave
A mask means you only look at the last n digits of an ip address.
So if you had an IP 65.5.12.20 and a subnet of 255.255.255.0 on one machine, the network would see it just as .20 (the first three octals are masked)
if you also had a machine 65.6.12.20 mask 255.255.255.0 it would also be seen as .20 and the two machines would not be able to see each other.
However a mask of 255.0.0.0 would see the first machine as 5.12.20 & the second as 6.12.20, so they would be distict address and could see each other.  The more machines you need the smaller the mask.
so as  chicagoan      pointed out above the maximum sized mask you could use for 1000000 machines is 255.240.0.0, if you has a mask 1 bit bigger (i.e. 255.241.0.0) you would have less than 1000000 possible addresses and you need a unique address per machine
Either consult a chart
http://www.ralphb.net/IPSubnet/class_a.html


or do the math

convert to Take 10.0.0.0 and convert to binary:


          ip address: 00001010.00000000.00000000.00000000
First we determine what class of address it is:


      If the first bit is 0 it is a Class A address      
The default subnet mask for a Class A address is:


         subnet mask: 11111111.00000000.00000000.00000000
The formula for figuring out the number of 'host' bits in a subnet mask is
         2^n=(number of nodes )          (2^n  means '2' to the power of 'n')
Since you know the number of nodes, you need to find 'n'.

Because you want 1048576 node(s), you want to leave 20 - '0' bits in the subnet mask since 1048576 = 2 ^ 20.
This will give you the following subnet mask:


         subnet mask: 11111111.11110000.00000000.00000000
Which is referred to as /12 or in dotted decimal notation as 255.240.0.0

ASKER CERTIFIED SOLUTION
Avatar of chicagoan
chicagoan
Flag of United States of America image

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