How to convert working failover to load balancing?

I have a working setup where if my standard PPPoE fails then it falls over to port 5 which is a DHCP gateway.

Can someone please take a look at my script and let me know what changes to make so that it load balances both gateways for all devices and fails over to the either if one connection goes down.

Thanks!

# jun/21/2014 13:31:03 by RouterOS 6.13
# software id = JMB0-NPVK
#
/interface wireless
set [ find default-name=wlan1 ] disabled=no l2mtu=2290 mode=ap-bridge ssid=\
    macweb wireless-protocol=802.11
/interface ethernet
set [ find default-name=ether3 ] master-port=ether2
set [ find default-name=ether4 ] master-port=ether2
set [ find default-name=ether5 ] name="ether5 Macweb"
/ip neighbor discovery
set ether1 discover=no
/interface wireless security-profiles
set [ find default=yes ] authentication-types=wpa2-psk mode=dynamic-keys
/ip hotspot user profile
set [ find default=yes ] idle-timeout=none keepalive-timeout=2m \
    mac-cookie-timeout=3d
/ip pool
add name=dhcp ranges=192.168.2.100-192.168.2.254
/ip dhcp-server
add address-pool=dhcp disabled=no interface=ether2 name=dhcp1
/interface pppoe-client
add ac-name="" add-default-route=yes allow=pap,chap,mschap1,mschap2 \
    default-route-distance=1 dial-on-demand=no disabled=no interface=ether1 \
    keepalive-timeout=60 max-mru=1480 max-mtu=1480 mrru=disabled name=\
    pppoe-out1 profile=default service-name="" use-peer-dns=yes user=\
    mylesmacaulay@afrihost.co.za
/ip accounting
set enabled=yes
/ip address
add address=192.168.2.1/24 interface=ether2 network=192.168.2.0
/ip dhcp-client
add default-route-distance=2 dhcp-options=hostname,clientid disabled=no \
    interface="ether5 Macweb"
/ip dhcp-server lease
add address=192.168.2.51 client-id=1:50:e5:49:c1:2b:d8 mac-address=\
    50:E5:49:C1:2B:D8 server=dhcp1
add address=192.168.2.54 client-id=1:10:fe:ed:6:32:39 mac-address=\
    10:FE:ED:06:32:39 server=dhcp1
add address=192.168.2.53 client-id=1:b8:27:eb:59:35:70 mac-address=\
    B8:27:EB:59:35:70 server=dhcp1
add address=192.168.2.52 mac-address=00:50:8D:B5:39:19 server=dhcp1
add address=192.168.2.166 mac-address=B8:27:EB:0F:5E:B2 server=dhcp1
add address=192.168.2.171 client-id=1:0:1a:73:d1:5c:85 mac-address=\
    00:1A:73:D1:5C:85 server=dhcp1
/ip dhcp-server network
add address=192.168.2.0/24 gateway=192.168.2.1 netmask=24
/ip firewall filter
add chain=input protocol=icmp
add chain=input connection-state=established
add chain=input connection-state=related
add action=drop chain=input in-interface=ether1
add action=passthrough chain=forward comment="My PC Downloader" dst-address=\
    192.168.2.51
add action=passthrough chain=forward comment="My PC Downloader" dst-address=\
    192.168.2.54
add action=passthrough chain=forward comment="My PC Downloader" dst-address=\
    192.168.2.53
add action=passthrough chain=forward comment=Dik dst-address=192.168.2.171
/ip firewall mangle
add action=mark-connection chain=prerouting new-connection-mark=Other
add action=mark-packet chain=prerouting connection-mark=Other \
    new-packet-mark="Other Traffic" passthrough=no
/ip firewall nat
add action=masquerade chain=srcnat out-interface=pppoe-out1 to-addresses=\
    0.0.0.0
add action=dst-nat chain=dstnat dst-port=9990 in-interface=pppoe-out1 \
    protocol=tcp to-addresses=192.168.2.51 to-ports=8080
add action=dst-nat chain=dstnat dst-port=9991 in-interface=pppoe-out1 \
    protocol=tcp to-addresses=192.168.2.51 to-ports=8989
add action=dst-nat chain=dstnat dst-port=9992 in-interface=pppoe-out1 \
    protocol=tcp to-addresses=192.168.2.51 to-ports=8082
add action=dst-nat chain=dstnat dst-port=10000-10001 in-interface=pppoe-out1 \
    protocol=tcp to-addresses=192.168.1.45 to-ports=10000-10001
/ip upnp
set allow-disable-external-interface=no enabled=yes
/ip upnp interfaces
add interface=ether2 type=internal
add interface=pppoe-out1 type=external
/system clock
set time-zone-name=Africa/Johannesburg
/system leds
set 0 interface=wlan1
/system ntp client
set enabled=yes mode=unicast primary-ntp=205.196.146.72 secondary-ntp=\
    108.61.73.243
/tool e-mail
set address=173.194.77.108 from=Mikrotik@home.co.za password=********** \
    port=587 start-tls=yes user=************
/tool mac-server
set [ find default=yes ] disabled=yes
add interface=ether2
add interface=ether3
add interface=ether4
add interface="ether5 Macweb"
add interface=wlan1
/tool mac-server mac-winbox
set [ find default=yes ] disabled=yes
add interface=ether2
add interface=ether3
add interface=ether4
add interface="ether5 Macweb"
add interface=wlan1

Did your default gateway for pppoe and port5 dhcp fixed, or may change from time to time?

Thanks for your reply. The pppoe IP will change every time a connection is made as we don’t have static IP from isp but the ether 5 IP will always be 192.168.1.21

If it needs to happen I can get a static public IP but I don’t really want to as it costs extra

In this case it will be hard to use ECMP, where you can simply write “/ip route add dst-address=0.0.0.0/0 gateway=1.1.1.1,2.2.2.2 check-gateway=ping” and that’s all.

But you could try PCC
http://wiki.mikrotik.com/wiki/Manual:PCC
It work stable on mikrotik, and fit to your conditions. In your script you should rewrite /ip firewall mangle rules and add some /ip route records. Just follow the article.