Route summarisation

When a router or AS is advertising several contiguous routes, then instead of announcing all routes, an AS can send one summary route only.
In this example, 3 prefixes are advertised by AS100. These can be summarised and announced as a single prefix, 172.16.0.0/22.

  • BGP summarisation

Summarisation method

One way to summarise prefixes is to:

  1. Convert them from decimal to binary.
  2. Select all common bits, they all have. In our example, all first 22 bits are common.
  3. Using common bits, extract network address, 172.16.0.0 in our case.
  4. We are left with 10 bits for hosts.
  • Summarisation method

Benefits of summarising

  • Reduce routing table size, therefore saving nodes resources.

  • Flaps of smaller prefixes are hidden behind summary route, therefore the internet will be more stable.

Configuring summarisation

There are 2 methods to summarise in BGP.

  1. Redistribute a static route. This summary will be announced even if there are no smaller prefixes are not available.
  2. Aggregate command. Summary is only advertised when there is one or more smaller prefixes in BGP table.

On R1, we create loopbacks10, 20 and 30 to simulate the 3 different networks. Then advertise them in BGP using the network command, as seen in BGP fundamentals.

Copy to Clipboard
Copy to Clipboard

We add our 3 loopbacks interfaces on R1 and announced them using network statements. On R2, we can see the 3 prefixes received as intended.

Copy to Clipboard
Copy to Clipboard

Redistribute static

Let’s start with the 1st method and add a static route for  172.16.0.0/22 to null 0, then redistribute static to BGP. On R2, we can see a new summary prefix 172.16.0.0/22.

Copy to Clipboard
Copy to Clipboard

Aggregate command

We roll back and remove static redistribution, and instead use the aggregate command. R2, will still have a summary prefix 172.16.0.0/22.

Copy to Clipboard
Copy to Clipboard

What is the point of advertising an aggregated prefix, if the smaller subnet are still received on R2, Wouldn’t be be better to only announce 172.16.0.0/22 and save R2 resources by reducing R2 routing table size ?

To achieve this, we add “summary-only” to the aggregate command.

Copy to Clipboard
Copy to Clipboard

What is the point of advertising an aggregated prefix, if the smaller subnet are still received on R2, Wouldn’t be be better to only announce 172.16.0.0/22 and save R2 resources by reducing R2 routing table size ?

To achieve this, we add “summary-only” to the aggregate command. When added, R2 receives a single summarised prefix.

There is a lot more to aggregating prefixes, and how route-maps can suppress as set of prefixes and allow others. Another important point is how AS path is presented when the aggregated prefix is originally advertised from a remote AS.