BGP: Aggregate address

    BGP: Aggregate address
    Technology: Routing

    Area: EGP

    Vendor: Cisco

    Title: BGP aggregation

    Software: 12.X , 15.X, IP Services

    Platform: Catalyst 3560, 3750, 3850, 4500, 6500, ISR/ASR Routers 

    Aggregation is a fundamental characteristic used by BGP to hide any number of prefixes from being advertised to neighbors. The key think is that have to be at least one prefix in a BGP table which is a part of aggregation scope. The newly created prefix has two additional attributes such as:

    • AGGREGATOR – consist of router information like Router-ID, AS_PATH which does actual job,
    • ATOMIC_AGGREGATE – inform other routers that some part of BGP attributes are missing like complete AS_PATH, NEXT_HOP.
      To prevent the routing loops from occurring, BGP process creates a new static route to Null0 for every aggregate statement. 

    To configure aggregation for prefixes encompasses by prefix 50.0.0.0/16 type:

    R1# configure terminal
    R1 (config)# router bgp 100
    R1 (config-router)# neighbor 80.50.0.2 remote-as 100
    R1 (config-router)# aggregate-address 50.0.0.0 255.255.0.0
    R1 (config-router)# exit

     Verification commands:

    R1# show bgp ipv4 unicast
    Network Next Hop Metric LocPrf Weight Path
    *> 50.0.0.0/24 0.0.0.0 0 32768 ?
    *> 50.0.0.0/16 0.0.0.0 32768 i
    *> 50.0.1.0/24 0.0.0.0 0 32768 ?
    *> 80.50.0.0/24 0.0.0.0 0 32768 ?

     

    R1# show ip route 50.0.0.0 255.255.0.0
    Routing entry for 50.0.0.0/16
    Known via "bgp 100", distance 200, metric 0, type locally generated
    Routing Descriptor Blocks:
    * directly connected, via Null0
    Route metric is 0, traffic share count is 1
    AS Hops 0 

    R2# show bgp ipv4 unicast neighbors 80.50.0.1 routes
    Network Next Hop Metric LocPrf Weight Path
    *>i50.0.0.0/24 80.50.0.1 0 100 0 ?
    *>i50.0.0.0/16 80.50.0.1 0 100 0 i
    *>i50.0.1.0/24 80.50.0.1 0 100 0 ?
    r>i80.50.0.0/24 80.50.0.1 0 100 0 ?

    R2# show bgp ipv4 unicast 50.0.0.0/16
    BGP routing table entry for 50.0.0.0/16, version 8
    Paths: (1 available, best #1, table Default-IP-Routing-Table)
    Not advertised to any peer
    Local, (aggregated by 100 1.1.1.1)
    80.50.0.1 from 80.50.0.1 (1.1.1.1)
    Origin IGP, metric 0, localpref 100, valid, internal, atomic-aggregate, best

     Extensions:

    Command offers a couple of keyword extensions to influence a final result:

    summary-only – to automatically suppress advertainment of more specific prefixes.

    R1# configure terminal
    R1 (config)# router bgp 100
    R1 (config-router)# aggregate-address 50.0.0.0 255.255.0.0 summary-only
    R1 (config-router)# exit

     Verification commands:

    R1# show bgp ipv4 unicast
    Network Next Hop Metric LocPrf Weight Path
    s> 50.0.0.0/24 0.0.0.0 0 32768 ?
    *> 50.0.0.0/16 0.0.0.0 32768 i
    s> 50.0.1.0/24 0.0.0.0 0 32768 ?
    *> 80.50.0.0/24 0.0.0.0 0 32768 ?

    R1# show bgp ipv4 unicast neighbors 80.50.0.2 advertised-routes
    Network Next Hop Metric LocPrf Weight Path
    *> 50.0.0.0/16 0.0.0.0 32768 i
    *> 80.50.0.0/24 0.0.0.0 0 32768 ?

    R2# show bgp ipv4 unicast neighbors 80.50.0.1 routes
    Network Next Hop Metric LocPrf Weight Path
    *>i50.0.0.0/16 80.50.0.1 0 100 0 i
    r>i80.50.0.0/24 80.50.0.1 0 100 0 ?

     

    suppress-map – to selectively suppress advertainment of some prefixes.

    R1# configure terminal
    R1 (config)# ip prefix-list SUPPRESS permit 50.0.1.0/24
    R1 (config)# route-map SUPPRESS_MAP permit 10
    R1 (config-route-map)# match ip address prefix-list SUPPRESS
    R1 (config)# router bgp 100
    R1 (config-router)# aggregate-address 50.0.0.0 255.255.0.0 suppress-map SUPPRESS_MAP
    R1 (config-router)# exit

     Verification commands:

    R1# show bgp ipv4 unicast
    Network Next Hop Metric LocPrf Weight Path
    *> 50.0.0.0/24 0.0.0.0 0 32768 ?
    *> 50.0.0.0/16 0.0.0.0 32768 i
    s> 50.0.1.0/24 0.0.0.0 0 32768 ?
    *> 80.50.0.0/24 0.0.0.0 0 32768 ?

    R1# show bgp ipv4 unicast neighbors 80.50.0.2 advertised-routes
    Network Next Hop Metric LocPrf Weight Path
    *> 50.0.0.0/24 0.0.0.0 0 32768 ?
    *> 50.0.0.0/16 0.0.0.0 32768 i
    *> 80.50.0.0/24 0.0.0.0 0 32768 ?


    R2# show bgp ipv4 unicast neighbors 80.50.0.1 routes
    Network Next Hop Metric LocPrf Weight Path
    *>i50.0.0.0/24 80.50.0.1 0 100 0 ?
    *>i50.0.0.0/16 80.50.0.1 0 100 0 i
    r>i80.50.0.0/24 80.50.0.1 0 100 0 ?

     

    as-set – to restore the whole set of AS_PATH information and include it in aggregated prefix, the ATOMIC_AGGREGATE attribute is not needed any more.


    R1# configure terminal
    R1 (config)# router bgp 100
    R1 (config-router)# aggregate-address 50.0.0.0 255.255.0.0 summary-only as-set
    R1 (config-router)# exit

     Verification commands:

     R1# show bgp ipv4 unicast
    Network Next Hop Metric LocPrf Weight Path
    s> 50.0.0.0/24 0.0.0.0 0 32768 ?
    *> 50.0.0.0/16 0.0.0.0 100 32768 ?
    s> 50.0.1.0/24 0.0.0.0 0 32768 ?
    *> 80.50.0.0/24 0.0.0.0 0 32768 ?

    R1# show bgp ipv4 unicast neighbors 80.50.0.2 advertised-routes
    Network Next Hop Metric LocPrf Weight Path
    *> 50.0.0.0/16 0.0.0.0 100 32768 ?
    *> 80.50.0.0/24 0.0.0.0 0 32768 ?

    R2# show bgp ipv4 unicast neighbors 80.50.0.1 routes
    Network Next Hop Metric LocPrf Weight Path
    *>i50.0.0.0/16 80.50.0.1 0 100 0 ?
    r>i80.50.0.0/24 80.50.0.1 0 100 0 ?

    R2# show bgp ipv4 unicast 50.0.0.0/16
    BGP routing table entry for 50.0.0.0/16, version 21
    Paths: (1 available, best #1, table Default-IP-Routing-Table)
    Flag: 0x820
    Not advertised to any peer
    Local, (aggregated by 100 1.1.1.1)
    80.50.0.1 from 80.50.0.1 (1.1.1.1)

    Origin incomplete, metric 0, localpref 100, valid, internal, best

    attribute-map – to assign specific attributes for new aggregate prefix and override the current ones.


    R1# configure terminal
    R1 (config)# route-map ATT_MAP permit 10
    R1 (config-route-map)# set community 100:100
    R1 (config-route-map)# set origin incomplete
    R1 (config)# router bgp 100
    R1 (config-router)# neighbor 80.50.0.2 send-community
    R1 (config-router)# aggregate-address 50.0.0.0 255.255.0.0 summary-only as-set attribute-map ATT_MAP
    R1 (config-router)# exit

     Verification commands:

    R1# show bgp ipv4 unicast
    Network Next Hop Metric LocPrf Weight Path
    s> 50.0.0.0/24 0.0.0.0 0 32768 ?
    *> 50.0.0.0/16 0.0.0.0 100 32768 ?
    s> 50.0.1.0/24 0.0.0.0 0 32768 ?
    *> 80.50.0.0/24 0.0.0.0 0 32768 ?

    R1# show bgp ipv4 unicast neighbors 80.50.0.2 advertised-routes
    Network Next Hop Metric LocPrf Weight Path
    *> 50.0.0.0/16 0.0.0.0 100 32768 ?
    *> 80.50.0.0/24 0.0.0.0 0 32768 ?

    R2# show bgp ipv4 unicast neighbors 80.50.0.1 routes
    Network Next Hop Metric LocPrf Weight Path
    *>i50.0.0.0/16 80.50.0.1 0 100 0 ?
    r>i80.50.0.0/24 80.50.0.1 0 100 0 ?

    R2# show bgp ipv4 unicast 50.0.0.0/16
    BGP routing table entry for 50.0.0.0/16, version 21
    Paths: (1 available, best #1, table Default-IP-Routing-Table)
    Flag: 0x820
    Not advertised to any peer
    Local, (aggregated by 100 1.1.1.1)
    80.50.0.1 from 80.50.0.1 (1.1.1.1)
    Origin incomplete, metric 0, localpref 100, valid, internal, best
    Community: 100:100

     

    advertise-map – to choose specific prefixes for composing new set of attributes such as AS_SET for aggregate prefix.


    R1# configure terminal
    R1 (config)# ip prefix-list ADVERT permit 50.0.1.0/24
    R1 (config)# route-map ADVERT_MAP permit 10
    R1 (config-route-map)# match ip address prefix-list ADVERT
    R1 (config)# router bgp 100
    R1 (config-router)# aggregate-address 50.0.0.0 255.255.0.0 summary-only as-set advertise-map ADVERT_MAP
    R1 (config-router)# exit

    Verification commands:


    R1# show bgp ipv4 unicast
    Network Next Hop Metric LocPrf Weight Path
    s> 50.0.0.0/24 0.0.0.0 0 32768 ?
    *> 50.0.0.0/16 0.0.0.0 100 32768 ?
    s> 50.0.1.0/24 0.0.0.0 0 32768 ?
    *> 80.50.0.0/24 0.0.0.0 0 32768 ?

    R1# show bgp ipv4 unicast neighbors 80.50.0.2 advertised-routes
    Network Next Hop Metric LocPrf Weight Path
    *> 50.0.0.0/16 0.0.0.0 100 32768 ?
    *> 80.50.0.0/24 0.0.0.0 0 32768 ?

    R2# show bgp ipv4 unicast neighbors 80.50.0.1 routes
    Network Next Hop Metric LocPrf Weight Path
    *>i50.0.0.0/16 80.50.0.1 0 100 0 ?
    r>i80.50.0.0/24 80.50.0.1 0 100 0 ?

    R2# show bgp ipv4 unicast 50.0.0.0/16
    BGP routing table entry for 50.0.0.0/16, version 21
    Paths: (1 available, best #1, table Default-IP-Routing-Table)
    Flag: 0x820
    Not advertised to any peer
    Local, (aggregated by 100 1.1.1.1)
    80.50.0.1 from 80.50.0.1 (1.1.1.1)
    Origin incomplete, metric 0, localpref 100, valid, internal, atomic-aggregate, best

    We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.