Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 255.255.255.252. 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 255.0.0.0 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
3  
Classes are dead. –  grawity Aug 2 '10 at 9:57
1  
@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. –  Josh Aug 31 '10 at 13:32
    
Serial Masks :) –  John T Sep 9 '11 at 18:51

8 Answers 8

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 255.0.0.0. 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, 172.16.0.0/12, 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 ietf.org/rfc/rfc1918.txt 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

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 192.168.0.0 domain with a subnet of 255.255.255.0. 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 255.255.255.252, 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 255.0.0.0 but in a classless network involving subnetting 255.255.255.252 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.

255.255.255.252 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 10.1.1.0 network with a 255.255.255.252 subnet mask, your usable IP address would be 10.1.1.1 and 10.1.1.2 while the broadcast address would be 10.1.1.3.

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 255.0.0.0, a Class A network is unusually large for a home network as it has 255.255.255.255 - 255.0.0.0 = 16,777,216 addresses.

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

255.255.255.252  =  11111111.11111111.11111111.11111100
255.255.255.253  =  11111111.11111111.11111111.11111101
255.255.255.254  =  11111111.11111111.11111111.11111110
255.255.255.255  =  11111111.11111111.11111111.11111111

More info on Wikipedia.

share|improve this answer

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 255.255.200.81-255.255.200.94

Mask bits 28

First octet range of 192-223

Wild card Mask of 0.0.0.15

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 255.255.0.0. 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 255.255.240.0.

share|improve this answer

Well, you are part of a subnet, specifically the subnet 255.255.255.252. 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

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

11111110.11111111.11111111.11111111 

would be 126.30.255.255

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.