Hi everybody,
this is my first attempt to push my very limited experience with mikrotik router os.
I have a small office with two separate ISP provider and I’d like to setup the mikrotik router HPA ac3 as load balancer between them. I understood that PPC should be the best option in this application.
Following configuration adapted from mikrotik wiki works but has couple of limitation:
- it relais on ISP modems for connection. At least with EOLO network (secondary) I’d like to configure PPPoE configuration directly on HAP;
- it use secondary network only if the ISP modem die, but if they have connection slow down still try to send all traffic on first connection. how could improve the “routes” lines below?
#remember to remove ether1 and ether2 from default bridge
/ip address
add address=10.10.4.2/24 interface=ether1_LINKEM network=10.10.4.0
add address=10.10.5.2/24 interface=ether2_EOLO network=10.10.5.0
# internal network
add address=192.168.99.1/24 interface=bridge-local network=192.168.99.0
/routing table
add disabled=no fib name=LINKEM_table
add disabled=no fib name=EOLO_table
/ip firewall mangle
add action=accept chain=prerouting dst-address=10.10.4.0/24 in-interface=bridge-local
add action=accept chain=prerouting dst-address=10.10.5.0/24 in-interface=bridge-local
add action=mark-connection chain=input connection-state=new in-interface=ether1_LINKEM new-connection-mark=LINKEM
add action=mark-connection chain=input connection-state=new in-interface=ether2_EOLO new-connection-mark=EOLO
add action=mark-connection chain=output connection-mark=no-mark connection-state=new new-connection-mark=LINKEM passthrough=yes per-connection-classifier=both-addresses:2/0
add action=mark-connection chain=output connection-mark=no-mark connection-state=new new-connection-mark=EOLO per-connection-classifier=both-addresses:2/1
add action=mark-connection chain=prerouting connection-mark=no-mark connection-state=new dst-address-type=!local in-interface=bridge-local new-connection-mark=LINKEM per-connection-classifier=both-addresses:2/0
add action=mark-connection chain=prerouting connection-mark=no-mark connection-state=new dst-address-type=!local in-interface=bridge-local new-connection-mark=EOLO per-connection-classifier=both-addresses:2/1
add action=mark-routing chain=output connection-mark=LINKEM new-routing-mark=LINKEM_table
add action=mark-routing chain=prerouting connection-mark=LINKEM in-interface=bridge-local new-routing-mark=LINKEM_table
add action=mark-routing chain=output connection-mark=EOLO new-routing-mark=EOLO_table
add action=mark-routing chain=prerouting connection-mark=EOLO in-interface=bridge-local new-routing-mark=EOLO_table
# this should be better to test directly some outside server and not internal modem
/ip route
add check-gateway=ping disabled=no dst-address=0.0.0.0/0 gateway=10.10.4.1 routing-table=LINKEM_table suppress-hw-offload=no
add check-gateway=ping disabled=no dst-address=0.0.0.0/0 gateway=10.10.5.1 routing-table=EOLO_table suppress-hw-offload=no
add distance=1 dst-address=0.0.0.0/0 gateway=10.10.4.1
add distance=2 dst-address=0.0.0.0/0 gateway=10.10.5.1
/ip firewall nat
add action=masquerade chain=srcnat out-interface=ether1_LINKEM
add action=masquerade chain=srcnat out-interface=ether2_EOLO
I was able to setup the PPPoE connection on secondary ISP as follow, but then I’m stuck in changing lines above because I don’t a fixed IP address from PPPoE connection
interface pppoe-client add interface=ether2_EOLO password=MyPassword service-name=pppoeEOLO name=PPPoE-Out disabled=no user=MyUsername
I’d appreciate if anyone could point me to right documentation / how-to to fix this. Thank you