Community discussions

 
Ehman
Member
Member
Topic Author
Posts: 363
Joined: Mon Nov 15, 2010 10:49 pm

loadbalancing not working at all. plz help

Wed May 01, 2013 8:34 pm

can someone please help me, this is driving me mad, i cant make this pcc load balance work:


# jan/02/1970 00:10:19 by RouterOS 5.24
# software id = XPY8-IR0A
#
/ip hotspot user profile
set [ find default=yes ] idle-timeout=none keepalive-timeout=2m
/ip pool
add name=dhcp_pool1 ranges=10.10.10.2-10.10.10.254
/ip dhcp-server
add address-pool=dhcp_pool1 disabled=no interface=LAN name=dhcp1
/ip address
add address=10.10.10.1/24 interface=LAN
/ip dhcp-client
add add-default-route=no disabled=no interface=DEVPORT use-peer-dns=no \
use-peer-ntp=no
add default-route-distance=0 disabled=no interface=WAN1
add default-route-distance=0 disabled=no interface=WAN2
/ip dhcp-server network
add address=10.10.10.0/24 dns-server=10.10.10.1 gateway=10.10.10.1
/ip dns
set allow-remote-requests=yes
/ip firewall mangle
add action=mark-connection chain=input in-interface=WAN1 new-connection-mark=\
WAN1_conn
add action=mark-connection chain=input in-interface=WAN2 new-connection-mark=\
WAN2_conn
add action=mark-routing chain=output connection-mark=WAN1_conn \
new-routing-mark=to_WAN1
add action=mark-routing chain=output connection-mark=WAN2_conn \
new-routing-mark=to_WAN2
add chain=prerouting dst-address=192.168.0.0/24 in-interface=LAN
add chain=prerouting dst-address=192.168.6.0/24 in-interface=LAN
add action=mark-connection chain=prerouting dst-address-type=!local \
in-interface=LAN new-connection-mark=WAN1_conn per-connection-classifier=\
both-addresses-and-ports:2/0
add action=mark-connection chain=prerouting dst-address-type=!local \
in-interface=LAN new-connection-mark=WAN2_conn per-connection-classifier=\
both-addresses-and-ports:2/1
add action=mark-routing chain=prerouting connection-mark=WAN1_conn \
in-interface=LAN new-routing-mark=to_WAN1
add action=mark-routing chain=prerouting connection-mark=WAN2_conn \
in-interface=LAN new-routing-mark=to_WAN2
/ip firewall nat
add action=masquerade chain=srcnat out-interface=WAN1
add action=masquerade chain=srcnat out-interface=WAN2 to-addresses=0.0.0.0
/ip neighbor discovery
set ether4 disabled=no
/ip route
add check-gateway=ping distance=1 gateway=192.168.0.1 routing-mark=to_WAN1
add check-gateway=ping distance=1 gateway=192.168.6.1 routing-mark=to_WAN2
add check-gateway=ping distance=1 gateway=192.168.0.1
add check-gateway=ping distance=2 gateway=192.168.6.1

Source: http://aacable.wordpress.com/2011/06/04/mikrotik-4-wan-load-balance-pcc-complete-script-by-zaib/
 
User avatar
aacable
Member
Member
Posts: 423
Joined: Wed Sep 17, 2008 11:58 am
Location: ISLAMIC Republic of PAKISTAN
Contact:

Re: loadbalancing not working at all. plz help

Thu May 02, 2013 9:25 am

Just add hotspot=auth in every pcc rules and it will work like a charm.
For example . . .

/ip fi man

add action=mark-connection chain=prerouting disabled=no dst-address-type=!local hotspot=auth in-interface=LAN new-connection-mark=WAN1_conn passthrough=yes per-connection-classifier=both-addresses-and-ports:2/0

add action=mark-connection chain=prerouting disabled=no dst-address-type=!local hotspot=auth in-interface=LAN new-connection-mark=WAN2_conn passthrough=yes per-connection-classifier=both-addresses-and-ports:2/1

Source: http://aacable.wordpress.com/tag/mikrot ... h-hotspot/
_____________
Regard's

