Is there a way to do a conditional BGP advertisement in routeros? Here is my situation. I have 2 connections, a big pipe and a small pipe. The provider I get the small pipe from buys transit from some of the big tier 1s. They propogate my route advertisement to these tier 1 isps who then preference that route over the advertisement via my other provider, who is a tier 1 and has peering with them. We have tried as path prepending, community strings, etc and haven’t had any luck. I only want inbound traffic via the small pipe if the big pipe is down. On a cisco router I can accomplish this using a conditional advertisement using something like this:
in RouterOS you will not find similar feature, however to achieve your goal, you can set routing filters to reject the prefix going to one peer. Then write a script that will check if second peer running, if not - disable filter rule.
thanks for the suggestions. we have tried local-pref but haven’t achieved what we are looking for. I will try writing a script to enable/disable the advertisement.
An easier way is to do an asymmetrical announcement of your prefixes
announce your full prefixes to both peers ( IE: 10.10.222.0/23 )
then announce smaller prefixes of the same subnet to the preferred peer (IE: 10.10.222.0/24 and 10.10.223.0/24 )
this way the more focused prefix is always choosen by remote ASs.
If your main link goes down, the second peer still announces the routes to your network.
That’s how i do load balancing, in a very basic way.
I apologize for my english.