Support Support Downloads Knowledge Base Case Manager My Juniper Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

[SRX] Example - How to aggregate routes and advertize via BGP

0

1

Article ID: KB21332 KB Last Updated: 07 Sep 2019Version: 5.0
Summary:

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

Symptoms:
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:

Configure 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;
}

Aggregate 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;
}

Configure 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;
}

Apply 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;
    }
}
Modification History:
2019-09-07: Removed references to J Series devices.
Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search