Different Internet per Interface

Hi,

I want to know if it’s possible to configure the mikrotik router to provide different internet access according to the internal network.

What I have now is:

Interface 1 - 192.168.1.0/24 (Lan 1)
Interface 2 - 192.168.2.0/24 (Internet interface). It connects to a home gateway with IP 192.168.2.254
Interface 3 - 192.168.3.0/24 (Lan 2)

This configuration is working fine.
Both lans have internet access.


Now a second internet connection was installed and I wanted to change the configuration so Lan1 would use one internet connection and lan2 the other.

So it should be lan1 (192.168.1.0/24) should access the internet through interface 2
Lan2 (192.168.3.0/24) should access the internet through interface 4 (192.168.4.0/24) Home gateway IP: 192.168.4.254


Is this possible to configure? How?

Thanks

You just need to setup policy routing. Here is an example.

http://wiki.mikrotik.com/wiki/Manual:PCC#Policy_routing

Hi,

the example you provided is for load balancing which is not exactly what I want.
I want traffic from lan1 to always exit through internet 1 and lan2 to internet2.
Is this possible? Do you know any tutorial with that?

Thanks

Look at the example again. It shows you how to send traffic to different gateways (policy routing).

So, instead of using PCC to mark your connections you mark you connections based on in-interface or src-address.

IP—Firewall----NAT-----Chain-----Srcnat----Src Addr----192.168.1.0/24 & Action-----src-nat----To Address---- 192.168.2.254

This will provide subnet 192.168.1.0/24 internet thru Interface 2

Similarly

IP—Firewall----NAT-----Chain-----Srcnat----Src Addr----192.168.3.0/24 & Action-----src-nat----To Address---- 192.168.4.254

This will provide subnet 192.168.3.0/24 internet thru Interface 4

Note : I’ve assumed 192.168.2.254 as interface IP of Interface 2 & 192.168.4.254 as interface IP of Interface 4 (Hope these are not g/w IPs). If not then replace these IPs in action with appropriate IPs.