Skip to main content

IP Subnetting - Part 2: Subnet Masks & Their Effect

There are a few different ways to approach subnetting and it can get confusing because of the complexity of some subnets and the flexibility they offer. For this reason I created this little paragraph to let you know how we are going to approach and learn subnetting. So.....

We are going to analyse the common subnet masks for each Class, giving detailed examples for most of them and allowing you to "see" how everything is calculated and understand the different effects a subnet mask can have as you change it. Once you have mastered this, you can then go on and create your custom subnet masks using any type of Class.

Default Subnet masks of each Class

By now you should have some idea what the subnet mask does and how it's used to partition a network. What you need to keep in mind is that each Class has its DEFAULT subnet mask, which we can change to suit our needs. I have already mentioned this in the previous page, but we need to look into it in a bit more detail.

The picture below shows our 3 Network Classes with their respective default subnet mask:

ip-subnetting-mask-effect-1

The Effect of a Subnet Mask on an IP Address

In the IP Classes page we analysed and showed clearly how an IP Address consists of two sections:

1) The Network ID 

2) The Host ID

This rule applies for all IP Addresses that use the default subnet mask and we call them Classful IP Addresses.

We can see this once again in the picture below, where the IP Address is analysed in Binary, because this is the way you should work when dealing with subnet masks:

ip-subnetting-mask-effect-2

We are looking at an IP Address with its subnet mask for the first time. What we have done is take the decimal subnet mask and converted it to binary, along with the IP Address. It is essential to work in binary because it makes things clearer and we can avoid making silly mistakes. The ones (1) in the subnet mask "lock" or, if you like, define the Network ID portion. If we change any bit within the Network ID of the IP Address, then we immediately move to a different network. So in this example, we have a 24 bit subnet mask.

NOTE:

  • All Class C Classful IP Addresses have a 24 bit subnet mask (255.255.255.0).
  • All Class B Classful IP Addresses have a 16 bit subnet mask (255.255.0.0).
  • All Class A Classful IP Addresses have an 8 bit subnet mask (255.0.0.0).

On the other hand, the use of an IP Address with a subnet mask other than the default results in the standard Host bits (the Bits used to indentify the HOST ID) being divided in to two parts: a Subnet ID and Host ID. These type of IP Addresses are called Classless IP Addresses.

In order to understand what a "Classless IP Address" is without getting confused, we are going to take the same IP Address as above, and make it a Classless IP Address by changing the default subnet mask:

ip-subnetting-mask-effect-3

Looking at the picture above you will now notice that we have a Subnet ID, something that didn't exist before. As the picture explains, we have borrowed 3 bits from the Host ID and used them to create a Subnet ID. Effectively we partitioned our Class C network into smaller networks.

If you're wondering how many smaller networks, you'll find the answer on the next page. I prefer that you understanding everything here rather than blasting you with more Subnet ID's, bits and all the rest :)

Summary

In this page we saw the default subnet mask of each Class and also introduced the Classful and Classless IP Addresses, which are a result of using various subnet masks.

When we use IP Addresses with their default subnet masks, e.g 192.168.0.10 is a Class C IP Address so the default subnet mask would be 255.255.255.0, then these are "Classful IP Addresses".

On the other hand, Classless IP Addresses have their subnet mask modified in a way so that there is a "Subnet ID". This Subnet ID is created by borrowing Bits from the Host ID portion.

The picture below shows us both examples:

ip-subnetting-mask-effect-4

We hope you have understood the new concepts and material on this page. Next we are going to talk about subnet bits, learn how to calculate how many bits certain subnet masks are and see the different and most used subnet masks available.

Next -IP Subnetting - Part 3: Subnet Mask Bits & Analysis

  • Hits: 94009

IP Subnetting - Part 1: The Basic Concepts

When we subnet a network, we basically split it into smaller networks. For example, when a set of IP Addresses is given to a company, e.g 254 they might want to "break" (the correct term is "partition") that one network into smaller ones, one for each department. This way, their Technical department and Management department can each have a small network of their own. By subnetting the network we can partition it to as many smaller networks as we need and this also helps reduce traffic and hides the complexity of the network.

By default, all type of Classes (A, B and C) have a subnet mask, we call it the "Default Subnet mask". You need to have one because:

1) All computers need the subnet mask field filled when configuring IP

2) You need to set some logical boundaries in your network

3) You should at least enter the default subnet mask for the Class you're using

In the previous pages I spoke about IP Classes, Network IDs and Host IDs, the fact is that the Subnet mask is what determines the Network ID and Host ID portion of an IP Address.

The table below shows clearly the subnetmask that applies for each network Class.

ip-subnetting-basic-concepts-1

When dealing with subnet masks in the real world, we are free in most cases to use any type of subnet mask in order to meet our needs. If for example we require one network which can contain up to 254 computers, then a Class C network with its default subnet mask will do fine, but if we need more, then we might consider a Class B network with its default subnet mask.

Note that the default subnet masks have been set by the IEEE committee, the same guys that set and approve the different standards and protocols.

