Knowledge Center Search


 

How to aggregate routes and advertize via BGP in SRX-series and J-series devices

  [KB21332] Show KB Properties

  [KB21332] Hide KB Properties

Categories:
Knowledge Base ID: KB21332
Last Updated: 10 Jul 2012
Version: 3.0

Summary:
This article explains how to configure route aggregation and export the aggregated routes to the BGP neighbors.

Problem or Goal:
Consider the following scenario in which you have four subnets:
  • 10.10.4.0/24
  • 10.10.5.0/24
  • 10.10.6.0/24
  • 10.10.7.0/24
The four subnets are connected to four interfaces and a fifth interface is connected to an ISP, to which we advertise the routes to the other 4 subnets. We may want to aggregate this routing information into a single route, as this reduces the amount of information the BGP has to share with its neighbors.

Solution:
Configuring a policy statement to specify the routes that have to be aggregated
root# set policy-options policy-statement aggregate-route from protocol direct
root# set policy-options policy-statement aggregate-route from route-filter 10.10.4.0/22 orlonger
root# set policy-options policy-statement aggregate-route then accept

[edit policy-options]
root# show
policy-statement aggregate-route {
    from {
        protocol direct;
        route-filter 10.10.4.0/22 orlonger;
    }
    then accept;
}

Aggregating the specified routes
root# set routing-options aggregate route 10.10.4.0/22 policy aggregate-route

[edit routing-options]
root# show
aggregate {
    route 10.10.4.0/22 policy aggregate-route;
}

Configuring a policy statement to specify the routes that have to be exported
root# set policy-options policy-statement export-route from protocol aggregate
root# set policy-options policy-statement export-route from route-filter 10.10.4.0/22 exact
root# set policy-options policy-statement export-route then accept

[edit policy-options]
root# show
policy-statement export-route {
    from {
        protocol aggregate;
        route-filter 10.10.4.0/22 exact;
    }
    then accept;
}

Applying the policy statement in the BGP configuration
[edit protocols bgp]
root# set group session-to-AS65505 type external
root# set group session-to-AS65505 peer-as 65505
root# set group session-to-AS65505 neighbor 11.11.11.1

[edit protocols]
root# show
bgp {
    group session-to-AS65505 {
        type external;
        export export–route;
        peer-as 65505;
        neighbor 11.11.11.1;
    }
}

Purpose:
Implementation

Related Links:

 

 

ASK THE KB

Question or KB ID:


 


 

 
Copyright© 1999-2012 Juniper Networks, Inc. All rights reserved.