cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
614
Views
5
Helpful
4
Replies

BGP Route redundancy with longest match

ivynobita
Level 1
Level 1

Screen Shot 2020-04-18 at 4.40.02 AM.png

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

4 Replies 4

kubn2
Level 1
Level 1

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

ngkin2010
Level 7
Level 7


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


that's what I would do for simplicity sake; other post talks about advertise maps which is also good solution. Either one can be implemented.
Thanks for making me revisiting BGP topics

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


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul
Review Cisco Networking products for a $25 gift card