Community discussions

MUM Europe 2020
 
xraver
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 (10.0.1.1) on ether2 (192.168.1.2) i connect it to an adsl router A(192.168.1.1) and the ether3 (192.168.0.2) i connect it to another adsl router B (192.168.0.1)

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 http://forum.mikrotik.com/viewtopic.php ... 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
# DST-ADDRESS PREF-SRC G GATEWAY DISTANCE INTERFACE
0 ADC 10.0.1.0/24 10.0.1.1 ether1
1 ADC 192.168.0.0/24 192.168.0.3 ether3
2 ADC 192.168.1.0/24 192.168.1.3 ether2
3 A S 0.0.0.0/0 r 192.168.1.1 ether2
4 A S 0.0.0.0/0 r 192.168.0.1 ether3
5 A S 0.0.0.0/0 r 192.168.1.1 ether2

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

1 chain=srcnat connection-mark=odd action=src-nat to-addresses=192.168.1.1 to-ports=0-65535
2 chain=srcnat connection-mark=even action=src-nat to-addresses=192.168.0.1 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 http://wiki.mikrotik.com/wiki/Routing 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
airstream
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?

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

Wed Nov 22, 2006 5:03 am

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

Hi JP

Tue Nov 28, 2006 9:42 pm

can you be little more clear....

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

Wed Nov 29, 2006 9:15 am

http://wiki.mikrotik.com/wiki/Load_Balancing

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?
 
sishith
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...
 
galaxynet
Long time Member
Long time Member
Posts: 648
Joined: Fri Dec 17, 2004 2:52 pm
Contact:

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: http://wiki.mikrotik.com/wiki/Load_Balancing_Persistent

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.

Thom

Who is online

Users browsing this forum: Google [Bot] and 112 guests