[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2058
  • Last Modified:

hosts per subnet

can some1 explain how to calculate the maximum number of hosts per subnet.

e.g. class B network with a subnet mask of 255.255.252.0
0
lukegriffiths110
Asked:
lukegriffiths110
1 Solution
 
neteducationCommented:
If you have a subnetmask of 255.255.252.0 then this is binary

11111111.11111111.11111100.00000000

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)
0
 
Matthew-Elvey-San-FranciscoCommented:
Yup, that's the answer.  http://jodies.de/ipcalc can make things easy for you - I just pasted 255.255.252.0 into the netmask field, and it told me: Hosts/Net: 1022    
0
 
Matthew-Elvey-San-FranciscoCommented:
BTW, a "class B" network has a netmask of 255.255.0.0 by definition, so your question is a bit confused.  ipcalc will confirm that a network with that netmask has 65532 host addresses.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
neteducationCommented:
mat: class b has 65534 (2^16 - 2)
0
 
CiaranDolanCommented:
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.
0
 
sohaibfaruqCommented:
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 255.255.255.252 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.
0

Featured Post

New Tabletop Appliances Blow Competitors Away!

WatchGuard’s new T15, T35 and T55 tabletop UTMs provide the highest-performing security inspection in their class, allowing users at small offices, home offices and distributed enterprises to experience blazing-fast Internet speeds without sacrificing enterprise-grade security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now