Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Example: Summarizing Static Routes Through Route Aggregation


This example shows how to summarize routes by configuring aggregate routes.


No special configuration beyond device initialization is required before configuring this example.


In this example, Device R1 is connected to customer networks and For demonstration purposes, these routes are represented in this example as loopback interfaces on Device R1.

Device R2 has static routes configured to reach Device R1’s customer networks. Device R2 also has a routing policy configured to advertise all static routes to its neighbors in autonomous system (AS) 65001.

Device R3 is in AS 65001 and receives the static routes from Device R2. When Device R3 sends information about these routes to Device ISP, the information is summarized as a single aggregate route. The aggregate route is

Device ISP injects a default route into AS 65001, and Device R3 advertises the default route.

This example shows the configuration for all of the devices and the step-by-step configuration on Device R3.

Figure 1 shows the sample network.

Figure 1: Aggregate Route Advertised to an ISP
Aggregate Route Advertised
to an ISP


CLI Quick Configuration

To quickly configure this example, copy the following commands, paste them into a text file, remove any line breaks, change any details necessary to match your network configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy level.

Device R1

Device R2

Device R3

Device ISP

Step-by-Step Procedure

The following example requires you to navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the CLI User Guide.

To configure Device R3:

  1. Configure the interfaces.
  2. Configure the AS number.

  3. Configure the BGP session with the ISP device.
  4. Configure the BGP session with Device R2.
  5. Configure OSPF.

  6. Configure the aggregate route.

  7. Configure the routing policy to advertise the aggregate route.

    The first term in this policy advertises the aggregate route. The second term prevents more specific routes from being advertised.

  8. Apply the aggregate route policy to the external BGP session with Device ISP.

  9. Configure the routing policy to advertise the default route from Device ISP.

  10. Apply the default routing policy to OSPF.

  11. If you are done configuring the device, commit the configuration.


Confirm your configuration by issuing the show interfaces, show protocols, show policy-options, and show routing-options commands. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration.


Confirm that the configuration is working properly.

Verifying That Device R3 Has the Expected Routes


Make sure that Device R3 has the specific static routes.


user@R3>show route terse protocol bgp


The output shows that Device R3 has the specific routes to the and networks.

Verifying That Device R3 Advertises the Aggregate Route to Device ISP


Make sure that Device R3 does not send the specific static routes and only sends the summarized aggregate route.


user@R3>show route advertising-protocol bgp


The output shows that Device R3 sends only the summarized route to Device ISP.

Related Documentation