Hello
Let’s say we have an aggregate of 100.0.0.0/21 that we advertise somewhere in our network but we want to advertise also 100.0.1.0/24 to neighbor A, 100.0.2.0 to neighbor B and 100.0.3.0 to neighbor C at different places as best entry points.
We can do this with bgp inject-map.
(somewhere in network)
router bgp 100
aggregate-address 100.0.0.0 255.255.240.0 summary-only
network 100.0.0.0 mask 255.255.255.0
(near the edge to neighbor A)
router bgp 100
bgp inject-map INJECT exist-map EXIST
route-map INJECT permit 10
set ip address prefix-list PARTICULARNETWORK
<any additional parameters here”
route-map EXIST permit 10
match ip address prefix-list AGGREGATE
<any additional conditions here>
There is even a nice show command for this:
R7#show ip bgp injected-paths
BGP table version is 22, local router ID is 150.1.7.7
Status codes: s suppressed, d damped, h history, * valid, > best, i – internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i – IGP, e – EGP, ? – incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.0.1.0/24 155.1.37.3 0 i