Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    Example: Summarizing Routes Through Route Aggregation

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

    Requirements

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

    Overview

    In this example, Device R1 is connected to customer networks 10.200.1.0/24 and 10.200.2.0/24. 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 10.200.0.0/16.

    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

    Configuration

    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

    set interfaces ge-1/2/0 unit 2 description R1->R2set interfaces ge-1/2/0 unit 2 family inet address 10.0.0.1/30set interfaces lo0 unit 1 family inet address 10.200.1.1/32set interfaces lo0 unit 1 family inet address 10.200.2.2/32set protocols bgp group ext type externalset protocols bgp group ext peer-as 65001set protocols bgp group ext neighbor 10.0.0.2set protocols ospf area 0.0.0.0 interface ge-1/2/0.2set routing-options autonomous-system 65003

    Device R2

    set interfaces ge-1/2/0 unit 1 description R2->R1set interfaces ge-1/2/0 unit 1 family inet address 10.0.0.2/30set interfaces ge-1/2/1 unit 4 description R2->R3set interfaces ge-1/2/1 unit 4 family inet address 10.0.2.2/30set interfaces lo0 unit 2 family inet address 172.16.2.2/32set protocols bgp group int type internalset protocols bgp group int local-address 172.16.2.2set protocols bgp group int export send-customer-routesset protocols bgp group int neighbor 172.16.3.3set protocols bgp group ext type externalset protocols bgp group ext peer-as 65003set protocols bgp group ext neighbor 10.0.0.1set protocols ospf area 0.0.0.0 interface ge-1/2/0.1set protocols ospf area 0.0.0.0 interface ge-1/2/1.4set protocols ospf area 0.0.0.0 interface lo0.2 passiveset policy-options policy-statement send-customer-routes from protocol staticset policy-options policy-statement send-customer-routes then acceptset routing-options static route 10.200.1.0/24 next-hop 10.0.0.1set routing-options static route 10.200.2.0/24 next-hop 10.0.0.1set routing-options autonomous-system 65001

    Device R3

    set interfaces ge-1/2/0 unit 3 description R3->R2set interfaces ge-1/2/0 unit 3 family inet address 10.0.2.1/30set interfaces ge-1/2/1 unit 6 description R3->ISPset interfaces ge-1/2/1 unit 6 family inet address 10.0.45.2/30set interfaces lo0 unit 3 family inet address 172.16.3.3/32set protocols bgp group ext type externalset protocols bgp group ext export send-aggregateset protocols bgp group ext peer-as 65000set protocols bgp group ext neighbor 10.0.45.1set protocols bgp group int type internalset protocols bgp group int local-address 172.16.3.3set protocols bgp group int neighbor 172.16.2.2set protocols ospf export send-defaultset protocols ospf area 0.0.0.0 interface ge-1/2/0.3set protocols ospf area 0.0.0.0 interface lo0.3 passiveset policy-options policy-statement send-aggregate term 1 from protocol aggregateset policy-options policy-statement send-aggregate term 1 then acceptset policy-options policy-statement send-aggregate term suppress-specific-routes from route-filter 10.200.0.0/16 longerset policy-options policy-statement send-aggregate term suppress-specific-routes then rejectset policy-options policy-statement send-default from route-filter 0.0.0.0/0 exactset policy-options policy-statement send-default then acceptset routing-options aggregate route 10.200.0.0/16set routing-options autonomous-system 65001

    Device ISP

    set interfaces ge-1/2/0 unit 7 family inet address 10.0.45.1/30set protocols bgp group ext type externalset protocols bgp group ext export advertise-defaultset protocols bgp group ext peer-as 65001set protocols bgp group ext neighbor 10.0.45.2set policy-options policy-statement advertise-default term 1 from route-filter 0.0.0.0/0 exactset policy-options policy-statement advertise-default term 1 then acceptset routing-options static route 0.0.0.0/0 discardset routing-options autonomous-system 65000

    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.
      [edit interfaces]user@R3# set ge-1/2/0 unit 3 description R3->R2user@R3# set ge-1/2/0 unit 3 family inet address 10.0.2.1/30
      user@R3# set ge-1/2/1 unit 6 description R3->ISPuser@R3# set ge-1/2/1 unit 6 family inet address 10.0.45.2/30
      user@R3# set lo0 unit 3 family inet address 172.16.3.3/32
    2. Configure the AS number.

      [edit routing-options]user@R3# set autonomous-system 65001
    3. Configure the BGP session with the ISP device.
      [edit protocols bgp group ext]user@R3# set type externaluser@R3# set peer-as 65000user@R3# set neighbor 10.0.45.1
    4. Configure the BGP session with Device R2.
      [edit protocols bgp group int]user@R3# set type internaluser@R3# set local-address 172.16.3.3user@R3# set neighbor 172.16.2.2
    5. Configure OSPF.

      [edit protocols ospf area 0.0.0.0]user@R3# set interface ge-1/2/0.3user@R3# set interface lo0.3 passive
    6. Configure the aggregate route.

      [edit routing-options]user@R3# set aggregate route 10.200.0.0/16
    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.

      [edit policy-options policy-statement send-aggregate]user@R3# set term 1 from protocol aggregateuser@R3# set term 1 then acceptuser@R3# set term suppress-specific-routes from route-filter 10.200.0.0/16 longeruser@R3# set term suppress-specific-routes then reject
    8. Apply the aggregate route policy to the external BGP session with Device ISP.

      [edit protocols bgp group ext]user@R3# set export send-aggregate
    9. Configure the routing policy to advertise the default route from Device ISP.

      [edit policy-options policy-statement send-default]user@R3# set from route-filter 0.0.0.0/0 exactuser@R3# set then accept
    10. Apply the default routing policy to OSPF.

      [edit protocols ospf]user@R3# set export send-default
    11. If you are done configuring the device, commit the configuration.

      [edit]user@R3# commit

    Results

    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.

    user@R3# show interfacesge-1/2/0 {unit 3 {description R3->R2;family inet {address 10.0.2.1/30;}}}ge-1/2/1 {unit 6 {description R3->ISP;family inet {address 10.0.45.2/30;}}}lo0 {unit 3 {family inet {address 172.16.3.3/32;}}}user@R3# show protocolsbgp {group ext {type external;export send-aggregate;peer-as 65000;neighbor 10.0.45.1;}group int {type internal;local-address 172.16.3.3;neighbor 172.16.2.2;}}ospf {export send-default;area 0.0.0.0 {interface ge-1/2/0.3;interface lo0.3 {passive;}}}user@R3# show policy-optionspolicy-statement send-aggregate {term 1 {from protocol aggregate;then accept;}term suppress-specific-routes {from {route-filter 10.200.0.0/16 longer;}then reject;}}policy-statement send-default {from {route-filter 0.0.0.0/0 exact;}then accept;}user@R3# show routing-optionsaggregate {route 10.200.0.0/16;}autonomous-system 65001;

    Verification

    Confirm that the configuration is working properly.

    Verifying That Device R3 Has the Expected Routes

    Purpose

    Make sure that Device R3 has the specific static routes.

    Action

    user@R3>show route terse protocol bgp
    inet.0: 12 destinations, 12 routes (12 active, 0 holddown, 0 hidden)
    + = Active Route, - = Last Active, * = Both
    
    A Destination        P Prf   Metric 1   Metric 2  Next hop        AS path
    * 0.0.0.0/0          B 170        100            >10.0.45.1       65000 I
    * 10.200.1.0/24      B 170        100            >10.0.2.2        I
    * 10.200.2.0/24      B 170        100            >10.0.2.2        I

    Meaning

    The output shows that Device R3 has the specific routes to the 10.200.1.0/24 and 10.200.2.0/24 networks.

    Verifying That Device R3 Advertises the Aggregate Route to Device ISP

    Purpose

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

    Action

    user@R3>show route advertising-protocol bgp 10.0.45.1
    inet.0: 12 destinations, 12 routes (12 active, 0 holddown, 0 hidden)
      Prefix                  Nexthop              MED     Lclpref    AS path
    * 10.200.0.0/16           Self                                    I

    Meaning

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

    Published: 2012-12-08