We will have a closer look at this later on and see how we can achieve a Class C network with more than 254 hosts.

Understanding the Subnetting Concept

Let's stop here for one moment and have a look at what I mean by partitioning one network into smaller ones by using different subnet masks.

The picture below shows our example network (192.168.0.0). All computers here have been configured with the default Class C subnet mask (255.255.255.0):

ip-subnetting-basic-concepts-2

Because of the subnet mask we used, all these computers are part of the one network marked in blue. This also means that any one of these hosts (computers, router and server) can communicate with each other.

If we now wanted to partition this network into smaller segments, then we would need to change the subnet mask appropriately so we can get the desired result. Let's say we needed to change the subnet mask from 255.255.255.0 to 255.255.255.224 on each configured host.

The picture below shows us how the computers will see the network once the subnet mask has changed:

ip-subnetting-basic-concepts-3

In reality, we have just created 8 networks from the one large (blue) network we had, but I am keeping things simple for now and showing only 2 of these smaller networks because I want you to understand the concept of subnetting and see how important the subnet mask is.

In the next pages which are to follow I will analyse in great depth the way subnetting works and how to calculate it. It is very important that you understand the concepts introduced in this section, so make sure you do, before continuing !

Next -IP Subnetting - Part 2: Subnet masks and their effect

 

  • Hits: 103954

The Supernetting / CIDR Chart

This articles build upon our previous pages covering  what is Supernetting (Route Summarization) & How Supernets Work and Supernetting In-Depth Analysis - Learn to Identify and Create Supernets.

The Supernet CIDR (Classless Inter-Domain Routing) chart serves as a reference tool that aids network administrators in understanding and implementing supernetting. It provides a systematic overview of supernetting and its associated CIDR notation, facilitating the calculation and identification of supernet addresses.

Below is our Supernetting/CIDR chart consisting of four columns: CIDR Block, Supernet Mask, Number of Class C Networks and the Number of Hosts:

Class C
CIDR Block
Supernet Mask
Number of Class C Networks
Number of Hosts
/14
255.252.0.0
1024
262144
/15
255.254.0.0
512
131072
/16
255.255.0.0
256
65536
/17
255.255.128.0
128
32768
/18
255.255.192.0
64
16384
/19
255.255.224.0
32
8192
/20
255.255.240.0
16
4096
/21
255.255.248.0
8
2048
/22
255.255.252.0
4
1024
/23
255.255.254.0
2
512
/24
255.255.255.0
1
254
/25
255.255.255.128
1/2
126
/26
255.255.255.192
1/4
62
/27
255.255.255.224
1/8
32
/28
255.255.255.240
1/16
16
/29
255.255.255.248
1/32
8
/30
255.255.255.252
1/64
4

Note: Green coloured entries represent supernetting, blue is the default Class C network and yellow entries represent subnetting.

Supernetting requires solid understanding of IP, subnetting and binary notation. Read through these sections if in doubt.

The CIDR Block

The CIDR Block simply represents the number of bits used for the subnet mask. For example, /14 means 14 bits assigned to the subnet mask.

We should also take note at the CIDR Block entries /24, and /25 to /30. These blocks are highlighted in blue and yellow.

When we use a CIDR Block of 24 (24 bit subnet mask) we are not Supernetting because this is a default subnet mask for a Class C network. With CIDR Blocks /25 to /30 we are actually subnetting and not Supernetting.

CIDR blocks of /30 (4 IP addresses of which 2 are usable) are often assigned by ISPs to their customers and used to assigned their only two valid IP addresses to the equipment between the ISP and customer (usually routers or firewalls).

The Supernet Mask

Basically, this is your subnet mask. When you configure the devices that will be attached to the specified network, this is the value you will enter as a subnet mask. It's also the decimal value the CIDR Block specifies. For example, a CIDR block of /24 means a 24bit subnet mask, which translates to 255.255.255.0.

To understand the coversion of binary bits to decimal numbers, read our article How Supernets Work.

Number of Class C Networks

This number shows us how many Class C Networks are combined by using a specific Supernet mask or, if you like, CIDR Block. For example, the /24 CIDR Block, 255.255.255.0 Supernet mask is 1 Class C Network, whereas a /20 CIDR Block, 255.255.240.0 Supernet mask is 16 Class C networks.

Number Of Hosts

This value represents the number of hosts per Supernet. For example, when we use a /20 CIDR Block, which means a Subnet (or Supernet) mask of 255.255.240.0, we can have up to 4096 hosts.

Keep in mnd that the value of 4096 does not represent the number of valid (or usable) IP addresses. To calculate the number of valid IP addresses, you'll need to subtract two IPs (network & broadcast IP): 4096-2 =4094.

Summary

That completes our discussion on the Supernetting/CIDR chart. You will see that Supernetting and Subnetting have quite a few things in common, and this is simply because they work on the same principle.

Again, if you have the whole topic, or certain sections hard to understand, you should give yourself a small break, and then come back for another round :)

  • Hits: 143756