subnet mask : Java Glossary

go to home page S words local find full screen, hide local find menu Google search web for more information on this topic jump to foot of page translate this page with Babelfish by Roedy Green ©1996-2009 Canadian Mind Products
index page for letter ⇒ punctuation 0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z (all)
subnet mask
IPs are 32 bit binary numbers usually written as a decimal dotted quad, e.g. 65.110.21.43. There is some additional structure in the number, called the net, subnet and hostnumber. Usually an ISP would manage an entire net. There is a variable number of bits for each field. Depending on how big a fish your ISP is, he would have a class A, B or C license. Class A would let him support 16,777,214 hosts, B 65,534 hosts and C 254 hosts online at one time.
Class Range Default Mask
Class A 1 .. 127 255.0.0.0
Class B 128 .. 191 255.255.0.0
Class C 192 .. 223 255.255.255.0
The subnet mask is a binary number expressed as a dotted quad to help determine how the IP number is composed.

Consider the IP number 7.123.56.89 and its corresponding subnet mask: 255.240.0.0. We can tell from the prefix 7 that this is part of a class A licence block — the 7.xxx.xxx.xxx series. Thus the net portion is the first 8 bits. If we write the subnet mask in binary we get: 11111111.11110000.00000000.00000000. There are 20 bits (indicated by the zeros) reserved for host number. This would allow 1,048,574 different possible host addresses (not 1,048,576 because the addresses consisting of all zeros and all ones are reserved.) and 4 bits for subnet addresses i.e. 14 possible subnets + 2 reserved.

Consider the IP number 190.123.56.89 and its corresponding subnet mask: 255.255.192.0. We can tell from the prefix 190 that this is part of a class B licence block — the 190.123.xxx.xxx series. Thus the net portion is the first 16 bits. If we write the subnet mask in binary we get: 11111111.11111111.11000000.00000000. There are 14 bits reserved for host number. This would allow 16,382 different possible host addresses and 2 bits for subnet addresses i.e. i.e. 2 possible subnets + 2 reserved.

Consider the IP number 204.50.123.56 and its subnet mask 255.255.255.0. We can tell from the prefix 204 that this is part of a class C licence block, — the 204.50.123.xxx series. the net portion is the first 24 bits. If we write the subnet mask in binary we get: 11111111.11111111.11111111.00000000. There are 8 bits reserved for host number. This would allow 254 different possible host addresses and no bits for a subnet addresses. The ISP is keeping this class C licence group as one subnet.

Just to add to the confusion, a big ISP might own several contiguous class C licenses. He can then combine them and create subnets bigger than 254 hosts. So you will sometimes see a Class B-style subnet mask like 255.255.192.0 being used on a Class C licence address.


CMP homejump to top
CMP logo
feedback Please email your feedback for publication, errors, omissions, broken/redirected link reports
and suggestions to improve this page to Roedy Green : feedback email
made with CSS
HTML Checked!
ICRA ratings logo
mindprod.com IP:[65.110.21.43]
Your face IP:[38.103.63.58]
You are visitor number 14,287.
You can get a fresh copy of this page from: or possibly from your local J: drive (Java virtual drive/mindprod.com website mirror)
http://mindprod.com/jgloss/subnetmask.html J:\mindprod\jgloss\subnetmask.html