Hello all,
How are you? Hope you’re all fine!
Please, I’m using mikrotik for some time I’m new to this forum and I need your help, becauseI don’t know how to fix this problem…
This is the scenario (please apologize for the “graphics”):
(Internet)
|
[ WAN1 GW - 10.0.1.1 ]
|
[WAN1 Interface IP Addr: 10.0.1.2 ] /
|
{RB493}
|
[WAN1 Interface IP Addr: 10.0.2.2 ]
|
[ WAN2 GW - 10.0.2.1 ]
|
(Internet)
The problem:
When I try to connect, from any external address (via the Internet), to any of the interfaces, the connection sometimes fails and in sometimes it happens (sometimes I have to try several times to get a connection) … this happens in a intermittent way… but when the connection is successful, it is stable … if I disconnect and try to connect again, I have to try several times again until connect.
When I test, removing all balancing and routing settings, the connections are successful… so I believe it’s a configuration problem, but I can’t find the problem, nor the solution… ![]()
I already tried several configurations with routing and even added routing rules (as can be seen below), but without success.
These are the Firewall, routing and routing rules examples of my configuration:
/interface ethernet
set [ find default-name=ether1 ] comment=“Intranet - ether1” name=LAN1
set [ find default-name=ether2 ] comment=“Internet1 - ether2” name=WAN1
set [ find default-name=ether3 ] comment=“Internet2 - ether3” name=WAN2
/ip address
add address=10.0.1.2/24 interface=WAN1 network=10.0.1.0
add address=10.0.2.2/24 interface=WAN2 network=10.0.2.0
add address=192.168.0.1/24 interface=LAN1 network=192.168.0.0
/ip firewall mangle
add action=mark-connection chain=input in-interface=WAN1 new-connection-mark=WAN1_conn passthrough=yes
add action=mark-connection chain=input in-interface=WAN2 new-connection-mark=WAN2_conn passthrough=yes
add action=mark-routing chain=output connection-mark=WAN1_conn new-routing-mark=to_WAN1 out-interface=WAN1 passthrough=yes
add action=mark-routing chain=output connection-mark=WAN2_conn new-routing-mark=to_WAN2 out-interface=WAN2 passthrough=yes
add action=mark-routing chain=prerouting connection-mark=WAN1_conn in-interface=LAN1 new-routing-mark=to_WAN1
add action=mark-routing chain=prerouting connection-mark=WAN2_conn in-interface=LAN1 new-routing-mark=to_WAN2
/ip firewall nat
add action=masquerade chain=srcnat comment=“Masquerade to WAN1” out-interface=WAN2
add action=masquerade chain=srcnat comment=“Masquerade to WAN2” out-interface=WAN1
/ip route
add check-gateway=arp distance=1 gateway=10.0.1.1 routing-mark=to_WAN1
add check-gateway=arp distance=1 gateway=10.0.2.1 routing-mark=to_WAN2
add check-gateway=arp distance=1 gateway=10.0.1.1
add check-gateway=arp distance=2 gateway=10.0.2.1
/ip route rule
add dst-address=0.0.0.0/0 routing-mark=to_WAN1 src-address=0.0.0.0/0 table=to_WAN1
add dst-address=0.0.0.0/0 routing-mark=to_WAN2 src-address=0.0.0.0/0 table=to_WAN2
Please, anyone here have experienced this problem or know how I can fix?
Thanks in advance!!
Best Regards
Fabio