Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to shorten internet full bgp table (450K records) in such a way to catch all prefixes from /0 to /21 as well as all prefixes of /22 or more which are not included within /0 - /21 prefix range.

Example 1:

In this case we want to match only the first one (, other two (, need to be rejected since they are included in the first one.

Example 2: - is not within the table - is not within the table

In this case we want to match the last three prefix (,, since first two records are missing from the table

How do I achieve this?

share|improve this question

You need to configure aggregate routes. It's not clear what version of JunOS you're running, but it is covered in the JunOS routing guide

routing-options {
   rib **routing-table-name** {
      aggregate {
          defaults {
          route **destination-prefix** {
              policy **policy-name**; 
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .