balance 2 wan ppoe

Hi guys,

Im new with Mikrotik technology, I read about load balance, but Im not set up well my scenario, I have two routers one of them with static IP and other one with dynamic, I setup internet acces without NAT, so I connected to microtik in mode PPOE.

I observe stange performance, in my configuration mode, only work PPOE1, and only can acces across internet to PPOE1, PPOE2 dont work properly, can not access across internet, and client dindt use… only work PPOE2, when PPOE1 down, but not boths at same time :frowning: … I think routes and mangle are OK…

I paste my configuration If some body can help me, I had hinking about that for long time and dindt found solution…

# software id = 45SA-CXYG
#

/interface bridge
add name=bridge1

/interface pppoe-client
add disabled=no interface=ether1 name=pppoe-1 password=adslppp user=\
adslppp@telefonicanetpa
add disabled=no interface=ether2 name=pppoe-2 password=adslppp user=\
adslppp@telefonicanetpa

/interface vlan
add interface=ether3 name=INVITADOS vlan-id=10

/ip pool
add name=dhcp_pool1 ranges=10.0.0.50-10.0.1.254
add name=dhcp_pool2 ranges=172.16.0.2-172.16.0.254

/ip dhcp-server
add address-pool=dhcp_pool1 disabled=no interface=ether3 name=dhcp1
add address-pool=dhcp_pool2 disabled=no interface=INVITADOS name=dhcp2

/ppp profile
set *FFFFFFFE dns-server=8.8.8.8,8.8.4.4 use-encryption=no
/interface pptp-server server
set enabled=yes

/ip address
add address=10.0.0.1/23 interface=ether3 network=10.0.0.0
add address=172.16.0.1/24 interface=INVITADOS network=172.16.0.0

/ip dhcp-server network
add address=10.0.0.0/23 dns-server=10.0.0.10,8.8.8.8 gateway=10.0.0.1
add address=172.16.0.0/24 dns-server=8.8.8.8 gateway=172.16.0.1

/ip firewall mangle
add action=mark-connection chain=prerouting connection-state=new \
dst-address-type=!local in-interface=ether3 new-connection-mark=\
pppoe-1_conn passthrough=yes per-connection-classifier=both-addresses:2/0

add action=mark-connection chain=prerouting connection-state=new \
dst-address-type=!local in-interface=ether3 new-connection-mark=\
pppoe-2_conn passthrough=yes per-connection-classifier=both-addresses:2/1

add action=mark-routing chain=prerouting connection-mark=pppoe-1_conn \
in-interface=ether3 new-routing-mark=to_pppoe-1 passthrough=yes

add action=mark-routing chain=prerouting connection-mark=pppoe-2_conn \
in-interface=ether3 new-routing-mark=to_pppoe-2 passthrough=yes

add action=mark-connection chain=prerouting connection-state=new \
dst-address-type=!local in-interface=ether3 new-connection-mark=\
pppoe-1_conn passthrough=yes per-connection-classifier=both-addresses:2/0

add action=mark-connection chain=prerouting connection-state=new \
dst-address-type=!local in-interface=ether3 new-connection-mark=\
pppoe-2_conn passthrough=yes per-connection-classifier=both-addresses:2/1

add action=mark-routing chain=prerouting connection-mark=pppoe-1_conn \
in-interface=ether3 new-routing-mark=to_pppoe-1 passthrough=yes

add action=mark-routing chain=prerouting connection-mark=pppoe-2_conn \
in-interface=ether3 new-routing-mark=to_pppoe-2 passthrough=yes

/ip firewall nat
add action=masquerade chain=srcnat out-interface=pppoe-1
add action=masquerade chain=srcnat out-interface=pppoe-2
add action=dst-nat chain=dstnat dst-port=3389 in-interface=pppoe-1 protocol=tcp \
to-addresses=10.0.0.10 to-ports=3389
add action=dst-nat chain=dstnat dst-port=1723 in-interface=pppoe-1 protocol=tcp \
to-addresses=10.0.0.12 to-ports=1723
add action=dst-nat chain=dstnat dst-port=1194 in-interface=pppoe-1 protocol=udp \
to-addresses=10.0.0.20 to-ports=1194
add action=dst-nat chain=dstnat dst-port=81 in-interface=pppoe-1 protocol=tcp \
to-addresses=10.0.0.10 to-ports=81

/ip route
add distance=1 gateway=pppoe-1 routing-mark=to_pppoe-out1
add distance=2 gateway=pppoe-2 routing-mark=to_pppoe-out2
add check-gateway=ping distance=1 gateway=pppoe-1 routing-mark=to_ether1
add check-gateway=ping distance=2 gateway=pppoe-2 routing-mark=to_ether2
add distance=1 gateway=pppoe-1
add distance=2 gateway=pppoe-2

/ip route rule
add action=drop dst-address=172.16.0.0/24 src-address=10.0.0.0/23
add action=drop dst-address=10.0.0.0/23 src-address=172.16.0.0/24

/ip service
set telnet disabled=yes
set ftp disabled=yes
set www port=8980
set ssh disabled=yes
set api-ssl disabled=yes
/ip upnp
set enabled=yes
/system clock
set time-zone-name=Europe/Madrid
/system clock manual
set dst-end="jan/01/2017 00:00:00" dst-start="jan/01/2017 00:00:00"
/system ntp client
set enabled=yes primary-ntp=213.251.52.234 secondary-ntp=158.227.98.15  

thanks for all