Syed Jahanzaib
Web: http://aacable.wordpress.com
Email: aacable [at] hotmail.com
 
Ehman
Member
Member
Topic Author
Posts: 363
Joined: Mon Nov 15, 2010 10:49 pm

Re: loadbalancing not working at all. plz help

Thu May 02, 2013 11:47 am

thx I'll try that and tell you if it worked, the thing is, it keeps on using WAN1 and forgets about WAN2, I've got 2 laptops to act as users to test out the first time I did this.

when I first tried out some config, I got like super fast speeds because the 2 connections somehow combined, but I didnt save that config, I were busy with something else.
 
Ehman
Member
Member
Topic Author
Posts: 363
Joined: Mon Nov 15, 2010 10:49 pm

Re: loadbalancing not working at all. plz help

Thu May 02, 2013 12:04 pm

I still get the same results after adding that stuff.. if I do a traceroute 8.8.8.8
I keeps on using WAN2 now, "192.168.6.1" ... it used to take turns on gateways, the first time I got it to work


# jan/02/1970 00:09:17 by RouterOS 5.24
# software id = XPY8-IR0A
#
/ip hotspot user profile
set [ find default=yes ] idle-timeout=none keepalive-timeout=2m
/ip pool
add name=dhcp_pool1 ranges=10.10.10.2-10.10.10.254
/ip dhcp-server
add address-pool=dhcp_pool1 disabled=no interface=LAN name=dhcp1
/ip address
add address=10.10.10.1/24 interface=LAN
/ip dhcp-client
add add-default-route=no disabled=no interface=DEVPORT use-peer-dns=no use-peer-ntp=no
add default-route-distance=0 disabled=no interface=WAN1
add default-route-distance=0 disabled=no interface=WAN2
/ip dhcp-server network
add address=10.10.10.0/24 dns-server=10.10.10.1 gateway=10.10.10.1
/ip dns
set allow-remote-requests=yes
/ip firewall mangle
add action=mark-connection chain=input in-interface=WAN1 new-connection-mark=WAN1_conn
add action=mark-connection chain=input in-interface=WAN2 new-connection-mark=WAN2_conn
add action=mark-routing chain=output connection-mark=WAN1_conn new-routing-mark=to_WAN1
add action=mark-routing chain=output connection-mark=WAN2_conn new-routing-mark=to_WAN2
add chain=prerouting dst-address=192.168.0.0/24 in-interface=LAN
add chain=prerouting dst-address=192.168.6.0/24 in-interface=LAN
add action=mark-routing chain=prerouting connection-mark=WAN1_conn in-interface=LAN \
new-routing-mark=to_WAN1
add action=mark-routing chain=prerouting connection-mark=WAN2_conn in-interface=LAN \
new-routing-mark=to_WAN2
add action=mark-connection chain=prerouting dst-address-type=!local hotspot=auth \
in-interface=LAN new-connection-mark=WAN1_conn per-connection-classifier=\
both-addresses-and-ports:2/0
add action=mark-connection chain=prerouting dst-address-type=!local hotspot=auth \
in-interface=LAN new-connection-mark=WAN2_conn per-connection-classifier=\
both-addresses-and-ports:2/1
/ip firewall nat
add action=masquerade chain=srcnat out-interface=WAN1
add action=masquerade chain=srcnat out-interface=WAN2 to-addresses=0.0.0.0
/ip neighbor discovery
set ether4 disabled=no
/ip route
add check-gateway=ping distance=1 gateway=192.168.0.1 routing-mark=to_WAN1
add check-gateway=ping distance=1 gateway=192.168.6.1 routing-mark=to_WAN2
add check-gateway=ping distance=1 gateway=192.168.0.1
add check-gateway=ping distance=2 gateway=192.168.6.1
 
Ehman
Member
Member
Topic Author
Posts: 363
Joined: Mon Nov 15, 2010 10:49 pm

Re: loadbalancing not working at all. plz help

Thu May 02, 2013 4:44 pm

It would be awesome if both WAN1 and WAN2 can combine and bond and give me the WAN1+WAN2= X speed

Who is online

Users browsing this forum: MSN [Bot] and 106 guests