2 x WAN + 2 x routers

Been using mikrotiks for a while now, great little routers.

Got something i need some advice with. I have a requirement to setup 2 routers to service 2 different LAN’s and 2 different WAN’s (bridged to 2 different modems going out to 2 different adsl connections).

What i want to do is specify that traffic for a certain internet destination on router A goes to router B and out its WAN (the traffic will then come back in router B from the net and it will be sent back over to router A and onto routers A’s LAN).

So i have the following setup

Router A 192.168.88.1

Router B 192.168.1.1

I want to tell router A traffic for (lets just use google as an example) 74.125.237.120 must route to router B and outs its WAN.

Then Router B must know that traffic coming from 74.125.237.120 must route back to router A and onto its LAN.

What would be the best way to go about this?

I tried a couple of things but had no luck. I tried prerouting and marking the packets and putting in some static routes but this didn’t seem to work.

Can anyone point me in the right direction here please?

If you want redirect only 1-3 addresses or ranges, you dont need marking.

Add this to use specific gateway for some IP(s) to router A
IP=IP of http://ip-lookup.net//ip route add dst-address=IP gateway=192.168.1.1Without this line I have my public IP … with this line I have ovpn server public IP

I dont know about your network… but
gateway must be reachable IP address of router B from router A

Router B must know where to send the traffic back, so it must have routes to source IP of connection:
set masquarade from router A to router B for those IP addresses.
/ip firewall nat add chain=srcnat out-interface=ether_to_router_B dst-address=IP action=masqueradeMove it before classic masquarade.
If you are using marking, then try disable or add accept rules for your dst IPs before all mangle rules.

Thats pretty much what i had in routes, traffic for IP in question was still going out router A.

Both routers could ping/talk to each other, i had some static routes in so they could talk to each other.

you can post more detailed config

Hi ya, so what i ended up doing was dumping the second router and just going with a single mikrotik router setup like the below

Adsl Modem 1 - Mikrotik eth 1 port

Adsl Modem 2 - Mikrotik eth 2 port

Lan designated port on port 3

Single bridge with the Lan ports assigned to the bridge

I have 2 x pppoe sessions created, both authenticated no problems and i can actually get traffic in and out from both but the problem is i’m trying to specifically send sip traffic out pppoe-2 and everything else out pppoe-1.

What i tried was setting up a mangle rule with some prerouting and marking the routing based on the protocol and dst port (so udp and 5060)

I then went into routes and added a gateway route to pppoe-2 and selected the routing mark i created in the mangle rule.

This didnt actually work. Getting the traffic out works, just not from the right pppoe session.

What I’ve found with the above is it actually works as a failover solution, if 1 adsl connection goes down then the other just kicks and starts routing traffic to and from the LAN but i cant specify what traffic should go out what gateway. The traffic seems to go out what ever pppoe session was last authenticated.

Pretty sure i got this sorted.

The pppoe-2, i had “add default” route ticked in the setup so it was adding a default route for that connection.

I removed this and then specified traffic destined for x.x.x.x IP was to go out pppoe-2’s upstream address in routes.

I left the default route for the pppoe-1 connection and everything seems to flow out it just fine.