header banner

Our funding comes from our readers, and we may earn a commission if you make a purchase through the links on our website.

Supernetting – A Full Introduction with Examples and Tutorial for Supernets!

supernets – A tutorial on how supernetting works and examples

Marc Wilson UPDATED: February 6, 2023

Most people in the networking field are familiar with Subnetting – the process of breaking down a larger network into smaller networks (subnets). This is because Subnetting is one of those topics that can be difficult to understand and also comes up frequently in many Networking certification exams.

However, there is a less familiar twin sister called Supernetting which is just the opposite – combining/aggregating networks together to form a larger network.

In this article, we will be discussing Supernetting, why it is useful, and how to perform supernetting correctly. We will take examples and also see a case study on how supernetting affects the routing table on routers.

Note: There are several names for aggregating networks together including Supernetting, Route Aggregation, Summarization, and so on. While there may be some minor differences technically speaking, we will keep it simple and just consider them all as the same thing.

Supernetting

What is Supernetting?

Supernetting is about aggregating networks together to form a larger network (a super network or supernet).

Let’s consider the basic definition of an IP address (network): it consists of the network portion and the Host ID. For subnetting, we “borrow” bits from the Host ID to create smaller networks. On the other hand, for supernetting, we take bits from the Network portion to create bigger networks.

Warning: The diagram above is just for explanation purposes, comparing subnetting and supernetting. While Subnetting works on one network (and splits it down), Supernetting combines multiple networks into one versus the image that seems to suggest that it works on a single network.

Supernetting is mostly used in relation to route advertisement, but it also has other uses like when creating access control lists (ACLs), combining multiple static routes into one, and so on.

Why Supernetting?

The main purpose of supernetting is reducing the size of the routing table on routers. For example, instead of a router having 8 individual routes (pointing to the same next hop), it can have an aggregated route of these 8 individual routes. This is important for several reasons:

  1. It saves memory and processing resources on routing devices. Basically, they need less space to store their routing table and less processing power to search through the routing table.
  2. It provides stability on the network because fluctuations in one part of the network are not propagated to all parts of the network i.e. fluctuations can be isolated.

Apart from the benefits to the routing table, it also helped slow down the exhaustion of IP addresses through the use of Classless Inter-Domain Routing (CIDR). Basically, instead of handing out a Class B network to everyone that needed more than one Class C network, these Class C networks could now be aggregated together as efficiently as possible using variable length prefixes (e.g. /19, /21, etc.).

Finally, you can use supernetting to increase the number of available addresses on a network. For example, you can aggregate four /24 networks (254 usable IP addresses each) to create one /22 network (with 1022 usable IP addresses).

Supernetting Rules

Just like subnetting, supernetting is about counting in orders of 2 i.e. 2, 4, 8, 16, etc. When you create a supernet, you need to ensure that it covers only the networks you want to aggregate and not more. In fact, less is better so as to avoid routing issues which we will discuss in a later section.

The rules to create supernets are as follows:

  • Make sure the networks are contiguous (defined as “next or together in sequence”).
  • Determine the number of networks to be aggregated and ensure that this number is an order of 2.
  • Compare the value of the first non-common octet in the first (lowest) IP address block in the list of networks to be aggregated to the number of networks to be aggregated (which is also an order of 2). The value of the first non-common octet must be:
    • Zero (0), or
    • A multiple of the number of networks to be aggregated. For example, 16 is a multiple of 8 but 8 is not a multiple of 16.

Let’s take examples to explain these rules in detail. Consider the following lists of networks to be aggregated:

List 1 List 2 List 3 List 4 List 5
192.168.0.0/24 192.168.1.0/24 192.168.0.0/24 192.168.0.0/24 10.4.0.0/16
192.168.1.0/24 192.168.2.0/24 192.168.1.0/24 192.168.1.0/24 10.5.0.0/16
192.168.2.0/24 192.168.2.0/24 10.6.0.0/16
192.168.4.0/24 10.7.0.0/16

We will apply the rules to each list and if any one of the rules is broken, then we cannot create one supernet for all those networks without causing some issues.

Rule #1: Contiguous networks

  • The networks in List 1 are contiguous because the next subnet after 192.168.0.0/24 is 192.168.1.0/24. Qualifies for next round.
  • The networks in List 2 are contiguous because the next subnet after 192.168.1.0/24 is 192.168.2.0/24. Qualifies for next round.
  • The networks in List 3 are contiguous because the next subnet after 192.168.0.0/24 is 192.168.1.0/24 and after that is 192.168.2.0/24. Qualifies for next round.
  • The networks in List 4 are not contiguous because the next subnet after 192.168.2.0/24 is 192.168.3.0/24, not 192.168.4.0/24. Does not qualify for next round.
  • The networks in List 5 are contiguous. Qualifies for next round.

Rule #2: Number of networks order of 2

  • There are two networks to be aggregated in List 1 which is an order of 2. Qualifies for next round.
  • There are two networks to be aggregated in List 2 which is an order of 2. Qualifies for next round.
  • There are three networks to be aggregated in List 3 which is not an order of 2. Does not qualify for next round.
  • There are four networks to be aggregated in List 5 which is an order of 2. Qualifies for next round.

Rule #3: Value of non-common octet in first IP block is zero or a multiple of the number of networks to be aggregated

