Community discussions

MikroTik App
just joined
Topic Author
Posts: 2
Joined: Fri Sep 12, 2014 3:08 pm

BGP Multihoming with load balancing

Tue Dec 08, 2020 9:50 am

Hello All

I run a small ISP with a /20 IP range and connect to 2 upstream providers, I advertise the full IP range to both ISP's. All is working well however I need to do some load balancing as I go over my bandwidth limit with the one provider. Seems to be a 80 / 20 split at the moment. I do not work with BGP often thus my inexperience so any advice would be greatly appreciated

User avatar
Posts: 1313
Joined: Fri Aug 10, 2012 6:46 am
Location: Jackson, MS, USA

Re: BGP Multihoming with load balancing

Sat Dec 12, 2020 4:59 pm

The very best way to do this is with communities. With only two upstreams, you may need to break your /20 into a few smaller advertisements like /21s or /22s and then use the traffic engineering communities of your upstream provider to set preferences. Technically you can do this without communities by advertising different subnets out each provider and then an aggregate announcement of your /20 to both providers - however, this can get confusing and communities are preferred if your upstream uses them. Stay away from prepending, it's not terribly effective anymore and is considered a mechanism to be used only when there is no other option.

You'll probably want to open a ticket with each upstream and ask

1) What communities they offer (if any)
2) If BGP communities are enabled on your peering

This can be a fairly complex topic so i'd advise you to listen to this podcast on BGP Traffic Engineering first, and then come back and review the suggested implementation

Assuming you break your /20 into /22s, you can then prioritize them to get the best split of traffic. It may not be completely 50/50 but you can definitely get a lot closer than 80/20. Here is an example (using the doc prefix /24) of setting a BGP traffic engineering community with your upstream provider. In MikroTik, this is something you do in the outbound routing filter.

/routing filter
add action=accept chain=cogent-out prefix= set-bgp-communities=\

The resulting action of this config when applied to the cogent peering is shown in the drawing below - traffic is moved from Cogent to Lumen (the drawing was done back when it was Level3)

Global - MikroTik Support & Consulting - English | Español | Serbian | Danish +1 855-645-7684 ... consulting

Who is online

Users browsing this forum: No registered users and 17 guests