Page 1 of 1

Multi-homed BGP Traffic Engineering

Posted: Wed Feb 24, 2016 10:25 pm
by stroebs
Hi forumites.

I've got an issue whereby I need to engineer some traffic in such a manner:

- I am learning two default gateways from two separate BGP peers
- I am learning ~7k routes from further separate BGP peers
- I have two separate customer prefixes

What I need to do is:
- Direct one /24 traffic over a separate default route
- Allow other learned routes from direct peers to still apply to the separate /24

This will obviously not work with a simple routing mark as that will send all traffic over a single default route. The other thought was to duplicate routes learned from the peers into another routing table? Can't seem to find that functionality on MikroTik routing filters.

Any advice?
traffic-engineering-separate-gateways.PNG

Re: Multi-homed BGP Traffic Engineering

Posted: Wed Feb 24, 2016 10:43 pm
by ZeroByte
Are the two customer networks in question behind two different border routers on your network?
A simple way to do it would be to use the "weight" property by setting a higher weight in the transit1-in filter on router1 to set the default prefix as a higher weight, and on router 2, set weight higher when receiving from transit2-in... Weight is a purely-internal metric, meaning that it's not communicated in prefix messages to other bgp speakers, so it won't affect your BGP table - just the local router's bgp decisions.

If this is all being done in a single router, then I think you're going to have to use policy routing...
... and like you, no simple solution springs to my mind as to how this can be done without doubling up the routing table.

Re: Multi-homed BGP Traffic Engineering

Posted: Thu Feb 25, 2016 8:30 am
by stroebs
Unfortunately through the same border router. I had the same thought you had of adjusting weight.

Re: Multi-homed BGP Traffic Engineering

Posted: Thu Feb 25, 2016 8:09 pm
by stroebs
For anyone wondering how I solved this:

- Create VLAN sub-interface between my core and border routers
- Create new OSPF instance with new ID, set to only redistribute default route
- Change existing OSPF instance default route metric to 20
- Set new OSPF instance default route metric to 1
- Created rule on border for any traffic destined from separate /24 through VLAN sub-interface to lookup in the second transit table

Basically, use two separate OSPF instances to separate default route to different interface and use routing rule to do a routing table lookup.