Note: This rule is dependent on the previous rule being met. For example, even though 3 is a multiple of 6, 6 is not an order of 2.

  • The first non-common octet in List 1 is the 3rd octet i.e. 0 vs. 1. The first (lowest) IP address block is 192.168.0.0/24. The decimal value of the 3rd octet in this address block is 0. Qualifies to be aggregated.
  • The first non-common octet in List 2 is the 3rd octet i.e. 1 vs. 2. The first (lowest) IP address block is 192.168.1.0/24. The decimal value of the 3rd octet in this address block is 1. This value is not zero or a multiple of the number of networks to aggregated (2). Does not qualify to be aggregated.
  • The first non-common octet in List 5 is the 2nd octet i.e. 4 vs. 5 vs. 6 vs. 7. The first (lowest) IP address block is 10.4.0.0/16. The decimal value of the 2nd octet in this address block is 4. This value is a multiple of the number of networks to aggregated (4). Qualifies to be aggregated.

Therefore, only Lists 1 and 5 can be aggregated into one supernet without causing any issues.

How-To: Supernetting

Once you have gone through the rules of supernetting above, you can now aggregate the networks by determining which of their bits are common and making all other bits from that point 0.

For example, let’s consider our List 1 above made up of 192.168.0.0/24 and 192.168.1.0/24:

These two networks are the same all the way to the 23rd block (counting from the left side starting at 1). The 24th block is where the difference is (highlighted in orange). Therefore, the subnet mask of the new supernet will be 1 all the way to the 23rd block and then 0 from there:

Finally, the supernet will be the first IP block in the list (192.168.0.0) with the new subnet mask i.e. 192.168.0.0 255.255.254.0 or 192.168.0.0/23.

Note: We usually count binary from right to left, starting at 0. However, we humans are used to counting from left to right, starting at 1 and that’s why I have used that analogy here.

Let’s try another one. The networks in List 5 above are: 10.4.0.0/16, 10.5.0.0/16, 10.6.0.0/16, 10.7.0.0/16. These networks are the same up to the 14th bit. Therefore, the supernet is 10.4.0.0 255.252.0.0 or 10.4.0.0/14:

Note: We have considered scenarios where the block size of the networks to be summarized are all the same. In some cases (like exam questions), this may not be so. However, the same rules apply.

Should the rules be broken?

The reason we have the rules above is because supernetting can result in routing issues where a router is advertising a route it doesn’t have access to, as part of the aggregated route. For example, suppose a router has the following routes:

  • 172.16.2.0/24
  • 172.16.3.0/24
  • 172.16.4.0/24
  • 172.16.5.0/24

Summarizing these networks as a single aggregate route of 172.16.0.0/21 means that the router is advertising these networks along with the following unlisted networks: 172.16.0.0/24, 172.16.1.0/24, 172.16.6.0/24, 172.16.7.0/24.

In most cases, this is not acceptable as you are over-summarizing. The better solution will be to use two aggregate routes of 172.16.2.0/23 and 172.16.4.0/23.

However, this over-summarization is fine in some networks. For example, an ISP that has been assigned the 191.236.0.0/20 address block should only advertise this aggregated route to its upstream peers even if it hasn’t used up all the individual sub-blocks in that address block. To avoid routing issues, the ISP can create null routes to those unassigned networks so that even if traffic is sent to those networks, it will be dropped.

Case Study: Supernetting on Cisco IOS Router

Let’s see how supernetting helps to reduce the size of the routing table and also provide stability on a network.

Consider the network below. EIGRP is running on all routers:

Without aggregation

Looking at the routing table of R1, we can see those 192.168.x.0/24 networks being advertised by R2:

R3 also knows about these networks through R1:

Now, if anything happens to any one of those networks, both R1 and R3 will hear about this update. To see this, I’ll enable EIGRP debugging on R1 and R3:

Now, let’s shut down one of the 192.168.x.0/24 networks on R2:

Looking at R1 and R3, we see that they “heard” about this change on the network:

With aggregation

Let’s now aggregate all those 192.168.x.0/24 networks into one 192.168.0.0/22 route on R2. We will configure R2 to advertise only this aggregated route to R1:

The first change we will notice is the routing tables of R1 and R3:

Next, any change that happens on R2 for those aggregated networks will only be advertised to routers that are direct neighbors of R2 i.e. only R1.

Basically, we have reduced the size of the routing table and isolated fluctuations to the aggregation point + 1, making the network less noisy and more stable.

Conclusion

This brings us to the end of this article where we have looked at supernetting – aggregating multiple networks into one. We highlighted some reasons to use supernetting and also the described rules to follow to create supernets properly. Finally, we discussed when the rules may be broken and also saw the effect of supernetting on a Cisco router.

As a final note, to make the most of supernetting, you must use routing protocols like EIGRP, OSPF, and BGP that support classless route advertisements. A routing protocol like RIPv1 which is classful cannot be used effectively with supernetting.

Supernetting FAQs

What is supernetting?

Supernetting, also known as CIDR (Classless Inter-Domain Routing), is a method of allocating IP addresses and routing Internet Protocol packets.

How does supernetting work?

Supernetting works by using variable-length subnet masks to create subnets of different sizes, reducing the waste of IP addresses.

Why is supernetting used?

Supernetting is used to conserve the use of IP addresses and reduce the size of routing tables.

What is the difference between supernetting and traditional subnetting?

Traditional subnetting uses fixed-length subnet masks, while supernetting uses variable-length subnet masks.

How does supernetting impact routing tables?

Supernetting reduces the size of routing tables by aggregating multiple subnets into a single entry.

What is the notation used in CIDR?

The notation used in CIDR is the IP address followed by a slash (/) and the number of bits used for the subnet mask, for example, 192.168.0.0/24.

How does CIDR affect IP address assignment?

CIDR affects IP address assignment by allowing ISPs to allocate IP addresses in smaller blocks, reducing the waste of IP addresses.

Can supernetting be used with IPv6?

Yes, supernetting can be used with IPv6, but it is not necessary because IPv6 has a larger address space.

footer banner