BGP load Balancing

Dear All,

I have CCR1036-12G-4S which will be used for multihoming bgp to connect 2 ISPs for load balancing. We have two /24 pools which will be routed through both ISP in their 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.

Regards,
Mak
bgp.jpg

You can create prepend filters to “force” traffic from an specific Subnet to use AS1 and the other one use AS2, but still have failover.

I hv done some configuration which is mentioned below.

[admin@MikroTik] /routing bgp peer> print
Flags: X - disabled, E - established

INSTANCE REMOTE-ADDRESS REMOTE-AS

0 default 111.93.178.37 7018
1 default 123.63.61.190 3450

[admin@MikroTik] /routing bgp network> print
Flags: X - disabled

NETWORK SYNCHRONIZE

0 170.84.28.0/24 no
1 170.84.29.0/24 no

[admin@MikroTik] /routing filter> print
Flags: X - disabled
0 chain=BGP-OUT-AS7018 prefix=170.84.29.0/24 invert-match=no
action=passthrough set-bgp-prepend=2 set-bgp-prepend-path=1000

1 chain=BGP-OUT-AS3450 prefix=170.84.28.0/24 invert-match=no
action=passthrough set-bgp-prepend=2 set-bgp-prepend-path=1000

2 chain=BGP-OUT-AS7018 prefix=170.84.29.0/24 invert-match=no
action=passthrough set-bgp-prepend=2 set-bgp-prepend-path=1000

3 chain=BGP-OUT-AS3450 prefix=170.84.28.0/24 invert-match=no
action=passthrough set-bgp-prepend=2 set-bgp-prepend-path=1000


[admin@MikroTik] /ip firewall address-list> print
Flags: X - disabled, D - dynamic

LIST ADDRESS

0 ISP_1 170.84.28.0/24
1 ISP_2 170.84.29.0/24

[admin@MikroTik] /ip firewall mangle> print
Flags: X - disabled, I - invalid, D - dynamic
0 ;;; ISP_1
chain=prerouting action=mark-routing new-routing-mark=ISP_1_OUTBOUND
passthrough=no src-address-list=ISP_1

1 ;;; ISP_2
chain=prerouting action=mark-routing new-routing-mark=ISP_2_OUTBOUND
passthrough=no src-address-list=ISP_2

[admin@MikroTik] /ip route> print
Flags: X - disabled, A - active, D - dynamic,
C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme,
B - blackhole, U - unreachable, P - prohibit

DST-ADDRESS PREF-SRC GATEWAY DISTANCE

0 S 0.0.0.0/0 123.63.61.190 20
1 S 0.0.0.0/0 123.63.61.190 1
2 S 0.0.0.0/0 111.93.178.37 20
3 A S 0.0.0.0/0 192.168.0.1 1
4 ADC 10.10.10.0/24 10.10.10.1 ether4 0
5 ADC 111.93.178.36/30 111.93.178.38 ether5 0
6 ADC 123.63.61.188/30 123.63.61.189 ether3 0
7 ADC 192.168.0.0/24 192.168.0.65 ether2 0

create mangle to mark routing and in IP routing differentiate route with AD & routing mark .


Please let me know . is this config OK.

Regards,
Mak

I am also searching solution for the same type of setup can you help me?