Solved

Subnetting

Posted on 2003-12-03
10
1,834 Views
Last Modified: 2012-08-14
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
0
Comment
Question by:David_4321
  • 3
  • 2
  • 2
  • +2
10 Comments
 
LVL 18

Expert Comment

by:liddler
ID: 9865933
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
0
 
LVL 10

Expert Comment

by:ADSaunders
ID: 9865945
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
0
 

Author Comment

by:David_4321
ID: 9866148
Thanks for the replies however i would really like to know how to calculate them rather then using a program. Thanks
0
 
LVL 18

Expert Comment

by:chicagoan
ID: 9866180
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
0
 
LVL 10

Expert Comment

by:ADSaunders
ID: 9866233
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
0
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 
LVL 6

Expert Comment

by:Sebo2000
ID: 9866994
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
0
 

Author Comment

by:David_4321
ID: 9867467
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
0
 
LVL 18

Expert Comment

by:liddler
ID: 9867562
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
0
 
LVL 18

Expert Comment

by:chicagoan
ID: 9867643
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

0
 
LVL 18

Accepted Solution

by:
chicagoan earned 125 total points
ID: 9878666
Has that helped you to get your head around it?
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
0

Featured Post

Give your grad a cloud of their own!

With up to 8TB of storage, give your favorite graduate their own personal cloud to centralize all their photos, videos and music in one safe place. They can save, sync and share all their stuff, and automatic photo backup helps free up space on their smartphone and tablet.

Join & Write a Comment

If you're not part of the solution, you're part of the problem.   Tips on how to secure IoT devices, even the dumbest ones, so they can't be used as part of a DDoS botnet.  Use PRTG Network Monitor as one of the building blocks, to detect unusual…
When it comes to security, there are always trade-offs between security and convenience/ease of administration. This article examines some of the main pros and cons of using key authentication vs password authentication for hosting an SFTP server.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now