hosts per subnet

Posted on 2005-05-16
Last Modified: 2012-06-21
can some1 explain how to calculate the maximum number of hosts per subnet.

e.g. class B network with a subnet mask of
Question by:lukegriffiths110
    LVL 10

    Accepted Solution

    If you have a subnetmask of then this is binary


    Or in other words you have 22 bits "network" and 10 bit's "host"-part

    With 10 bits you can have 2^10 hosts which is 1024 minus two because the very firt and the very last address are reserved (first=networkaddress, last=broadcast address)
    LVL 1

    Expert Comment

    Yup, that's the answer. can make things easy for you - I just pasted into the netmask field, and it told me: Hosts/Net: 1022    
    LVL 1

    Expert Comment

    BTW, a "class B" network has a netmask of by definition, so your question is a bit confused.  ipcalc will confirm that a network with that netmask has 65532 host addresses.
    LVL 10

    Expert Comment

    mat: class b has 65534 (2^16 - 2)
    LVL 7

    Expert Comment

    He has subnetted his class B into a 1024 host subnet. Quite common. We've done the same with the private class A range (and the private Class B - Grr!).

    Neteducation is right on the money.
    LVL 1

    Expert Comment

    Hosts are calculated from the subnet masks. The concept of classes is now deminishing and we are now in the world of CIDR (Classless InterDomain Routing)

    Anyways to calculate the hosts of a particular subnet just subtract the non-255 octet from 256. e.g if you have a mask of you can have four hosts in the network.
    One important thing the first address of would be the subnetwork address which identifies the subnetwork and the last address would be the broadcast address. so effectively you will have two IP addresses which you can use.
    Hope it helps.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Configuring network clients can be a chore, especially if there are a large number of them or a lot of itinerant users.  DHCP dynamically manages this process, much to the relief of users and administrators alike!
    If your business is like most, chances are you still need to maintain a fax infrastructure for your staff. It’s hard to believe that a communication technology that was thriving in the mid-80s could still be an essential part of your team’s modern I…
    After creating this article (, 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…
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    779 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

    11 Experts available now in Live!

    Get 1:1 Help Now