Community discussions

MikroTik App
 
tonis
just joined
Topic Author
Posts: 7
Joined: Wed Mar 24, 2010 10:46 am

BGP announce prefix based on another route

Wed Mar 24, 2010 10:55 am

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.
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8712
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: BGP announce prefix based on another route

Wed Mar 24, 2010 1:21 pm

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
 
tonis
just joined
Topic Author
Posts: 7
Joined: Wed Mar 24, 2010 10:46 am

Re: BGP announce prefix based on another route

Mon May 03, 2010 12:45 pm

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?
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8712
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: BGP announce prefix based on another route

Tue May 04, 2010 12:18 pm

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...
 
tonis
just joined
Topic Author
Posts: 7
Joined: Wed Mar 24, 2010 10:46 am

Re: BGP announce prefix based on another route

Tue May 04, 2010 12:30 pm

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)
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8712
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: BGP announce prefix based on another route

Tue May 04, 2010 5:43 pm

maybe, BGP Aggregate will help? http://wiki.mikrotik.com/wiki/Manual:Ro ... #Aggregate

use summary-only=yes
 
tonis
just joined
Topic Author
Posts: 7
Joined: Wed Mar 24, 2010 10:46 am

Re: BGP announce prefix based on another route

Tue May 04, 2010 6:01 pm

maybe, BGP Aggregate will help? http://wiki.mikrotik.com/wiki/Manual:Ro ... #Aggregate
use summary-only=yes
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.
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7199
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: BGP announce prefix based on another route

Wed May 05, 2010 10:37 am

if you set summary-only=no then more specific routes will not be suppressed.
 
tonis
just joined
Topic Author
Posts: 7
Joined: Wed Mar 24, 2010 10:46 am

Re: BGP announce prefix based on another route

Wed May 05, 2010 11:58 am

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.
 
tonis
just joined
Topic Author
Posts: 7
Joined: Wed Mar 24, 2010 10:46 am

Re: BGP announce prefix based on another route

Sun May 23, 2010 8:56 pm

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.