Everything you ever wanted to know about IP addresses and subnetting

Most network administrators have learned about IP addressing and subnetting at one time or another. However, just like a foreign language, if you don't use it, you will quickly forget it. In this article, we provide an overview of what network administrators need to know about IP addressing and subnetting.

1. What do you need to know about addresses?

You probably know what an IP address is: a number that identifies that device on the network. But what else do you need to know? IP addresses are made up of 32 bits (IPv4 addresses, that is). We normally think of an IP address as something like, but really this can be translated into eight binary bits. Each set of binary bits can represent only the numbers zero through 255. That is why your IP addresses can range only from to

By the way, the IP address is called the &quotall ones" network because in binary it is represented by 32 numeral ones (1s). The all ones address is used to send a packet to all devices on all networks (as long as it isn''''t stopped by a router first).

Traditionally, IP addresses were broken up into classes, but those classes aren''''t used much any more unless you are taking a certification exam. We will learn more about classes below.

Most importantly, IP addresses must be unique on your network. If two devices have the exact same IP address, you have an IP address conflict. When that happens, either device or both devices will not work on the network. Commonly, is used to dynamically allocate IP addresses in hopes of preventing address duplication and easing the administrative burden of static IP addressing.

2. What is a subnet mask?

A subnet mask is what tells your computer (or other network device) what portion of the IP address is used to represent your network and what part is used to represent hosts (other computers) on your network. For example, if you have an IP address of and a subnet mask of, the 255s mask off the first three 1s. If you did the logical &quotAND" (the calculation your computer does -- see, you would find out that the network ID for this network is Where the 0 is located, you could fill in hosts numbered 1 to 254. For example, the first host on your network is and the last host is

Of special note when looking at the number of hosts in a network is this: The first IP address in a network is the network address and the last IP address is always the broadcast address. That''''s why I couldn''''t use IP address and IP address These are special, reserved addresses, but some computers will allow you to use the network address as a real computer address.

&quotSubnetting" is breaking up a single network into smaller networks. To do this, you add more bits (more numbers) to the subnet mask. Traditionally, we are used to seeing subnet masks that look like,, or However, a subnet mask might also look like or In both of these cases, it is obvious that the network has been subnetted to break a single network into smaller networks.

Tomorrow: Classless vs. Classful IP addressing

Read more on Data centre networking