The attribute-map makes changes to the aggregated route, not to the component routes that make up the aggregate. In this example a community 100:500 is added to the aggregate.
R3#show ip bgp 10.10.0.0
BGP routing table entry for 10.10.0.0/16, version 68
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Flag: 0x820
Not advertised to any peer
100, (aggregated by 100 172.17.0.2)
192.168.100.5 from 192.168.100.5 (172.17.0.2)
Origin IGP, metric 0, localpref 100, valid, external, atomic-aggregate, best
A route-map named "attribute-map" has to be applied to the aggregation command. This means, that the changes made to the aggregate are valid for all neighbors.
R2#configure terminal
R2(config)#route-map ATTRIBUTE permit 10
R2(config-route-map)#set community 100:500
R2(config-route-map)#end
The new attribute-map is added to the aggreagte command and the BGP sessions cleared.
R2#configure terminal
R2(config)#router bgp 100
R2(config-router)# aggregate-address 10.10.0.0 255.255.0.0 suppress-map SUPP attribute-map ATTRIBUTE
R2(config-router)#end
R2#clear ip bgp *
The aggregate route 10.10.0.0/16 now has the community 100:500 applied to it.
R3#show ip bgp 10.10.0.0
BGP routing table entry for 10.10.0.0/16, version 43
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Flag: 0x820
Not advertised to any peer
100, (aggregated by 100 172.17.0.2)
192.168.100.5 from 192.168.100.5 (172.17.0.2)
Origin IGP, metric 0, localpref 100, valid, external, atomic-aggregate, best
Community: 100:500
Part 1, Setup
Part 2, Setting the Aggregate
Part 3, Component Routes
Part 4, Unsuppress the Suppressed
Part 6, Playing with the AS-SET
|