Here’s a slightly simplified view of subnets, as used in Windows TCP/IP networks. For more information, see the Microsoft Knowledge Base article entitled Understanding TCP/IP Addressing and Subnetting Basics.
To communicate using the TCP/IP protocol, your computers must all have IP addresses in the same subnet. If they obtain their IP addresses automatically from a hardware router using DHCP or an Internet Connection Sharing host, that will happen automatically.
These IP address ranges are reserved for use on private networks. Use them if you assign IP addresses manually:
- 10.0.0.1 – 10.255.255.254, subnet mask 255.0.0.0
- 192.168.0.1 – 192.168.255.254, subnet mask 255.255.255.0
This IP address range is reserved for use when a computer is configured to obtain an IP address automatically, but there’s no DHCP server on the network to make the assignment:
- 169.254.0.1 – 169.254.255.254, subnet mask 255.255.0.0
Windows calls this Automatic Private IP Addressing (APIPA), and it’s available in Windows 98, Me, 2000, and XP. Windows 95 doesn’t support APIPA.
Two IP addresses are in the same subnet if, and only if, they’re the same in each of the four positions where the subnet mask is 255.
Examples of addresses in the same subnet:
- 10.0.0.1 and 10.0.0.2, subnet mask 255.0.0.0
- 10.1.2.3 and 10.222.111.55, subnet mask 255.0.0.0
- 169.254.14.101 and 169.254.233.47, subnet mask 255.255.0.0
- 192.168.0.1 and 192.168.0.147, subnet mask 255.255.255.0
- 192.168.123.5 and 192.168.123.254, subnet mask 255.255.255.0
Examples of addresses than aren’t in the same subnet, and the position in which they’re not the same:
- 192.168.0.2 and 192.168.1.2, subnet mask 255.255.255.0 (3rd)
- 192.168.0.140 and 169.254.52.221, all subnet masks (1st)