IP addresses and subnets part two - being classy

Part two of our guide to IP addresses and subnets explores classless and classful IP addressing.

3. What is the difference between "classful" and "classless" IP addressing?

When the concept of IP addressing was first thought up, it was decided that IP addresses would be put into classes. These classes are:

Class IP address range Default subnet mask
A to
B to
C to

Today, these default subnet masks aren't much used except as a point of reference and trivia. For example, if I said that your IP address was but didn't tell you the subnet mask, it would be safe to assume that your subnet mask is because that IP address falls into the Class C range. This is also important when you take some certification tests.

In real life, an IP address today could have any legal subnet mask. For example, you may have an IP address of with a subnet mask of Or you may have an IP address of with a subnet mask of Sometimes, people will say things like "I need an entire Class C block of addresses." This just means that they want 254 contiguous and usable IP addresses.

The term "classful" means that the IP address or software is assuming that IP addresses fall into these classes and uses the default subnet mask shown. If a routing protocol, like RIP, is classful, it has trouble with the IP addresses that don't use the default subnet masks.

On the other hand, a "classless" routing protocol, like RIP version 2, doesn't assume that IP addresses have their default subnet masks. Today, you should assume that all network devices are classless unless you find that they are not (like routing protocols RIP or IGRP, or a very old computer operating system).

4. What is a default gateway?

Contrary to popular belief, a default gateway is not a required piece of IP address configuration on any computer. However, if you want to access devices outside of your local network (such as devices on the Internet), a default gateway is required.

A default gateway is where a computer sends requests to IP addresses that are not on its local network. How does the computer know what is and what is not on its local network? As discussed above, the subnet mask is what the computer uses to know what is and what is not on its local network. Say, for example, your IP address is and your subnet mask is, and you make a Web request to Because of your subnet mask, your local area network is the network. Meaning anything that is through 254 is on your local network. Because you are requesting, which is not on your local network, that packet would be sent to your default gateway.

Tomorrow: Private IP addresses

Read more on Data centre networking