Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have Wireless Internet with a USB modem and got what seems to be a Class A IP allocated (first byte is decimal 10).

ipconfig /all shows a subnet mask of I know that the ones are for the network and the zeros are for the hosts but how many hosts are for 11111111.11111111.11111111.11111100?

Shouldn't the subnet mask be for a class A network?

What is it that I am getting wrong?

I need a simplified answer, as I have difficulty understanding long and technical answers, due to a lack of computer knowledge.

share|improve this question
Classes are dead. – grawity Aug 2 '10 at 9:57
@grawity +1 i wonder why they wont stop teaching this – matthias krull Aug 2 '10 at 22:30
Classes aren't dead technically. RFC1519 uses Class A,B, and C quite often. When I see people use Class A,B, or C I think /8, /16, /24 respectively. – dbasnett Aug 3 '10 at 12:27
It's been a month since the question was asked, if one of the answers fits please accept it. Thanks. – Zaz Aug 31 '10 at 13:32
Serial Masks :) – John T Sep 9 '11 at 18:51

10 Answers 10

Your question "how many hosts" is actually simple to answer.
You have 11111111.11111111.11111111.11111100(B) as the subnet mask, which leaves two bits for the host address, 2^2 is 4, so 4 possible addresses. Since you can't use all zeros (network id) and you can't use all 1s (broadcast message) you have (bits^2) - 2 => (2^2) - 2 => 2 usable addresses. This may or may not be cut down by your router, which would be one usable address for your computer. My guess is you're stuck with this because of this is how your ISP does things.

Part of your question is that you're confusing your subnet mask with what you read the default is for your class of address. Yes, 10.x.x.x is a class A network, and when interacting with other networks(*) it has a subnet mask of But internally you're able to subnet as you see fit. You really don't want to have 16777214 (2^24 - 2) hosts on the same network segment. You really want to subdivide traffic on those 16 million hosts.

(*) 10.x.x.x/8,, 192.168.x.x/16 are non-routed IP addresses, meaning you should never see them on the great Internet, just on your local LAN. You need some kind of gateway, such as NAT, to actually have your traffic on the 'real' Internet. You can still route these internally though, say if you wanted your own second network.

share|improve this answer
+1 for the note about 10.x.x.x/8 being a non-routed IP address -- it's a block specifically allocated for private networks. See RFC 1918 It's likely that your ISP is handling the NAT for you. The downside is that if you were hoping to connect to your computer from outside, you don't have a publick IP address. – Doug Harris Sep 9 '11 at 19:07
I am using a public wifi and the subnet mask is I can't seem to see any other devices besides the router and my device. It's a good security precaution to segment every device getting on the network – Sun May 30 at 20:04

The subnet mask refers to the part of a network that a router has knowledge to complete a singal connection hop. For example, most private routers run under the domain with a subnet of This means that any IP address that is of 192.168.0.XXX will ALWAYS be on this private network, no matter what the XXX is. This is a good way for routers to offload routing to a final device, such as one at a large corporation or university campus.

In your case, with a subnet mask of, your router will have routing information for only a few IP address, specifically 2. Based on your subnet, your first three octets are all occupied (they are 255), leaving this in a Class-C network block. With a 252 as your last octet, it means that you will have two addresses left over for actual hosts. In general, to know the number of hosts you will have available, you can count the number of 0's in binary in your subnet mask (n), and raise 2 to that power, i.e. 2^n. Then you need to subtract 2 from that value to offset for the special subnets of all 1's and all 0's.

Thus, in your case, you have a final octet of 252, which in binary is 11111100. 2 zeroes means your host equation is (2^2)-2 which is 4-2, which is 2 available hosts on the subnet.

I hope that helps a little. Subnetting can be frustrating. Too much math sometimes!

share|improve this answer
Is there some documentation (not wikis) who explains this in detail? A complete reference so to say? – Jon Aug 1 '10 at 15:43
wikipedia has a pretty good explanation of subnets. Also, any Network+ related books will have some good lessons on subnetting. But a lot of this stuff you pick up system administering or in networking classes in University. Search Amazon for Networking books and those will most likely contain chapters on subnetting. But it's all math and written in technical language because properly applying it and understanding it is a technical thing. – Jonathan Aug 2 '10 at 4:30
Some RFC's (some older) RFC 950, 1219, and 1878. – dbasnett Aug 3 '10 at 12:10

