Set up the aggregate map to select only 192.68.10.0.24 via a route-map
RTA#conf t
Enter configuration commands, one per line. End with CNTL/Z.
RTA(config)#no route-map SET_ATTRIBUTE
RTA(config)#route-map SELECT_MORE_SPECIFIC_ROUTES permit 10
RTA(config-route-map)#match ip add 1
RTA(config-route-map)#acces 1 permit 192.68.10.0 0.0.0.255
RTA(config)#router bgp 3
RTA(config-router)#$0.0 255.255.0.0 as-set adv SELECT_MORE_SPECIFIC_ROUTES
RTA(config-router)#end
RTA#
In the above config:
RTA(config-router)#$0.0 255.255.0.0 as-set adv SELECT_MORE_SPECIFIC_ROUTES
has been trunctuated and the full command is:
aggregate-address 192.68.0.0 255.255.0.0 as-set adv SELECT_MORE_SPECIFIC_ROUTES
Below you will see BGP shows the aggregates path as only 2, where previously we were aggregating addresses also for AS 1.
RTA#sh ip bgp 192.68.0.0
BGP routing table entry for 192.68.0.0/16, version 16
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Advertised to non peer-group peers:
172.16.1.2 172.16.20.1 172.16.220.2
2, (aggregated by 3 172.16.2.254)
0.0.0.0 from 0.0.0.0 (172.16.2.254)
Origin IGP, localpref 100, weight 32768, valid, aggregated, local, atomic-aggregate, best
RTA#
This means that the aggregate can now be advertised to AS 1 because the AS_PATH does not include AS 1. AS 2 will not be able to receive the aggregate.
No comments:
Post a Comment