Networking Day 2: Subnets

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 AddressIP AddressSubnet maskSame
subnet?
192.168.0.3192.168.0.205255.255.255.0Yes
192.168.0.3192.168.1.3255.255.255.0No
172.16.1.33172.16.33.1255.255.255.0No
172.16.1.33172.16.33.1255.255.0.0Yes
192.168.0.3192.168.0.134255.255.0.0Yes

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 AddressSubnet maskSubnet notation
192.168.0.3255.255.255.0192.168.0.3/24
192.168.1.233255.255.0.0192.168.1.233/16
172.16.10.3255.255.255.0172.16.10.3/24
172.16.10.3255.255.0.0172.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.

Networking Day 1: Intro

A home network can allow multiple computers to share files, a printer, as well as an internet connection. For the most part they are fairly simple to setup. This series of posts will help you setup your home network and understand what is happening within the network.

This post covers the basics of networking. If you know what IP addresses and DHCP are, you can skip to the next post.

Here are the simple facts:

  • A network is two or more computers connected together.
  • Each computer on the network is assigned a unique address.
  • The internet is one huge network consisting of many smaller networks.
  • Almost all modern networks, including the internet, use the TCP/IP protocol.

This guide’s networks will use the TCP/IP protocol.

IP Addresses
Using TCP/IP, each computer’s unique address is an IP address. An IP address looks like 192.168.0.145. It’s just 4 sets of numbers separated by a period. These numbers range from 0 to 255. You can set the IP address for a computer manually. This is call a static IP.

DHCP
A dynamic IP address is one that is assigned via a DHCP server. The DHCP server takes care to make each IP address unique. Most, if not all, routers, cable modems and DSL modems have a DHCP server built into them.

Wired vs. Wireless
On a wired network, every computer is connected via a cable to a cental point. On a wireless network, every computer is connected wirelessly to an access point. A hybrid network is when some computers are connected via a cable and others are connected wirelessly.

You are the architect
When designing a network, you are the architect. You have complete control over every bit of data that travels over your network.

Home Networks

Now that high speed internet is the norm, more and more people have a home network. A home network is nothing but 2 or more computers connected together via a router. There is more to it than this, but it all boils down to being that simple. To see how it works, let’s trace the internet connection.

If you have cable internet, the signals come into your house over the cable lines. The cable modem converts these signals into an ethernet (looks like a wide phone jack) connection.

If you have DSL internet, the signals come into your house over the phone lines. The DSL modem converts these signals into an ethernet (looks like a wide phone jack) connection.

From the ethernet connection, the internet travels to your router. The router does several important things. It acts as a firewall, blocking people on the internet from accessing your home network. It provides any computer directly connect with a unique IP address which helps the router know what computer is sending/receiving data from the interent.

An IP address is a set of 4 numbers, each 0-255, which identifies a computer on a network. The router uses something called a subnet which is just a group of IP addresses. Most routers use the subnet 192.168.0, which includes all the addresses from 192.168.0.1 to 192.168.0.254. The router is the 192.168.0.1. These addresses might not be the same as your router is using because every router is different.

Because the router has a firewall, you don’t need a firewall on any computer connected to the router, wired or wireless. That means that Windows won’t have to work as hard to protect your computer because you can turn Windows’ firewall off.

A home network isn’t limited to only having computers. A printer can be connected to the network instead of to a computer. After installing the printer software to a computer connected to the network, you can print from another room! A VOIP (Voice Over IP) phone, such as ViaTalk or Vonage, can be connected to the router as well. The list doesn’t stop there either.