You are correct to say the subnet mask of Class A should be but in a classless network involving subnetting is mostly used between the ISP and your home network to provide only 2 usable host. Of which one host is the ISP and the second is your home network public address. would give you only two usable address as follows:

Network Host Broadcast
0       1:2     3
4       5:6     7
8       9:10    11

Therefore if you use network with a subnet mask, your usable IP address would be and while the broadcast address would be

Note that broadcast address can not be assigned to a host of interface.

share|improve this answer

(255 - 252) + 1 = 4. You +1 because it's networks between 252 and 255, including 252.

The netmask for a Class A network should be, a Class A network is unusually large for a home network as it has - = 16,777,216 addresses.

Also, you got the binary wrong. IPv4 addresses are made up of four 8-bit bytes, as so:  =  11111111.11111111.11111111.11111100  =  11111111.11111111.11111111.11111101  =  11111111.11111111.11111111.11111110  =  11111111.11111111.11111111.11111111

More info on Wikipedia.

share|improve this answer

First, forget anything you've heard about classes.

Subnet masks do not have to be,, or The 1 to 0 boundary can fall on any bit between 31 (left most, or most significant bit) or 0 (right most, or least significant bit).

A more compact and easier form of writing the subnet mask is to write a slash, then the number of 1 bits, this is called CIDR notation and is now what is used. (/32 means a single IP, and your formerly classful masks above would be /8, /16, and /24).

Look below for an example of how binary arithmetic works:

  ... 5 2   1                 
  ... 1 5   2 6 3 1 
  ... 2 6   8 4 2 6 8 4 2 1  <-- Place Value
  ... ---   ---------------
  ... 1 1   1 1 1 1 1 1 0 0  <-- Bit of Netmask

0 bits in a subnet mask are available for hosts, but not the first or last address. So add up all the value of each column that is 0, then subtract 2 to find the number of hosts.

The above subnet mask, could also be written as a /30.

share|improve this answer is a /30 network mask (or simply netmask), that is, the first 30 bits are used for the network prefix and the last 2 are use to identify the host.

Such a netmask has 64 subnets and 2 hosts in each subnet for a total of 128 hosts:

network address   x.x.x.0
first host        x.x.x.1
last host         x.x.x.2
broadcast address x.x.x.3
share|improve this answer

Well, you are part of a subnet, specifically the subnet You can have a class A IP from a network which has subnets.
The IP with .252 at the end is 11111100 in binary, so your transformation from dec to bin is incorrect.
But let's put that aside ... there should be 4 hosts in .252

share|improve this answer
You are correct, I messed up the conversion on the last part; 11111100 is the correct value, and in fact there are 4 hosts for mask 00. Thank you for pointing that out. If I am in a subnet, how many subnets can there be for class A with the above subnet mask? – Jon Aug 1 '10 at 15:32
4,194,304 if I did my math right. – dbasnett Aug 3 '10 at 12:38

Your hex answer will be C0.A8.C8.5C for a class C network.

Subnet bits will be 4

Maximum subnet 16

Host addreess range of

Mask bits 28

First octet range of 192-223

Wild card Mask of

share|improve this answer

the first binary digits = 0 for class a, 10 for class b, 110 for class c, 1110 for class d and 1111 for class e (experimental). you have class b. which default subnet is So to determine you should convert intp network info use the 2'n-2=y formula. (y= the number of subnets you want to create) (n= the number of host bits to be converted to network bits) ex. you want to create 14 subnets. 2'n-2=14. 2'n=14+2. 2'n=16. 2'4=16. 4 is the amount of bits you need to take from the default subnets host area 11111111.11111111.11110000.00000000. you can determine how many host are available by the 2'n-2 formula (n= the number of zeros there are) 2'12-2 (-2 for the network ID and Broadcast ID) = 4094 available host for a subnet of

share|improve this answer

Akere classA is So to do subneting I will say that the second octet should be broken down into 2 parts and, e.g.


would be

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .