Simple setup help - two upstream, bgp, only backup

Hello,

I need little help. I have to configure MTK with the following configuration:

Two upstream ISP connected with BGP. I have AS (ex. 1000), other two upstreams have AS (ex. 2000 and 3000)

I want first upstream to be primary, and in the case of problem, second upstream will took his place.

I will configure following:

/routing bgp instance set default as=1000
/routing bgp network add network=1.1.1.1/24
/routing bgp peer add name=first remote-address=2.2.2.2 remote-as=2000
/routing bgp peer add name=first remote-address=3.3.3.3 remote-as=3000

Of course, IP setting are working ok, remote BGP’s are reachable…

What else I need to do to tell mikrotik to use first ISP by default, and second in the case of trouble.

Thanks…

BGP doesn’t really work quite how you want it to, but to get a good approximation:

  • you should have a filter on your BGP sessions limiting what prefixes you send to your suppliers (create filter under /routing/filter and then apply it to your BGP session as an “out-filter”
  • you can set a lower local-preference on the session to your “backup” suppliers to tell your routers to “demote” any routes learnt from this supplier - this should mean that the routes from your primary provider will take precedence
  • prepend your AS a couple of times to the “backup” provider - this will reduce the amount of traffic you get into your network from this provider (but not down to zero traffic)
  • your backup provider may provide some communities you can tag your prefixes with to set a lower local-pref on /their/ network

Regards,