By submitting my Email address I confirm that I have read and accepted the Terms of Use and Declaration of Consent.

By submitting your personal information, you agree to receive emails regarding relevant products and special offers from TechTarget and its partners. You also agree that your personal information may be transferred and processed in the United States, and that you have read and agree to the Terms of Use and the Privacy Policy.

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

1.0.0.0 to 127.255.255.255

255.0.0.0

B

128.0.0.0 to 191.255.255.255

255.255.0.0

C

192.0.0.0 to 223.255.255.255

255.255.255.0

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 192.168.1.1 but didn't tell you the subnet mask, it would be safe to assume that your subnet mask is 255.255.255.0 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 1.1.1.1 with a subnet mask of 255.255.255.240. Or you may have an IP address of 192.192.192.192 with a subnet mask of 255.0.0.0. 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 1.1.1.1 and your subnet mask is 255.255.255.0, and you make a Web request to 1.1.2.1. Because of your subnet mask, your local area network is the 1.1.1.0 network. Meaning anything that is 1.1.1.1 through 254 is on your local network. Because you are requesting 1.1.2.1, which is not on your local network, that packet would be sent to your default gateway.