Community discussions

MUM Europe 2020
just joined
Topic Author
Posts: 5
Joined: Tue May 30, 2006 6:52 pm

The 2 gateways issue.

Tue Nov 21, 2006 8:16 pm

Hi there. After reading the all the foruns related with this issue, none worked for me.
I use a RB532 with 2 internet connectios. On ether1 i connect to the lan ( on ether2 ( i connect it to an adsl router A( and the ether3 ( i connect it to another adsl router B (

I tried adding the gateways to 2:1 (repeating the gateway ips), but the traffic always goes out throw ether2. Ether3 is almost dead.

I tried this solution ... light=ecmp

and the odd / even packet solution, but the damn gateway that reaches the internet is the adsl router A ip.

My configurations:

[admin@MikroTik] ip route> print
Flags: X - disabled, A - active, D - dynamic,
C - connect, S - static, r - rip, b - bgp, o - ospf
0 ADC ether1
1 ADC ether3
2 ADC ether2
3 A S r ether2
4 A S r ether3
5 A S r ether2

[admin@MikroTik] ip firewall nat> print
Flags: X - disabled, I - invalid, D - dynamic
0 X ;;; masquerade hotspot network
chain=srcnat src-address= action=masquerade

1 chain=srcnat connection-mark=odd action=src-nat to-addresses= to-ports=0-65535
2 chain=srcnat connection-mark=even action=src-nat to-addresses= to-ports=0-65535

[admin@MikroTik] > ip route print
0 chain=prerouting in-interface=ether1 src-address-list=odd
action=mark-connection new-connection-mark=odd passthrough=yes
1 chain=prerouting in-interface=ether1 src-address-list=odd
action=mark-routing new-routing-mark=odd passthrough=yes
2 chain=prerouting in-interface=ether1 src-address-list=even
action=mark-connection new-connection-mark=even passthrough=yes
3 chain=prerouting in-interface=ether1 src-address-list=even
action=mark-routing new-routing-mark=even passthrough=yes
4 chain=prerouting in-interface=ether1 connection-state=new nth=1,1,0
action=mark-connection new-connection-mark=odd passthrough=yes
5 chain=prerouting in-interface=ether1 connection-mark=odd
action=add-src-to-address-list address-list=odd address-list-timeout=1d
6 chain=prerouting in-interface=ether1 connection-mark=odd
action=mark-routing new-routing-mark=odd passthrough=no
7 chain=prerouting in-interface=ether1 connection-state=new nth=1,1,1
action=mark-connection new-connection-mark=even passthrough=yes
8 chain=prerouting in-interface=ether1 connection-mark=even
action=add-src-to-address-list address-list=even address-list-timeout=1d
9 chain=prerouting in-interface=ether1 connection-mark=even
action=mark-routing new-routing-mark=even passthrough=no

I checked all the wiki info in and nothing worked. The routers are regular adsl routers with dynamic public ip and a chosen local ip. I´m using hotspot too.

Any help would be apreciated.
User avatar
Member Candidate
Member Candidate
Posts: 188
Joined: Fri Feb 03, 2006 6:33 am
Location: New Zealand

Wed Nov 22, 2006 3:57 am

Hi there,

Can anyone shed light on this, I also have tried the all examples given in the Wiki, even the connection tracking. Problem is, any LAN ip can gain both "odd" and "even" marks, from there its square one. Broken SSL sessions etc. same for nth packet marking.

Is ROS v3 intending to have a specific function for dual wan?

Keep tryin' its bound to work!!
ROOT@COSMOS> Reality.sys corrupted -- Reboot Universe (Y/N)?
User avatar
Long time Member
Long time Member
Posts: 600
Joined: Wed Mar 02, 2005 5:06 am
Location: Maine

Wed Nov 22, 2006 5:03 am

You could route via one connection and through the other connection for some crude outgoing balancing. And setup a higher metric for the other connection as a backup.
just joined
Posts: 14
Joined: Fri Aug 11, 2006 12:02 pm


Tue Nov 28, 2006 9:42 pm

can you be little more clear....

I am also facing the same problem
User avatar
Posts: 375
Joined: Thu Jun 08, 2006 7:20 am
Location: Escalon, CA

Wed Nov 29, 2006 9:15 am

This would be your best place to start. By what it sounds like you are trying to do load balancing between two separate internet sources correct?
just joined
Posts: 14
Joined: Fri Aug 11, 2006 12:02 pm

2 gateway Issue

Wed Nov 29, 2006 11:56 am

yes i have internet from 2 different sources...
Long time Member
Long time Member
Posts: 648
Joined: Fri Dec 17, 2004 2:52 pm

Wed Nov 29, 2006 4:20 pm

I was looking over your config print above - looks like your rules are all out of order - the order of the rules is just as important as the rules. Next - you have 'passthrough' on a few that shouldn't and nth - it's important to get the numbers 'right' otherwise the rules get processed incorrectly.

I have to assume that you are using this URL:

To write the above config (this one looks the closest), for you to use one of the gateways twice just add a whole segment of rules (based on the URL above) - I use the tags - one , two, three - but you can of course use anything you want for the tags - just be consistant.


Who is online

Users browsing this forum: hngjared, Jobinuw, MSN [Bot], Xtremer and 98 guests