help, i have trouble to configure load balancing in microtik i have read http://wiki.mikrotik.com/wiki/Load_Balancing but the different i using adsl connection and the other connection using sdsl connection via winproxy connect client to internet i using pppoe client, anyone who expert in load balancing thanks. [sorry my english bad i’m indonesian]
Check out this topic:
Static Equal Cost Multi-Path routing
at http://www.mikrotik.com/testdocs/ros/2.9/ip/route.php
Load balancing has sense just if you have both links the same capacity, otherwise you should probably use policy based routing.
sorry to ask again,
i’m using 4 lan card
- IP LAN 192.168.0.1
- IP MODEM 192.168.0.253 —> IP MODEM 192.168.168.254
when connected using GATEWAY 125.163.xxx.1 - IP TO WINPROXY 192.168.0.252 —> IP GATEWAY 192.168.0.200
- IP EMPTY 192.168.0.251
i connect to internet via ADSL using ppoe client
DNS primary and secondary using DNS from ADSL and using Allow Remote Requests
/ip route print
#…DST-ADDRESS…PREF-SRC…G GATEWAY…DIS
0.ADC.125.163.XXX.1/32…125.163.XXX.XXX
1.ADC.192.168.0.0/24…192.168.0.253
2…DC.192.168.0.0/24…192.168.0.1
3…DC.192.168.0.0/24…192.168.0.252
4…DC.192.168.0.0/24…192.168.0.251
5.A..S..0.0.0.0/0…r…125.163.XXX.1
i can’t ping to gateway 192.168.0.200 from router, why and
is there i have wrong route table ???
You can’t use the same C-class on all 4 nic’s, you have either to split this class 192.168.0.0/24 to four subclasses or to use different C networks, let’s say:
192.168.1.1/24
192.168.2.1/24
192.168.3.1/24
192.168.4.1/24
thx i have change class for all nic
i have sucess configure load balancing according to example
but i have new problem,
- from router i can ping to gateway both isp, but when i ping form client i cannot ping to anywhere
- connection rather lag
- mean i choose load balancing, want to improve connection in my network and to handle if one of connection is broken
Did you set local IP of your router as default gateway on each machine? If so, ping should work. Send us your new configuration.
my client use gateway and dns 192.168.0.1
ip route
gateway 1 125.163.xxx.xxx
gateway 2 192.168.2.1
ip firewall nat
srcnat src.address 192.168.0.0/24 action to address 125.163.xxx.xxx
srcnat src.address 192.168.0.0/24 action to address masquerade
better use print or export command to show us you configuration.
here my configuration
/ interface ethernet
set "ether1 - LAN" name="ether1 - LAN" mtu=1500 mac-address=00:C0:26:AA:8C:AF \
arp=enabled disable-running-check=yes auto-negotiation=yes full-duplex=yes \
cable-settings=default speed=100Mbps comment="" disabled=no
set ether2 name="ether2" mtu=1500 mac-address=00:80:48:19:FD:AF arp=enabled \
disable-running-check=yes auto-negotiation=yes full-duplex=yes \
cable-settings=default speed=100Mbps comment="" disabled=no
set "ether3 - MELSA via WINPROXY" name="ether3 - MELSA via WINPROXY" mtu=1500 \
mac-address=00:80:48:1A:5D:CC arp=enabled disable-running-check=yes \
auto-negotiation=yes full-duplex=yes cable-settings=default speed=100Mbps \
comment="" disabled=no
set "ether4 - MODEM" name="ether4 - MODEM" mtu=1500 \
mac-address=00:00:21:F4:72:F4 arp=enabled disable-running-check=yes \
auto-negotiation=yes full-duplex=yes cable-settings=default speed=100Mbps \
comment="" disabled=no
/ interface pppoe-client
add name="SPEEDY" max-mtu=1480 max-mru=1480 interface="ether4 - MODEM" \
user="xxxx@xxxx.xxx" password="xxxxxxxx" \
profile=pppoe-client-default service-name="" ac-name="" \
add-default-route=no dial-on-demand=no use-peer-dns=no \
allow=pap,chap,mschap1,mschap2 disabled=no
/ ip address
add address=192.168.0.1/24 network=192.168.0.0 broadcast=192.168.0.255 \
interface="ether1 - LAN" comment="" disabled=no
add address=192.168.0.252/24 network=192.168.0.0 broadcast=192.168.0.255 \
interface=ether2 comment="" disabled=no
add address=192.168.2.2/24 network=192.168.2.0 broadcast=192.168.2.255 \
interface="ether3 - MELSA via WINPROXY" comment="" disabled=no
add address=192.168.1.2/24 network=192.168.1.0 broadcast=192.168.1.255 \
interface="ether4 - MODEM" comment="" disabled=no
/ ip route
add dst-address=0.0.0.0/0 gateway=125.xxx.xxx.1 check-gateway=ping scope=255 \
target-scope=10 comment="" disabled=no
add dst-address=0.0.0.0/0 gateway=192.168.2.1 check-gateway=ping scope=255 \
target-scope=10 routing-mark=odd comment="" disabled=no
add dst-address=0.0.0.0/0 gateway=125.xxx.xxx.1 scope=255 target-scope=10 \
routing-mark=even comment="" disabled=no
/ ip firewall nat
add chain=srcnat out-interface=SPEEDY src-address=192.168.0.0/24 \
connection-mark=even action=src-nat to-addresses=125.xxx.xxx.xxx \
to-ports=0-65535 comment="CLIENT CONNECT INTERNET via SPEEDY" \
disabled=no
add chain=srcnat src-address=192.168.0.0/24 connection-mark=odd \
action=masquerade comment="masquerade MELSA via WINPROXY" disabled=no
add chain=dstnat protocol=tcp dst-port=80 action=redirect to-ports=8080 \
comment="REDIRECT TO WEB PROXY" disabled=no
add chain=srcnat out-interface="ether1 - LAN" dst-address=192.168.0.0/24 \
action=src-nat to-addresses=192.168.0.1 to-ports=0-65535 comment="LOCAL \
CAN FORWARD TO STATIC IP" disabled=no
/ ip firewall mangle
add chain=prerouting in-interface="ether1 - LAN" nth=1,1,0 \
action=mark-connection new-connection-mark=odd passthrough=yes comment="" \
disabled=no
add chain=prerouting in-interface="ether1 - LAN" connection-mark=odd \
action=mark-routing new-routing-mark=odd passthrough=no comment="" \
disabled=no
add chain=prerouting in-interface="ether1 - LAN" connection-state=new \
nth=1,1,1 action=mark-connection new-connection-mark=even passthrough=yes \
comment="" disabled=no
add chain=prerouting in-interface="ether1 - LAN" connection-mark=even \
action=mark-routing new-routing-mark=even passthrough=no comment="" \
disabled=no
Your Winproxy Gateway must also be configured with static routes to your clients subnet, otherwise, this gateway will not know where to send the packets.