V7.20 BGP automatic Blackhole adding

Hello everyone.

Since v7.20.x a blackhole route is automatically added for every advertised prefix even if this route is already in the main routing table. For example:

I’m advertising prefix 10.0.0.0/24 to my remote BGP peers. This is a local IP range, which is already in the main routing table:

/ip route print
Columns: DST-ADDRESS, GATEWAY, ROUTING-TABLE, DISTANCE

DAc 10.0.0.0/24 local-bridge main 0

But now with v7.20.x on top of that I have an additional dynamic Blackhole route with the same prefix and distance=255.

How can I stop blackhole routes to be added to the routing table automatically for prefixes that are already in the routing table?

Thank you in advance.

I confirm this behaviour. I personally tried every kind of rule matching and found no solution to this.

Finally I thought that this is not a bad thing anyway since the route have a distance set to 255 and would not be preferred compared to a dynamic learned or connected route and it’s a nice thing to have in case internal routing would be down and no route to advertised subnets it’s available.

Hi mmmigoro,

Thank you for your answer. I agree it may be a very handy feature in some cases.

However, I still would like to know how to stop this. :slightly_smiling_face:

You can wait for the release of 7.21 or install the current beta, from the changelog:

  • bgp - added output.network-blackhole setting;
  • bgp - do not auto-generate blackhole routes by default (introduced in v7.20);

CGGXANNX,

Thank you very much for you answer. Before I was going to roll back to release 7.19.x because what happens with these blackholes is they are generated per connection per prefix. I have roughly 80 connections that advertise 3 prefixes. So I have 80 the same blackholes for each prefix, 240 all together. :slightly_smiling_face:

But since a fix coming in the new version I think I'll wait for release 7.21.

Thank you again.

Hello everyone,

v7.21 has been released but there is no "do not auto-generate blackhole routes by default" fix in it (or I couldn't find it :slightly_smiling_face:). Will this option be added in the next release? To be honest, I don't really want to roll back to v7.19.

Hi All,

Any news on this one?

Hello again :slightly_smiling_face:,

It looks like automatic black hole generation with BGP connection active has been fixed. Thank you Mikrotik developers for that.

However, there is still an automatically generated route in the routing table: Dynamic BGP NET route. Ticking and unticking "Network Blackhole" in BGP connection configuration just changes this route from Blackhole to non-Blackhole with distance=255. But this route is still in the routing table duplicating prefixes that are already there.

Is there a way to completely stop automatic generation of a BGP NET routes like it was in version 7.19.x? Or to have an option to turn this feature off and back on again when needed (best case scenario :wink: )?