Page 1 of 1
BGP announce prefix based on another route
Posted: Wed Mar 24, 2010 10:55 am
by tonis
The scenario: 1 AS is shared between two datacenters. The AS has /22 prefix assigned to it, but it's divided internally to two /23s. One per each DC. DCs have one point to point fiber link and each DC has their own transit. Routers are interconnected using iBGP.
When that fiber link is up I'd like to announce both /22 and /23, but when that link breaks I'd only like to announce the more specific /23 to transit providers.
So any idea how to implement that? Basically I was thinking of having static route with BFD and if that static route goes away it would pull that covering prefix from our transit providers. So I don't blackhole the traffic for other DC when our internal fiber is down.
I'm really new to the Mikrotik platform, previously I have been using Juniper's JunOS. So I welcome all suggestions how to implement this in Mikrotik.
Re: BGP announce prefix based on another route
Posted: Wed Mar 24, 2010 1:21 pm
by Chupaka
Basically I was thinking of having static route with BFD and if that static route goes away it would pull that covering prefix from our transit providers.
it should be /22 route, and then set 'synchronize=yes' in BGP Networks for /22
Re: BGP announce prefix based on another route
Posted: Mon May 03, 2010 12:45 pm
by tonis
Is there a way to do this with a /32 route? So say there's 1.1.1.1/32 via iBGP then announce to eBGP peers the full /22 prefix?
Re: BGP announce prefix based on another route
Posted: Tue May 04, 2010 12:18 pm
by Chupaka
Is there a way to do this with a /32 route? So say there's 1.1.1.1/32 via iBGP then announce to eBGP peers the full /22 prefix?
so, if there's 1.1.1.1/32, you want to announce 1.1.0.0/22?.. or some other prefix?
you may try to use recursive nexthop lookup...
Re: BGP announce prefix based on another route
Posted: Tue May 04, 2010 12:30 pm
by tonis
so, if there's 1.1.1.1/32, you want to announce 1.1.0.0/22?.. or some other prefix?
you may try to use recursive nexthop lookup...
The /32 route will fall inside the /22 prefix, but it's not the nexthop.
The idea is as follows:
1.1.1.0/23 is at DC1
1.1.3.0/23 is at DC2
DC1 will announce loopback /32 in iBGP that is inside the 1.1.1.0/23 say 1.1.2.42/32.
If that route exists via iBGP at DC2 then announce to eBGP peers both 1.1.3.0/23 and 1.1.1.0/22. When that iBGP route goes away, withdraw that 1.1.1.0/22.
On Juniper side (DC1) I'm using Generated Routes to accomplish this (
https://www.juniper.net/techpubs/softwa ... 59002.html)
Re: BGP announce prefix based on another route
Posted: Tue May 04, 2010 5:43 pm
by Chupaka
Re: BGP announce prefix based on another route
Posted: Tue May 04, 2010 6:01 pm
by tonis
If I'm reading that documentation correctly it will then supress the more specific advertisiment? So you can't have /22 and /23 that way. For Traffic Engineering(TE) purposes it would be good to have both advertised the same time when the link between DCs is healthy.
Re: BGP announce prefix based on another route
Posted: Wed May 05, 2010 10:37 am
by mrz
if you set summary-only=no then more specific routes will not be suppressed.
Re: BGP announce prefix based on another route
Posted: Wed May 05, 2010 11:58 am
by tonis
The issue still remains that with that aggregate it's always active as there will be more specific routes available from the DC2's half of /22.. atleast I can't see how I can specify that create 10.0.1.0/22 aggreate only when there's routes from 10.0.1.0/23 and not from 10.0.3.0/23.
Re: BGP announce prefix based on another route
Posted: Sun May 23, 2010 8:56 pm
by tonis
Just a status update. I ended up announcing the whole /22 and /23 all the time using the bgp networks statement. Only downside is that if someone filters /23 size prefix and we happen to have the iBGP link down then some incoming traffic gets blackholed.
Thanks a lot for quick replies, really helped me to implement Mikrotik on our other DC.