I have CCR1036-12G-4S which will be used for multihoming bgp to connect 2 ISPs for load balancing. I have to /24 pools which will be routed through both ISP in thier backbone.
170.84.28.0/24
170.84.29.0/24
Once both ISP up then 170.84.29.0/24 will route through ISP 1 and 170.84.28.0/24 will route through ISP 2. i want configure load balancing so once the ISP 1 will goes down, all traffic from 170.84.29.0/24 automatically routed to ISP 2 and vise-verse.
Please help me to provide configuration details to match our requirement. please find the attached network diagram for clear understanding.
Be sure and substitute your ISP ASN numbers and peer IPs into this config, but here is a basic prepending filtering config that will do what you’re looking for as far as advertisements to the provider BGP peer.
/routing bgp network
add network=170.84.28.0/24 synchronize=no
add network=170.84.29.0/24 synchronize=no
/routing bgp peer
add name=peer1 out-filter=BGP-OUT-AS7018 remote-address=100.1.1.1 remote-as=
7018 ttl=default
add name=peer2 out-filter=BGP-OUT-AS3450 remote-address=200.1.1.1 remote-as=
3450 ttl=default
/routing filter
add chain=BGP-OUT-AS7018 prefix=170.84.29.0/24 set-bgp-prepend=2
set-bgp-prepend-path=1000
add chain=BGP-OUT-AS3450 prefix=170.84.28.0/24 set-bgp-prepend=2
set-bgp-prepend-path=1000
What route will be accepted from ISPs i.e. default,partial,or full route. please let me know also the configuration of IP route , distance & routing mark in mikrotik
I would recommend full tables if you have the horsepower to do it simply because ECMP is not natively available for BGP in RouterOS. There are some ways to script around it, but full tables solve that problem for the most part.
I would leave AD alone and not apply a routing mark unless you can’t take a full table on each router. AD adjustment can have disastrous results if you get into complex topologies and multi-point redistribution unless it is very tightly managed.
Sorry for reopen an old post, but I need your help, I begining with bgp multihoming configuration, I have two peers and I want use all my block /22 only, no as last example that where route an /24 block for every peer, is possible this?, can you let me an example here?, thank in advance.
Hi lahoras, look - there are 2 dimensions of managing BGP traffic :
Outgoing traffic
If you want to load-balance outgoing traffic from your network, you should get full BGP or partial BGP tables from your ISPs and then setup priority for some of routes through ISP1 and priority for
other part of routes through ISP2. This can be achieved with filters and local preference attribute, for example.
Incoming traffic
For load balancing of incoming traffic BGP attributes the right approach is to split your /22 into 4x/24 and announce half to first ISP and half to second ISP + announce to both ISPs /22 network for the backup reason.