subnet mask : Java Glossary

*0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ (all)

subnet mask
IP (Internet Protocol) 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 (Internet Service Provider) 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.


This page is posted
on the web at:

http://mindprod.com/jgloss/subnetmask.html

Optional Replicator mirror
of mindprod.com
on local hard disk J:

J:\mindprod\jgloss\subnetmask.html
Canadian Mind Products
Please the feedback from other visitors, or your own feedback about the site.
Contact Roedy. Please feel free to link to this page without explicit permission.

IP:[65.110.21.43]
Your face IP:[3.128.201.71]
You are visitor number