Page 1 of 1
LoadBalance disconnect my messengers after every 10 minutes
Posted: Tue Mar 24, 2009 11:02 pm
by Muhammad
Router OS 3.17
load-balance working very well butt disconnect my messengers after every 10 to 15 minutes and automatic reconnect
yahoo, msn messengers or some software's
My Configuration
/ ip firewall nat
add chain=srcnat out-interface=wan1 action=masquerade
add chain=srcnat out-interface=wan2 action=masquerade
/ ip firewall mangle
add chain=input in-interface=wan1 action=mark-connection new-connection-mark=wan1_conn
add chain=input in-interface=wan2 action=mark-connection new-connection-mark=wan2_conn
add chain=output connection-mark=wan1_conn action=mark-routing new-routing-mark=to_wan1
add chain=output connection-mark=wan2_conn action=mark-routing new-routing-mark=to_wan2
/ ip route
add dst-address=0.0.0.0/0 gateway=192.168.20.254 routing-mark=to_wan1
add dst-address=0.0.0.0/0 gateway=192.168.10.254 routing-mark=to_wan2
add dst-address=0.0.0.0/0 gateway=192.168.20.254,192.168.10.254 check-gateway=ping
where my mistake?
plz tell me
Thanks
Re: LoadBalance disconnect my messengers after every 10 minutes
Posted: Wed Mar 25, 2009 2:51 am
by Chupaka
where's your load-balance configuration?..
Re: LoadBalance disconnect my messengers after every 10 minutes
Posted: Wed Mar 25, 2009 7:27 pm
by Muhammad
where's your load-balance configuration?..
i already wright Load Balance configuration if its not good or wrong plz tell me, plz check again
Re: LoadBalance disconnect my messengers after every 10 minutes
Posted: Wed Mar 25, 2009 8:02 pm
by Chupaka
just ECMP routing? =)
what is your tcp-established timeout in Connection tracking?
p.s. ECMP is not good for messengers, imho...
Re: LoadBalance disconnect my messengers after every 10 minutes
Posted: Wed Mar 25, 2009 8:23 pm
by Muhammad
just ECMP routing? =)
what is your tcp-established timeout in Connection tracking?
p.s. ECMP is not good for messengers, imho...
ohh plz give me right script
thanks
Re: LoadBalance disconnect my messengers after every 10 minutes
Posted: Wed Mar 25, 2009 8:28 pm
by Muhammad
hello
my network
wan1 10.0.1.1
wan2 10.0.2.1
lan (pppoe clints just) 192.168.100.0
OS 3.17
plz give me good script for Load Balance
i check already wiki but its not work properly
Thanks
Re: LoadBalance disconnect my messengers after every 10 minutes
Posted: Wed Mar 25, 2009 8:31 pm
by Chupaka
what is your tcp-established timeout in Connection tracking?
Re: LoadBalance disconnect my messengers after every 10 minutes
Posted: Wed Mar 25, 2009 9:11 pm
by Muhammad
what is your tcp-established timeout in Connection tracking?
sorry i am bigner, you meens /ip firewall conections /tracking ?
ther is default setings
Re: LoadBalance disconnect my messengers after every 10 minutes
Posted: Wed Mar 25, 2009 9:26 pm
by Muhammad
what is your tcp-established timeout in Connection tracking?
sorry i am bigner, you meens /ip firewall conections /tracking ?
ther is default setings
Re: LoadBalance disconnect my messengers after every 10 minutes
Posted: Thu Mar 26, 2009 1:40 am
by Chupaka
Re: LoadBalance disconnect my messengers after every 10 minutes
Posted: Thu Mar 26, 2009 10:43 pm
by Muhammad
that is my Configuration
/ ip firewall nat
add chain=srcnat out-interface=wan1 action=masquerade
add chain=srcnat out-interface=wan2 action=masquerade
/ ip firewall mangle
add chain=input in-interface=wan1 action=mark-connection new-connection-mark=wan1_conn
add chain=input in-interface=wan2 action=mark-connection new-connection-mark=wan2_conn
add chain=output connection-mark=wan1_conn action=mark-routing new-routing-mark=to_wan1
add chain=output connection-mark=wan2_conn action=mark-routing new-routing-mark=to_wan2
/ ip route
add dst-address=0.0.0.0/0 gateway=192.168.20.254 routing-mark=to_wan1
add dst-address=0.0.0.0/0 gateway=192.168.10.254 routing-mark=to_wan2
add dst-address=0.0.0.0/0 gateway=192.168.20.254,192.168.10.254 check-gateway=ping
that is on wiki site (
http://wiki.mikrotik.com/wiki/Load_Balancing_Persistent)
/ ip route
add dst-address=0.0.0.0/0 gateway=10.111.0.1,10.112.0.1 check-gateway=ping
/ ip firewall nat
add chain=srcnat out-interface=wlan1 action=masquerade
add chain=srcnat out-interface=wlan2 action=masquerade
/ ip firewall mangle
add chain=input in-interface=wlan1 action=mark-connection new-connection-mark=wlan1_conn
add chain=input in-interface=wlan2 action=mark-connection new-connection-mark=wlan2_conn
add chain=output connection-mark=wlan1_conn action=mark-routing new-routing-mark=to_wla1
add chain=output connection-mark=wlan1_conn action=mark-routing new-routing-mark=to_wla2
/ ip route
add dst-address=0.0.0.0/0 gateway=10.111.0.1 routing-mark=to_wla1
add dst-address=0.0.0.0/0 gateway=10.111.0.2 routing-mark=to_wla2
not a big difference with my configuration or wiki site
but its not working properly
plz give me other configuration script or any other idia?
thanks
Re: LoadBalance disconnect my messengers after every 10 minutes
Posted: Thu Mar 26, 2009 10:54 pm
by Muhammad
i am using 3.17
but i also try 3.22
and other RouterBoard also
problam same, messengers disconect after few minuts
give me any idea how to resolve this problem
Re: LoadBalance disconnect my messengers after every 10 minutes
Posted: Thu Mar 26, 2009 10:58 pm
by ValeriyZ
I have a similar problem. Absolutely correct konfig and result as for you, one time a precipice goes per 10-15 minutes.
For me a hope is on more stable version of Mikrotika or more correct rules of Load Balancing.
Re: LoadBalance disconnect my messengers after every 10 minutes
Posted: Fri Mar 27, 2009 1:13 am
by Chupaka
sorrrry, wrong link... can't find right example... there was something like
http://wiki.mikrotik.com/wiki/Load_Bala ... e_Gateways , but based on dynamic address-lists (with 'Nth' client gateway selection algorithm)...
maybe someone could help?..
Later:
Oh, I found it =) It was erased in older version of that page =( Try
http://wiki.mikrotik.com/index.php?titl ... oldid=5656
p.s. Who's Megis?.. Janis, is that you?.. Why no comments on that edit? Was that functionality built in RouterOS? Or it was always there, and using address-lists changes nothing, just complicates the setup?..
Re: LoadBalance disconnect my messengers after every 10 minutes
Posted: Fri Mar 27, 2009 10:04 am
by Muhammad
sorrrry, wrong link... can't find right example... there was something like
http://wiki.mikrotik.com/wiki/Load_Bala ... e_Gateways , but based on dynamic address-lists (with 'Nth' client gateway selection algorithm)...
maybe someone could help?..
Later:
Oh, I found it =) It was erased in older version of that page =( Try
http://wiki.mikrotik.com/index.php?titl ... oldid=5656
p.s. Who's Megis?.. Janis, is that you?.. Why no comments on that edit? Was that functionality built in RouterOS? Or it was always there, and using address-lists changes nothing, just complicates the setup?..
Thanks Chupaka
i try that link http://wiki.mikrotik.com/index.php?titl ... oldid=5656
that is work on Router OS 2.9.+ , but when i try in 3.17 or 3.22 and give this comand
'''/ ip firewall nat'''
add chain=srcnat connection-mark=odd action=src-nat to-addresses=10.111.0.2 \
to-ports=0-65535
add chain=srcnat connection-mark=even action=src-nat to-addresses=10.112.0.2 \
to-ports=0-65535
router give me 1 error, assign port udp or tcp
and when i assign port tcp, is working butt problam same messenger disconect after few minuts
any other idia?
Re: LoadBalance disconnect my messengers after every 10 minutes
Posted: Fri Mar 27, 2009 1:13 pm
by skillful
Thanks Chupaka
i try that link http://wiki.mikrotik.com/index.php?titl ... oldid=5656
that is work on Router OS 2.9.+ , but when i try in 3.17 or 3.22 and give this comand
'''/ ip firewall nat'''
add chain=srcnat connection-mark=odd action=src-nat to-addresses=10.111.0.2 \
to-ports=0-65535
add chain=srcnat connection-mark=even action=src-nat to-addresses=10.112.0.2 \
to-ports=0-65535
router give me 1 error, assign port udp or tcp
and when i assign port tcp, is working butt problam same messenger disconect after few minuts
any other idia?
Your src-nat rule will not function with udp traffic as presently composed. While don't you remove the to-ports and protocol. This will make sure that all traffic make with either even or odd connection marks go through the right interface irrespective of their protocol.
ip firewall nat
add action=src-nat chain=srcnat comment="" connection-mark=odd disabled=no to-addresses=10.111.0.2
add action=src-nat chain=srcnat comment="" connection-mark=even disabled=no to-addresses=10.112.0.2
Re: LoadBalance disconnect my messengers after every 10 minutes
Posted: Fri Mar 27, 2009 4:35 pm
by Chupaka
yep, in v3 you shouldn't use 'to-ports'
Re: LoadBalance disconnect my messengers after every 10 minutes
Posted: Fri Mar 27, 2009 4:39 pm
by Muhammad
yep, in v3 you shouldn't use 'to-ports'
when i assign port's tcp, is working butt problam same messenger disconect after few minuts
i need some more help!!!!!!!!!!!!!!!!!
thanks
Re: LoadBalance disconnect my messengers after every 10 minutes
Posted: Fri Mar 27, 2009 9:13 pm
by skillful
when i assign port's tcp, is working butt problam same messenger disconect after few minuts
i need some more help!!!!!!!!!!!!!!!!!
thanks
Remove "to-ports" and protocol=tcp from your src-nat rules! Read my earlier post above.
Re: LoadBalance disconnect my messengers after every 10 minutes
Posted: Sun May 24, 2009 9:53 am
by lonthong
mangle mesengger port than mark routing and make marking route from mesengger to one gateway..
Re: LoadBalance disconnect my messengers after every 10 minutes
Posted: Sun May 24, 2009 12:25 pm
by akmjahangir
You can try it. let us know the result.
1. ip address
add address=192.168.0.1/24 interface=LAN
add address=202.191.124.200/28 interface=wlan1
add address=202.191.127.162/28 interface=wlan2
2. ip firewall mangle
add chain=prerouting src-address-list=odd in-interface=LAN action=mark-connection
new-connection-mark=odd passthrough=yes
add chain=prerouting src-address-list=odd in-interface=LAN action=mark-routing
new-routing-mark=odd passthrough=no
add chain=prerouting src-address-list=even in-interface=LAN action=mark-connection
new-connection-mark=even passthrough=yes
add chain=prerouting src-address-list=even in-interface=LAN action=mark-routing
new-routing-mark=even passthrough=no
add chain=prerouting in-interface=LAN connection-state=new nth=2,1
action=mark-connection new-connection-mark=odd passthrough=yes
add chain=prerouting in-interface=LAN action=add-src-to-address-list
address-list=odd address-list-timeout=1d connection-mark=odd passthrough=yes
add chain=prerouting in-interface=LAN connection-mark=odd action=mark-routing
new-routing-mark=odd passthrough=no
add chain=prerouting in-interface=LAN connection-state=new nth=2,2
action=mark-connection new-connection-mark=even passthrough=yes
add chain=prerouting in-interface=LAN action=add-src-to-address-list
address-list=even address-list-timeout=1d connection-mark=even passthrough=yes
add chain=prerouting in-interface=LAN connection-mark=even action=mark-routing
new-routing-mark=even passthrough=no
3. ip firewall nat
add chain=srcnat out-interface=wlan1 action=masquerade
add chain=srcnat out-interface=wlan2 action=masquerade
4. ip route
add dst-address=0.0.0.0/0 gateway=202.191.124.193 routing-mark=odd
add dst-address=0.0.0.0/0 gateway=202.191.127.161 routing-mark=even
add dst-address=0.0.0.0/0 gateway=202.191.125.161
--------------------------------------------------------------------------------------
Re: LoadBalance disconnect my messengers after every 10 minutes
Posted: Sun May 24, 2009 10:50 pm
by chapex
ECMP flushing every 10 min . Try per traffic load balancing
http://wiki.mikrotik.com/wiki/Per-Traff ... _Balancing
regards
Re: LoadBalance disconnect my messengers after every 10 minutes
Posted: Mon May 25, 2009 1:59 am
by Chupaka