04-17-2020 12:51 PM
Could anyone advise me how we can forward R1 loopback IP address with specific prefix.
I need R1 to send prefix 10.10.10.0/24 to R3
and R1 send prefix 10.10.0.0/16 to R2
Does we have solution to deal this?
FYI R2-R3 = iBGP peer
R1-R2 , R1-R3 = eBGP peer
04-17-2020 01:46 PM
Hello,
I think you looking for conditional advertisement feature: https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/16137-cond-adv.html
04-18-2020 04:27 AM - edited 04-18-2020 04:27 AM
Hi,
First, you may try to send both aggregated (10.10.0.0/16) and the exact prefix (10.10.10.0/24) out on R1.
Then, you limit the prefix by prefix-list / route-map.
ip prefix-list FILTER-16 permit 10.10.0.0/16 ip prefix-list FILTER-24 permit 10.10.10.0/24 router bgp 65001 neighbor R2-IP remote-as 65002 neighbor R2-IP prefix-list FILTER-16 out neighbor R3-IP remote-as 65002 neighbor R3-IP prefix-list FILTER-24 out aggregate 10.10.0.0/16
04-18-2020 12:37 PM
04-19-2020 04:11 AM - edited 04-19-2020 04:30 AM
Hello
As stated aggregation would be applicable here for resiliency then you would advertise the /24 network via network statement Then filter on the both summary and longer prefixes, but you should beware that when aggregating in bgp by default the historic as-path sequencing could be lost in the summary route which can be seen by atomic aggregate attribute being set in the summary bgp prefix.
This however can be negated with appending the as-set keyword which will allow the as-path history to be retain in the advertised summary thus negate any possible loop being introduced
Example
ip prefix-list 1 description No_Aggregate
ip prefix-list 1 deny 10.10.0.0/16
ip prefix-list 1 permit 0.0.0.0/0 le 32
p prefix-list 2 description Aggregate
ip prefix-list 2 deny 10.10.10.0/24
ip prefix-list 2 permit 0.0.0.0/0 le 32
router bgp XX
network 10.10.10.0 mask 255.255.255.0
aggregate-address 10.10.0.0 255.255.0.0 as-set
neighbor 192.168.12.2 remote-as xx
neighbor 192.168.12.2 prefix-list 2 out
neighbor 192.168.13.3 remote-as xx
neighbor 192.168.13.3 prefix-list 1 out
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide