Subnetting and supernetting are two processes that are applied to IPv4 address spaces. Each one serves a different purpose and can be used in various applications.
In this article, we’ll examine and compare Subnetting vs Supernetting in IP networks and see how they are applied to various aspects of network design and configuration.
Structure of an IP address
IPv4 subnets are defined by an address and a subnet mask. Each 32-bit address can belong to an address space of various sizes.
The size of the address space is defined by the subnet mask, which essentially separates the IP address into the network portion and the host portion.
The following diagram illustrates how a 32-bit address is divided into these two sections:
Various sizes of subnet masks, depicted here in the /XX format
The subnet mask of an address essentially tells a device how large the address space it belongs to is. For example, a host with an IP address and subnet mask combination of 192.168.5.3 255.255.255.128 means that the size of the host’s subnet ranges from 192.168.5.0 to 192.168.5.127.
All the addresses within that range are considered to be on the same subnet as that of the host itself.
This is useful because it allows a host to know if a destination address of a particular packet it wants to send is in the same subnet, in which case it sends it directly to the destination, or in a different subnet, in which case it sends the packet to the default gateway.
Now keeping this structure in mind, there are times when we are given a particular IP address space, and we must separate it into smaller subnets.
There are also situations where we must take multiple subnets and consolidate them by representing them all with a single address space.
These two processes are called subnetting and supernetting respectively, and we’ll explain how each one is achieved. We will also take a look at where these processes are most commonly used in networking.
Subnetting
Subnetting is the process by which we take a particular address space, defined by an IP address and subnet mask combination, and we break it down into multiple subnets.
For example, let’s say we are given the address space defined by 10.10.8.0 255.255.254.0. This can also be represented like this: 10.10.8.0 /23.
Now let’s also assume that we are asked to subnet this network into four equal sized subnets. How would we do this?
Well, let’s first take a look at our address space. 10.10.8.0/23 has an IP address range from 10.10.8.0 to 10.10.9.255, with a total of 512 addresses.
We want to subnet this into four networks of 128 addresses each. We can do this by moving the boundary between the network and host portion over by two bits. The following diagram describes this:
Subnetting a /23 network into four /25 networks
Notice that the host portion in red now has a size of 7 bits, which can represent numbers from 0 to 127, which means the size of the subnet is indeed 128.
Notice also that the network portion has increased to 25 bits, and the red bits are different for each of the four subnets.
If we convert the binary numbers above to dotted decimal format, the result is four subnets defined by:
- 10.10.8.0/25 ranging from 10.10.8.0 to 10.10.8.127
- 10.10.8.128/25 ranging from 10.10.8.128 to 10.10.8.255
- 10.10.9.0/25 ranging from 10.10.9.0 to 10.10.9.127
- 10.10.9.128/25 ranging from 10.10.9.128 to 10.10.9.255
Supernetting
Supernetting, simply put, is the opposite of subnetting. Subernetting involves referencing multiple subnets using a single network statement. To use the above example, if you were given the following four subnets, how would you define them using a single network?
- 10.10.8.0/25
- 10.10.8.128/25
- 10.10.9.0/25
- 10.10.9.128/25
The answer, of course, is 10.10.8.0/23, but we know this because we just did the subnetting process. Similarly, we can ask, what is the supernet of the following address spaces?
- 192.168.0.0/24
- 192.168.1.0/24
- 192.168.2.0/24
- 192.168.3.0/24
Let’s take a look at these addresses in binary form and how we can achieve the supernetting process:
Notice that for all four address spaces, it is only the last two bits of the network portion that change. Therefore, we can move the prefix two spaces to the left, that is from /24 to /22 to achieve the supernet. This results in a /22 network using the binary numbers above.
This translates to 192.168.0.0/22, so this is the supernet that includes all four network address spaces.
Differences between supernetting and subnetting
The following table describes the main differences between these two processes:
Subnetting | Supernetting | |
1 | Divides larger networks into smaller ones | Combines smaller networks into larger ones |
2 | The network portion or prefix number is increased | The network portion or prefix number is decreased |
3 | The host portion size is decreased | The host portion size is increased |
4 | The boundary between network and host is moved to the right | The boundary between network and host is moved to the left |
Usage
Subnetting is primarily used to separate a network into smaller subnets.
Typically, an enterprise network is provided with a large address space. Administrators are called upon to split that address space into smaller subnets that typically correspond to VLANs.
By dividing an extensive network into smaller subnets, we can make a network more efficient, apply access lists between subnets for security, and employ routing for a hierarchical network structure.
Supernetting is typically used by routing protocols to summarize multiple network destinations into fewer routing table entries, making routing more efficient.
This can be applied manually by a network administrator or can be configured to be achieved automatically using a dynamic routing protocol.
IPv6
Because IPv6 also has the concepts of network address spaces and prefixes, theoretically, the idea of subnetting and supernetting can also be applied to IPv6.
This is the case for routing as well as for creating separate subnets within an enterprise network. However, due to the vast address space provided by IPv6, the process is much more flexible.
Supernetting and subnetting can take place at the natural boundaries of the IPv6 address (at the colons) for much easier calculations. For more information on IPv6, take a look at this article.
Conclusion
Subnetting and supernetting are concepts and processes that are used in various aspects of networking. Some of these processes are manual, as is the case when designing the address space of an enterprise network, and some are automatic, such as route summarization of a dynamic routing protocol.
Understanding these processes is important in understanding how a network is designed, and how it responds to various changes in topology and configuration.
Related Posts
- Comparison of Fiber Optic vs Copper Ethernet Cables in Networking
- Understanding IP Prefix Lists in TCP/IP Networks (With Cisco Examples)
- The Purpose of Routing Protocols in TCP/IP Networking
- What is a Wildcard Mask – All About Wildcard Masks Used in Networking
- Differences Between Routing, Forwarding, Switching in Networks