3.7.e Implement and troubleshoot scalability

bgp_agg

3.7.e [iii] Aggregation, AS set

http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080094826.shtml

R3#sh run | b router
router bgp 300
no synchronization
bgp log-neighbor-changes
neighbor 2.2.2.2 remote-as 100
neighbor 3.3.3.3 remote-as 200
neighbor 4.4.4.4 remote-as 400
no auto-summary

R4#sh ip bgp | b N
Network          Next Hop            Metric LocPrf Weight Path
*> 160.10.0.0       4.4.4.1                                             0 300 200 i
*> 160.20.0.0       4.4.4.1                                             0 300 100 i

the 160 networks are advertised by r1 and r2, as evidenced by r4…

add the aggregate-address 160.0.0.0 255.0.0.0 summary-only command to r3…

as expected that made it a classful summary… very exciting… note the AS path…

R4#sh ip bgp | b N
Network          Next Hop            Metric LocPrf Weight Path
*> 160.0.0.0/8      4.4.4.1                  0                         0 300 i

the interesting piece is on r3, the aggregator, suppressing the routes…

R3#sh ip bgp | b N
Network          Next Hop            Metric LocPrf Weight Path
*> 160.0.0.0/8      0.0.0.0                                     32768 i
s> 160.10.0.0       3.3.3.3                  0                         0 200 i
s> 160.20.0.0       2.2.2.2                  0                         0 100 i

and the pretty capture…

bgp_agg_wireshark

with the as-set argument the summary gets exposed…

With the as-set argument, the path information in the BGP table for the aggregate route changes to include a set from 300 {200,100}. This set indicates that the aggregate actually summarizes routes that have passed through AS-200 and AS-100. The as-set information becomes important in the avoidance of routing loops because the information records where the route has been.

R3(config)#router bgp 300
R3(config-router)#aggregate-address 160.0.0.0 255.0.0.0 summary-only as-set

R4#sh ip bgp | b N
Network          Next Hop            Metric LocPrf Weight Path
*> 160.0.0.0/8      4.4.4.1                  0                         0 300 {200,100} i

that is exciting, actually… flapping can occur if many routes are aggregated and there is a problem at the alligator…

R3(config-if)#
*Mar  1 00:47:26.263: %BGP-5-ADJCHANGE: neighbor 3.3.3.3 Down Interface flap

R4#sh ip bgp | b N
Network          Next Hop            Metric LocPrf Weight Path
*> 160.0.0.0/8      4.4.4.1                  0                         0 300 100 i

when the link comes back up…

R4#sh ip bgp 160.0.0.0
BGP routing table entry for 160.0.0.0/8, version 15
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Flag: 0x820
Not advertised to any peer
300 {200,100}, (aggregated by 300 4.4.4.1)
4.4.4.1 from 4.4.4.1 (4.4.4.1)
Origin IGP, metric 0, localpref 100, valid, external, best

R3#sh ip bgp 160.0.0.0
BGP routing table entry for 160.0.0.0/8, version 16
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Advertised to update-groups:
1
{200,100}, (aggregated by 300 4.4.4.1)
0.0.0.0 from 0.0.0.0 (4.4.4.1)
Origin IGP, localpref 100, weight 32768, valid, aggregated, local, best