Page 1 of 1
frequent changing of gateway in load balancing
Posted: Sat Mar 09, 2013 10:19 pm
by krisan
I have two internet service provider running on my network. I configured Load Balancing on RB439AH which enables the two link to run simultaneously. But the issue now is that when you lauch a website it may use ISP1 gateway to get the content, if you click on a link still on that same website it will use ISP2 gateway to fetch the content. This changing of gateway ip address everytime has made some website difficult to access.
Please i need someone to help me with some tips on house to solve this problem.
Attach is the configuration on my load balancing router.
Re: frequent changing of gateway in load balancing
Posted: Sat Mar 09, 2013 11:42 pm
by lukkes
if you are using pcc you should use a connection classifier Both-Addresses,
add action=mark-connection chain=prerouting comment="balance conn $routemark" \
disabled=no dst-address-type=!local in-interface=bridge1 \
new-connection-mark="$routemark" passthrough=yes per-connection-classifier= "both-addresses:$activeroutes/$divs"
this MUST resolve your problem
Re: frequent changing of gateway in load balancing
Posted: Sun Mar 10, 2013 3:56 pm
by krisan
if you are using pcc you should use a connection classifier Both-Addresses,
add action=mark-connection chain=prerouting comment="balance conn $routemark" \
disabled=no dst-address-type=!local in-interface=bridge1 \
new-connection-mark="$routemark" passthrough=yes per-connection-classifier= "both-addresses:$activeroutes/$divs"
this MUST resolve your problem
Thank yo so much i will try it and get back to you.
Re: frequent changing of gateway in load balancing
Posted: Sun Mar 10, 2013 11:12 pm
by krisan
I have change the per-connection-classifier to "both addresses, i noticed that the IP address are no longer changing. But another problem i noticed now is that ISP2 which is 4M seems to be carrying traffic more than the ISP1 that is 10M. I want clients to pass through the 10M more than the 4M. what do i need to do to solve this issue?
frequent changing of gateway in load balancing
Posted: Sun Mar 10, 2013 11:30 pm
by syadnom
That isn't a perfect solution, if a site is served by multiple servers, a click could cause a new connection on the alternate ISP.
The only way to ensure compatability is to do src address only in PCC, isolating each device to a specific ISP.
Re: frequent changing of gateway in load balancing
Posted: Mon Mar 11, 2013 9:55 pm
by krisan
That isn't a perfect solution, if a site is served by multiple servers, a click could cause a new connection on the alternate ISP.
The only way to ensure compatability is to do src address only in PCC, isolating each device to a specific ISP.
Please can you give me the configuration on the src address you are suggesting.
Re: frequent changing of gateway in load balancing
Posted: Tue Mar 12, 2013 6:02 am
by lukkes
I have change the per-connection-classifier to "both addresses, i noticed that the IP address are no longer changing. But another problem i noticed now is that ISP2 which is 4M seems to be carrying traffic more than the ISP1 that is 10M. I want clients to pass through the 10M more than the 4M. what do i need to do to solve this issue?
changing the pcc classifier will works simply PERFECT with the problems of the banks and other websites, the other problem you say its because maybe there is more downloading connections on the isp2, but this behavior must not be constant you should see a speed changing every time, in order to pass more traffic for one interface you should mark two or tre more connections in the mangle for the connection, now you are using 2/0 mar route isp1, 2/1 mar route isp2, but you should 4/0 route 1, 4/1 route 1, 4/2 route 1, 4/3 route 2, this will send three streams for isp1 and just only one for the isp2, you can play with this and adapt to you