Hey everbody just when i think am getting there i feel like am miles away iam am still struglling with this subnetting buisness.I want to understand how to choose a net id and subnet mask for  a network with 2000 hosts and want to know what class of network this belongs to am getting so confuessed with class c and class b ip address.such as for example been used in a class b network.please help guys .
Who is Participating?
saku99Connect With a Mentor Commented:
Ok, firstly strictly speaking network classes are defined by the 3 most significant bits in the address. Also if you start thinking of network addresses as bits rather than 4 octets all this will become easier, it's all simple bit counting.

So traditionally in classfull networking network classes are defined as

class A - leading BIT is 0
class B - leading bits are 10
class C - leading bits are 110

The classes basically implied the netmasts so class A would be class B and C, but originally when all this networking stuff was defined there were no netmasks, so when you were given a particular class network, that's all you needed.

when you look at the leading bits of addresses, this is why 192 networks are termed class C and networks are class A

As you can imagine being restricted to only thsese types of networks was restrictive, in your case you could not get a network for 2000 hosts, it was 254 and then 65023. So netmasks were introduced so that classed networks could be sub-netted.

Classful networking is almost irrelevant now in a sense, as things have been sub netted to death, the top network allocation bodies may still be allocating using traditional classes but that does not trickle down anymore as there would be a huge shortage of addresses. You basically get what you need without looking at what class it should be.

Now looking at your case, you want 2000 hosts, so it's obviously a  sub-classed network from a Class B. Now 192.168 network range is strictly a class C as the leading 3 bits are 110, and that's how this range is described in the RFC that deals with private addressing space. However, you don't have to worry about that if you don't want to, simply use more bits in the netmask.

Now the netmask tells you how many hosts there will be, counting from the lowest bit (setting them to be 0). So a normal class C netmask is which in bits is:

11111111 11111111 11111111 00000000

which gives you 256 addresses (254 hosts as you have to remove  network address and broadcast address)

if you increase the netmask by one bit you will double that to 512 and the netmask will be:

11111111 11111111 11111110 00000000  which is

double that again and you get 1024, and doubel again and you get 2048 which is what you need, so then the netmask will be:

11111111 11111111 11111000 00000000  which is

as to what class it is, well strictly speaking if you use the 192.168 then it fall outside ti's definition, if you use then it a subclass of class A. In reality it's not relevant to call it any class, but as an analogous descrittion we can call it a subclass of class B as it is a subdivision of what would otherwise be a network (disregarding the fact the the leading bits tell us differently).

also the way the netmask works is very simple if you have a host address by doing a bitwise AND with the netmask you get the network address. Just using a standad class C to illustrate say you have a host address of with the netmask of the when you convert both into bits and do a bitwise AND you'll end up with which is the network address. It's as simple as that, if you ever get confused about networks and netmasks just convert to bits and AND them to find out what network is being defined by a netmask.

Anyway, hope this makes it a bit clearer.
hemmiConnect With a Mentor Commented:
With subnetting you say how many least significant bits (out of 32) may vary to span the subnet
With 8 bit thsi is called called class C (comprising 256 adresses (254 usuable)
with 16 it's called called class B
and 24 is called class A

Class A,B,C is, however, fairly historical as you can choose the numer of bits freely.
You want adresses for 2000 hosts, i.e. 2048 is sufficient.
8 bits = 256 addresses
9 bits = 512
10 bits = 1024
11 bits = 2048

8 bits: (all 8 least significant bits are zero)
9 bits: (9 least significant bits zero)
10 bits: (10 ...)
11 bits: (11 ...)

Addresses (I take the range 192.169.*.* as an example:
8 bits: or or and so forth
9 bits: - or - and so forth
10: - or - and so forth
11: - or - and so forth

Don't use the lowest and highest address for a host.
Your 11 bit subnet will neither be class A nor B nor C!
xtreminatorConnect With a Mentor DIYerCommented:
Adding more to "hemmi"s comment
As you mentioned

11: - or - and so forth
since, ipv4 address is indicated by decimal dotted notation.
decimal number for IP address will not exceed to 255 .actual range for Host ID and Net ID is 0-255 (not 0-256).
by using class C ip address 192.168.0 range  will be Network address and will be broad cast address for the network range -
so the usable IP for network system will be -
and by keeping in mind above range you can mast bit for subnetting to prevent the wastage of ip address.
Sure! The upper address in the range should always read 255!
Although I am comfortable subnetting, I'm also kinda lazy.  I love Solar Winds' free subnet calculator - or any other subnet calculator that does the breakdown for me.  Solar Winds does ALL the thinking beyond me specifying the beginning IP and number of clients.  ;)  Call me a heretic, but aren't things like sub-netting (repetitive, mind-numbing math problems) why we have computers (calculators) in the first place?  :P
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.