In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

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

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

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

Try these sites for free subnet calculators:

http://www.wildpackets.com/support/downloads

http://support.solarwinds.net/updates/New-customerFree.cfm

Regards .. Alan

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

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

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

Thanks, and sorry

Dave

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

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

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

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

Which is referred to as /12 or in dotted decimal notation as 255.240.0.0

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.

if not, review

http://www.swcp.com/~jgentry/topo/unit3.htm

for the math

http://www.cisco.com/techtools/ip_addr_help.html

for how the calculators work