Community discussions

MikroTik App
 
ste
Forum Guru
Forum Guru
Topic Author
Posts: 1924
Joined: Sun Feb 13, 2005 11:21 pm

Injecting partial BGP/Aggregate routes into OSPF

Wed Sep 12, 2018 7:20 pm

Is this doable? Found no example. I don't want to do iBGP everywhere. I just want to redistribute a handful routes into ospf as soon as they are learned with bgp. The rest should use default routes.
 
User avatar
StubArea51
Trainer
Trainer
Posts: 1739
Joined: Fri Aug 10, 2012 6:46 am
Location: stubarea51.net
Contact:

Re: Injecting partial BGP/Aggregate routes into OSPF

Wed Sep 12, 2018 9:14 pm

How many routes do you want to put in OSPF?
 
ste
Forum Guru
Forum Guru
Topic Author
Posts: 1924
Joined: Sun Feb 13, 2005 11:21 pm

Re: Injecting partial BGP/Aggregate routes into OSPF

Wed Sep 12, 2018 9:29 pm

How many routes do you want to put in OSPF?
About 20 in addition to our internal routes (300).
 
joegoldman
Forum Veteran
Forum Veteran
Posts: 766
Joined: Mon May 27, 2013 2:05 am

Re: Injecting partial BGP/Aggregate routes into OSPF

Thu Sep 13, 2018 2:24 am

On the BGP routers, turn on bgp redistribution then add only the wanted routes into ospf-out filter denying the others, so it will redistribute only those?
 
ste
Forum Guru
Forum Guru
Topic Author
Posts: 1924
Joined: Sun Feb 13, 2005 11:21 pm

Re: Injecting partial BGP/Aggregate routes into OSPF

Thu Sep 13, 2018 9:03 am

On the BGP routers, turn on bgp redistribution then add only the wanted routes into ospf-out filter denying the others, so it will redistribute only those?
Done this? I fear as the BGP process is single threaded and eats a whole cpu of the CCR it may cause problems.
 
joegoldman
Forum Veteran
Forum Veteran
Posts: 766
Joined: Mon May 27, 2013 2:05 am

Re: Injecting partial BGP/Aggregate routes into OSPF

Thu Sep 13, 2018 10:34 am

Done this? I fear as the BGP process is single threaded and eats a whole cpu of the CCR it may cause problems.
I do do this, albeit limited. My bigger network runs only BGP as it is a core routing setup, in another country we run more an OSPF mesh around about 7 sites linked together by fixed wireless at the moment.

In that country I have 2 BGP routers, one primary supplier one secondary supplier, so I BGP with them, and I then inject only the default route into OSPF from that BGP though, and I do also have a 3rd BGP router peering with an IX but all those routes are pushed into OSPF.

How many routes does the BGP router have? if you are taking full tables then yes changes can and may take some time to reflect in the FIB, but if you are not taking full table then it shouldnt hurt you all that much.
 
User avatar
StubArea51
Trainer
Trainer
Posts: 1739
Joined: Fri Aug 10, 2012 6:46 am
Location: stubarea51.net
Contact:

Re: Injecting partial BGP/Aggregate routes into OSPF

Fri Sep 14, 2018 6:51 pm

On the BGP routers, turn on bgp redistribution then add only the wanted routes into ospf-out filter denying the others, so it will redistribute only those?
Done this? I fear as the BGP process is single threaded and eats a whole cpu of the CCR it may cause problems.
You have to get into hundreds of thousands of routes before this is a real issue. With a few hundred routes, it will be fine. Even a few thousand in BGP converges very quickly.
 
ste
Forum Guru
Forum Guru
Topic Author
Posts: 1924
Joined: Sun Feb 13, 2005 11:21 pm

Re: Injecting partial BGP/Aggregate routes into OSPF

Tue Oct 16, 2018 10:56 am

Trying this now but my routing filters do not work as expected.

I test with an ibgp peer where I only send all (global) /8 prefixes from a running bgp server to keep table small for testing.

I see the /8 prefixes coming in but the ospf filter does not match as expected. Nothing is redistributed into ospf.

/routing filter
add action=accept chain=ospf-out prefix=4.0.0.0/8 prefix-length=8 protocol=""
add action=accept chain=ospf-out prefix=27.0.0.0/8 prefix-length=8
add action=discard chain=ospf-out protocol=bgp

I try to inject 4.0.0.0/8 and 27.0.0.0/8 into ospf but they dont appear. Removing the discard line I see all global /8 routes injected into ospf including 4.0.0.0 and 27.0.0.0. So the first 2 filter lines do not work ?

Who is online

Users browsing this forum: No registered users and 19 guests