Community discussions

MUM Europe 2020
 
pd
newbie
Topic Author
Posts: 26
Joined: Thu Jan 12, 2006 10:46 pm

Load Balancing 2 internet "providers" at the same subnet

Wed Jul 25, 2012 3:05 pm

Altough I looked I could not find a working solution.

I have 2 routers at my network with access to different internet "lines" . Please look at the drawing
(one is a DSL modem) and the other an "internet box" . Both are at the same subnet and for a good
reason I CAN NOT put them at 2 different ethernet ports of my mikrotik box.

I want to load balance both lines on my own network (2 or 3 different machines). I do not want each
machine using a different line but all the internet connections spread across the 2 internet gateways.

I looked at the wiki (http://wiki.mikrotik.com/wiki/Manual:PCC ) but this works only if I have 2 different physical ports feeding directly the mikrotik box (each one with different internet line). Now that I have just different IPs (gateways of the same network) feeding internet how can I do pcc load balancing?

The following part is from the wiki but I do not have 2 incoming interfaces (ISP1 and ISP2) but two different
IPs (192.168.100.2 and 192.168.100.1)

add chain=prerouting dst-address=10.111.0.0/24 action=accept in-interface=LAN
add chain=prerouting dst-address=10.112.0.0/24 action=accept in-interface=LAN
add chain=prerouting in-interface=ISP1 connection-mark=no-mark action=mark-connection \
new-connection-mark=ISP1_conn
add chain=prerouting in-interface=ISP2 connection-mark=no-mark action=mark-connection \
new-connection-mark=ISP2_conn
add chain=prerouting in-interface=LAN connection-mark=no-mark dst-address-type=!local \
per-connection-classifier=both-addresses:2/0 action=mark-connection new-connection-mark=ISP1_conn
add chain=prerouting in-interface=LAN connection-mark=no-mark dst-address-type=!local \
per-connection-classifier=both-addresses:2/1 action=mark-connection new-connection-mark=ISP2_conn
add chain=prerouting connection-mark=ISP1_conn in-interface=LAN action=mark-routing \
new-routing-mark=to_ISP1
add chain=prerouting connection-mark=ISP2_conn in-interface=LAN action=mark-routing \
new-routing-mark=to_ISP2
add chain=output connection-mark=ISP1_conn action=mark-routing new-routing-mark=to_ISP1
add chain=output connection-mark=ISP2_conn action=mark-routing new-routing-mark=to_ISP2

Thank you
You do not have the required permissions to view the files attached to this post.
 
pd
newbie
Topic Author
Posts: 26
Joined: Thu Jan 12, 2006 10:46 pm

Re: Load Balancing 2 internet "providers" at the same subnet

Wed Jul 25, 2012 7:32 pm

Actually my problem is solved if I find a way to mark an internet connection coming through a specific gateway (IP of my internet box) instead of marking
it coming through a specific mikrotik ethernet port.

Any ideas?

I am trying to find a way to replace IN-interface=ISP1 at the following line:

add chain=prerouting in-interface=ISP1 connection-mark=no-mark action=mark-connection new-connection-mark=ISP1_conn

Who is online

Users browsing this forum: jdpaniagua, MSN [Bot] and 43 guests