Im getting 2 new connection, And I wanted to "try" a config before the guy come here and install both connection so it can be done in a few min.
For easy understanding, I will be using testRouter for the router im trying to do load balancing on
and just router for the main router we got here at the moment.
Both are mikrotik
So what i did is I connected my testRouter on my router using two port off my testRouter asigned 2 ip, one for each port.
192.168.3.6 and 192.168.3.7
Then I used this tutorial http://wiki.mikrotik.com/wiki/Improved_ ... e_Gateways
at one point I had a hickup, for some reason in that guide they are using nth with 3 number, I can only enter 2
So, I think i managed good, I used 2,1 as it seam to split the traffic equally
Now there is one thing different from that tutorial and my situation, I have 2 local network. and internet has to be shared and load balance for those 2 network.
Any how, I can't get it to work, and I don't really know how to diagnose what is not working.
From my understanding I think its because of the masquerade rules I inserted, But i think I need those as i will not know what ip il get from the isp as il be put on a dhcp
if I look at my mangle rules couters traffic look to be split up okay This is my config
Code: Select all
/interface bridge
add name=Network_1
add name=Network_2
/interface ethernet
set [ find default-name=ether4 ] name=ISP_1
set [ find default-name=ether5 ] name=ISP_2
/interface wireless
set [ find default-name=wlan1 ] band=2ghz-b rx-chains=0 tx-chains=0
/ip ipsec proposal
set [ find default=yes ] enc-algorithms=3des
/ip pool
add name=Network_1 ranges=192.168.10.10-192.168.10.250
add name=Network_2 ranges=192.168.11.10-192.168.11.250
/ip dhcp-server
add address-pool=Network_1 disabled=no interface=Network_1 name=Network_1
add address-pool=Network_2 disabled=no interface=Network_2 name=Network_2
/system logging action
set 0 memory-lines=100
set 1 disk-lines-per-file=100
/interface bridge port
add bridge=Network_1 interface=wlan1
add bridge=Network_1 interface=ether2
add bridge=Network_2 interface=ether3
/ip address
add address=192.168.3.6/24 interface=ISP_2 network=192.168.3.0
add address=192.168.10.1/24 interface=Network_1 network=192.168.10.0
add address=192.168.3.7/24 interface=ISP_1 network=192.168.3.0
add address=192.168.11.1/24 interface=Network_2 network=192.168.11.0
/ip dhcp-client
add default-route-distance=0 dhcp-options=hostname,clientid interface=ISP_2
/ip dhcp-server network
add address=192.168.10.0/24 dns-server=192.168.10.1 gateway=192.168.10.1
add address=192.168.11.0/24 dns-server=192.168.11.1 gateway=192.168.11.1
/ip dns
set allow-remote-requests=yes servers=8.8.8.8
/ip firewall mangle
add action=passthrough chain=prerouting dst-address=!192.168.0.0/16 in-interface=Network_1
add action=mark-connection chain=prerouting connection-state=new dst-address=!192.168.0.0/16 in-interface=Network_1 new-connection-mark=OddConnection nth=2,1
add action=mark-connection chain=prerouting connection-state=new dst-address=!192.168.0.0/16 in-interface=Network_2 new-connection-mark=OddConnection nth=2,1
add action=mark-connection chain=prerouting connection-state=new dst-address=!192.168.0.0/16 in-interface=Network_1 new-connection-mark=EvenConnection nth=2,2
add action=mark-connection chain=prerouting connection-state=new dst-address=!192.168.0.0/16 in-interface=Network_2 new-connection-mark=EvenConnection nth=2,2
add action=mark-routing chain=prerouting connection-mark=OddConnection new-routing-mark=OddRoute
add action=mark-routing chain=prerouting connection-mark=EvenConnection new-routing-mark=EvenRoute
/ip firewall nat
add action=masquerade chain=srcnat out-interface=ISP_1 routing-mark=OddRoute
add action=masquerade chain=srcnat out-interface=ISP_2 routing-mark=EvenRoute
/ip route
add distance=1 gateway=ISP_1 routing-mark=OddRoute
add distance=1 dst-address=192.168.3.0/24 gateway=ISP_1 routing-mark=OddRoute scope=10
add distance=1 gateway=ISP_2 routing-mark=EvenRoute
add distance=1 dst-address=192.168.3.0/24 gateway=ISP_2 routing-mark=EvenRoute scope=10
add distance=1 gateway=192.168.3.1
Thanks in advance.