Networking Day 2: Subnets

Published On: Sunday, June 14th 2009
A subnet is just one small group of computers. What makes it special is that all the computers on the subnet can communicate with each other without a router. All the computers in your house should be on the same subnet. Subnets can be difficult, but I'll keep it easy as possible here. Subnet mask The subnet mask is used to determine if two computers are on the same subnet. In most home networks the subnet mask is "255.255.255.0". That subnet mask means that the first three numbers in the IP address must be exactly the same for both computers to be in the same subnet. A subnet mask of "255.255.0.0" means the first two numbers must match. Here are some examples:
IP Address IP Address Subnet mask Same subnet?
192.168.0.3 192.168.0.205 255.255.255.0 Yes
192.168.0.3 192.168.1.3 255.255.255.0 No
172.16.1.33 172.16.33.1 255.255.255.0 No
172.16.1.33 172.16.33.1 255.255.0.0 Yes
192.168.0.3 192.168.0.134 255.255.0.0 Yes
Subnet notation In binary, the subnet mask is a string of 1's followed by a string of 0's and 255 is eight 1's in binary. So the netmask "255.255.255.0" is 24 1's followed by 8 0's in binary. An IP address in subnet notation is the IP address immediately followed by a forward slash and the number of 1's in the subnet mask. Here are some examples:
IP Address Subnet mask Subnet notation
192.168.0.3 255.255.255.0 192.168.0.3/24
192.168.1.233 255.255.0.0 192.168.1.233/16
172.16.10.3 255.255.255.0 172.16.10.3/24
172.16.10.3 255.255.0.0 172.16.10.3/16
The gateway If a subnet is connected to another network, such as the internet, you need a router. A router acts as a gateway for a subnet. It's IP address usually is ".1" or ".0.1" inside a subnet. So 172.16.10.3/24 would be 172.16.10.1 and 172.16.10.3/16 would be 172.16.0.1. That's basic subnets This is the easy subnetting. Of course, the full subnetting involves masks of "255.255.196.0", notations of "172.16.33.34/19", etc. There's no need to do all that. Most of the time you are safe using the subnet mask of "255.255.255.0", unless you want to connect more than 253 computers. Why not 255 or 256 you ask? It's a long story. Come back tomorrow for how to set up a router.

Tag Cloud

Copyright © 2024 Barry Gilbert.