Subnet Mask Note 1
Subnet Mask Note 1
• Article
• 12 minutes to read
•
Feedback
This article is intended as a general introduction to the concepts of Internet
Protocol (IP) networks and subnetting. A glossary is included at the end of
article.
Applies to: Windows 10 - all editions
Original KB number: 164015
Summary
When you configure the TCP/IP protocol on a Windows computer, the TCP/IP
configuration settings require:
• An IP address
• A subnet mask
• A default gateway
To configure TCP/IP correctly, it's necessary to understand how TCP/IP networks
are addressed and divided into networks and subnetworks.
The success of TCP/IP as the network protocol of the Internet is largely because
of its ability to connect together networks of different sizes and systems of
different types. These networks are arbitrarily defined into three main classes
(along with a few others) that have predefined sizes. Each of them can be
divided into smaller subnetworks by system administrators. A subnet mask is
used to divide an IP address into two parts. One part identifies the host
(computer), the other part identifies the network to which it belongs. To better
understand how IP addresses and subnet masks work, look at an IP address
and see how it's organized.
Subnet mask
The second item, which is required for TCP/IP to work, is the subnet mask. The
subnet mask is used by the TCP/IP protocol to determine whether a host is on
the local subnet or on a remote network.
In TCP/IP, the parts of the IP address that are used as the network and host
addresses aren't fixed. Unless you have more information, the network and
host addresses above can't be determined. This information is supplied in
another 32-bit number called a subnet mask. The subnet mask is
255.255.255.0 in this example. It isn't obvious what this number means unless
you know 255 in binary notation equals 11111111. So, the subnet mask is
11111111.11111111.11111111.00000000.
Lining up the IP address and the subnet mask together, the network, and host
portions of the address can be separated:
11000000.10101000.01111011.10000100 - IP address (192.168.123.132)
11111111.11111111.11111111.00000000 - Subnet mask (255.255.255.0)
The first 24 bits (the number of ones in the subnet mask) are identified as the
network address. The last 8 bits (the number of remaining zeros in the subnet
mask) are identified as the host address. It gives you the following addresses:
11000000.10101000.01111011.00000000 - Network address (192.168.123.0)
00000000.00000000.00000000.10000100 - Host address (000.000.000.132)
So now you know, for this example using a 255.255.255.0 subnet mask, that
the network ID is 192.168.123.0, and the host address is 0.0.0.132. When a
packet arrives on the 192.168.123.0 subnet (from the local subnet or a remote
network), and it has a destination address of 192.168.123.132, your computer
will receive it from the network and process it.
Almost all decimal subnet masks convert to binary numbers that are all ones
on the left and all zeros on the right. Some other common subnet masks are:
Decimal Binary
255.255.255.192 1111111.11111111.1111111.11000000
255.255.255.224 1111111.11111111.1111111.11100000
Internet RFC 1878 (available from InterNIC-Public Information Regarding
Internet Domain Name Registration Services) describes the valid subnets and
subnet masks that can be used on TCP/IP networks.
Network classes
Subnetting
Troubleshooting
References
Glossary
Recommended content
• Dynamic Host Configuration Protocol (DHCP)
This topic provides a brief overview of Dynamic Host Configuration Protocol
(DHCP) in Windows Server 2016.
• How to use automatic TCP/IP addressing without a
DHCP server
Introduce how to use automatic TCP/IP addressing without a DHCP server.
• DHCP (Dynamic Host Configuration Protocol) Basics
Learn more about: DHCP (Dynamic Host Configuration Protocol) Basics
• DHCP client can't get a DHCP-assigned IP address -
Windows Server
Discusses an issue where a DHCP client can't get a DHCP-assigned IP address.
Show more