Community discussions

MikroTik App
 
Sirrin
just joined
Topic Author
Posts: 22
Joined: Sun Oct 25, 2009 7:08 am

BGP Load Balancing

Mon Feb 07, 2011 4:08 pm

Hello!
Please help me to adjust load balancing for outgoing traffic.
Have 2 ISP, each of them give us Full View. And have 1 Uplink from both ISP, totally we have 2 uplinks. It is necessary to adjust mikrotik so that the proceeding traffic was distributed between two uplinks in regular intervals, or almost in regular intervals.

ROS v5.0rc8 on x86
set default as=9177 client-to-client-reflection=no disabled=no ignore-as-path-len=no name=default out-filter="" redistribute-connected=no redistribute-ospf=no \
    redistribute-other-bgp=no redistribute-rip=no redistribute-static=no router-id=82.200.96.130 routing-table=""
add as=9177 client-to-client-reflection=no disabled=no ignore-as-path-len=no name=ZAO_KES out-filter="" redistribute-connected=no redistribute-ospf=no redistribute-other-bgp=no \
    redistribute-rip=no redistribute-static=no router-id=62.32.76.85 routing-table=""
/routing bgp network
add disabled=no network=81.161.208.0/20 synchronize=no
add disabled=no network=193.169.60.0/23 synchronize=no
add disabled=no network=46.172.96.0/19 synchronize=no
/routing bgp peer
add address-families=ip as-override=no default-originate=never disabled=no hold-time=3m in-filter=ZSTTK_Weight instance=default multihop=no name=ZSTTK nexthop-choice=default \
    out-filter=ZSTTK_Prepend passive=no remote-address=82.200.96.129 remote-as=21127 remove-private-as=no route-reflect=no tcp-md5-key="" ttl=default use-bfd=no
add address-families=ip as-override=no default-originate=never disabled=no hold-time=3m in-filter=ZAO_KES_Weight instance=ZAO_KES multihop=no name=ZAO_KES nexthop-choice=\
    default out-filter=ZAO_KES_Prepend passive=no remote-address=62.32.76.85 remote-as=44436 remove-private-as=no route-reflect=no tcp-md5-key="" ttl=default use-bfd=no
/routing filter
add action=passthrough chain=bgp-out disabled=yes invert-match=no set-bgp-local-pref=122 set-bgp-prepend=3
add action=passthrough chain=ZSTTK_Prepend disabled=no invert-match=no prefix=0.0.0.0
add action=passthrough chain=ZAO_KES_Prepend disabled=no invert-match=no prefix=0.0.0.0 set-bgp-prepend=15
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7041
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: BGP Load Balancing

Mon Feb 07, 2011 4:19 pm

Adjust bgp weight so that half of the routes are routed over one peer and other half over another.
 
Sirrin
just joined
Topic Author
Posts: 22
Joined: Sun Oct 25, 2009 7:08 am

Re: BGP Load Balancing

Tue Feb 08, 2011 5:34 am

But i have 3 nets, and i can use 2 filter on peer. Maybe i don't unerstand where this is doing? Can you be so kind as to show me an example of config?
 
sophal
newbie
Posts: 34
Joined: Thu Aug 07, 2008 6:09 am
Location: Cambodia

Re: BGP Load Balancing

Fri May 06, 2011 8:11 am

Hello Sirrin,

I'm also to do BGP Load Balancing with 2ISP and single BGP but is not working.
Other way we need BGP two:
BGP1 peering to ISP1
BGP2 peering to ISP2

I try this way is working. :D

configure: BGP1 peering to ISP1

/routing bgp instance
set default as=9177 client-to-client-reflection=yes disabled=no ignore-as-path-len=no name=default out-filter="" redistribute-connected=no redistribute-ospf=no redistribute-other-bgp=no redistribute-rip=no redistribute-static=no router-id=0.0.0.0 routing-table=""

/routing bgp peer
add address-families=ip as-override=no default-originate=never disabled=no hold-time=3m in-filter="" instance=default multihop=yes name=isp1 nexthop-choice=default out-filter=isp1-out passive=no remote-address=82.200.96.129 remote-as=21127 remove-private-as=no route-reflect=no tcp-md5-key= ttl=default use-bfd=no


/routing bgp network
add disabled=no network=81.161.208.0/20 synchronize=no
add disabled=no network=193.169.60.0/23 synchronize=no
add disabled=no network=46.172.96.0/19 synchronize=yes

/routing filter

add action=accept chain=isp1-out disabled=no invert-match=no prefix=81.161.208.0/20
add action=accept chain=isp1-out disabled=no invert-match=no prefix=193.169.60.0/23
add action=accept chain=isp1-out comment="Accept our networks and prepend AS path three times" disabled=no invert-match=no prefix=46.172.96.0/19 set-bgp-prepend=3
add action=discard chain=isp1-out-out comment="discard the rest" disabled=no invert-match=no

configure: BGP2 peering to ISP2

/routing bgp instance
set default as=9177 client-to-client-reflection=yes disabled=no ignore-as-path-len=no name=default out-filter="" redistribute-connected=no redistribute-ospf=no redistribute-other-bgp=no redistribute-rip=no redistribute-static=no router-id=0.0.0.0 routing-table=""

/routing bgp peer
add address-families=ip as-override=no default-originate=never disabled=no hold-time=3m in-filter="" instance=default multihop=yes name=isp2 nexthop-choice=default out-filter=isp2-out passive=no remote-address=62.32.76.85 remote-as=44436 remove-private-as=no route-reflect=no tcp-md5-key= ttl=default use-bfd=no


/routing bgp network
add disabled=no network=81.161.208.0/20 synchronize=yes
add disabled=no network=193.169.60.0/23 synchronize=yes
add disabled=no network=46.172.96.0/19 synchronize=no

/routing filter

add action=accept chain=isp2-out comment="Accept our networks and prepend AS path three times" disabled=no invert-match=no prefix=81.161.208.0/20 set-bgp-prepend=3
add action=accept chain=isp2-out comment="Accept our networks and prepend AS path three times" disabled=no invert-match=no prefix=193.169.60.0/23 set-bgp-prepend=3
add action=accept chain=isp2-out disabled=no invert-match=no prefix=46.172.96.0/19
add action=discard chain=isp2-out-out comment="discard the rest" disabled=no invert-match=no



I want to do single bgp with multi-home. I do follow (http://wiki.mikrotik.com/wiki/Manual:Si ... ultihoming) on Load sharing setup not failed over
what mistake please help? :(

Who is online

Users browsing this forum: No registered users and 15 guests