Configuring two WAN

Hi,
My microtik router OS routerOS 6.40 is working fine wiht one ISP and ONE LAN. Now i have two WAN and i am trying to load balance with two ISP. But i am not able to do so.
My scenario :

  1. WAN 1 IP x.x.x.x
  2. WAN2 IP z.z.z.z
  3. LAN : Divided into several network. 192,168,.200.0, 192.168.201.0, 192.168.202.0 and 192.168.203.0 (for wifi devices only- locaI Ps are given based on MAC address).
    What i want is to route 192.168.203.0 through WAN2, Rest to go through WAN1
    I have WAN2 connected via USB network card.
    First thing is even when the WAN2 is connected, i can not ping through WAN 2 from winbox, where as i can ping through WAN1. I think if this can be fixed, i will be able to look further.

For WAN2, public IP is assigned in ISP’s separate router and it has local ip 192.168.199.1. This router provides IP 192.168.199.2 to USB network card.

Hope anyone can help me with this. Leave a message if anyone needs more info.

Read and understand this:

https://wiki.mikrotik.com/wiki/Manual:PCC

It’s about one specific type of load balancing, but it also describes mechanisms needed by multi-WAN configs in general. Directly related to actual PCC load balancing are only two rules with per-connection-classifier option. When you understand the config, replace them with your own rules based on source address.

Before you go down a path of complexity, I too was looking at this scenario
I ended up using IP routes.
Basically identifying my WAN1 (primary) as having distance 1 and pinging this gateway.
While identifying my WAN2 (secondary) as having distance 2
This creates a situation where the only time users will not use WAN 1 and will use WAN2, is if WAN1 is down (not returning a ping).

I have a similar need to use WAN2 for specific purpose:
To ensure that email gets sent to use WAN2 regardless (for me its email which we have with ISP 2) I make a route for this purpose.
Concept is that one has to identify the specific traffic (capture it). [ip firewall mangle rule]
Then apply routing rule to that traffic. [ip route rule]

Use IP firewall MANGLE rule to identify the traffic (for me any LAN traffic to port 25), if it was from an particular IP define the source IP.
Since it covered all LANIPs, for source address I put in 0.0.0.0 (blank does not work)

So, I have Mangle rule:
chain-prerouting, source address 0.0.0.0 protocol TCP, destination port 25, In interface list - LAN
(on my INTERFACE LIST I HAVE TWO entries for LAN, one for my homebridge (main LAN)and one for my LAN2bridge (dmz lan))
On ACTION TAB i have mark routing selected. Under new routing marking I have type in email-ISP2
I then went to IP ROUTING
Under destination I put IP of ISP email server
Gateway I Put ISP2
Routing mark (THE SAME NAME I USED IN MANGLE RULE) email-ISP2

THat seems to work for me, but if its right is another question.
0.0.0.0 is like the default setting to capture all when the source is unknown???

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
In your case you may want to direct one individual IP to use WAN 2 and I believe the concept is similar.
Setup a mangle rule to identify and capture traffic.
Apply route rule to that traffic.


Mangle Rule, chain-prerouting, the source address would be the specific LANIP in question. In interface as appropriate (to describe the LAN segment that LANIP is on),
Action Tab - Routing Mark, Under new routing mark identify what you are doing FORCE_IP_2ISP2
Under IP routing
Destination address leave as default, it should set to 0.0.0.0/0 Gateway put ISP2,
Routing mark (FORCE_IP_2ISP2)

What I am not clear on, is if one has to STATE a protocol or ports OR IF BY LEAVING THEM BLANK it applies to ALL traffic from the source IP???





.