Community discussions

MikroTik App
 
Nic335
newbie
Topic Author
Posts: 25
Joined: Wed Jun 04, 2014 9:20 pm

Two network with there own wan, How to nat

Fri Sep 25, 2015 6:39 pm

Hi,

I am fairly new to the mikrotik comunity, and for this problem I did search a lot online but unfortunately I can only find some awnsers on how to load balance with the two wan, This is not what im trying to do.

I have two isp.

both isp are PPPOE
One has a static ip,


I have two network
192.168.1.0/24
192.168.3.0/24

Id like to have all traffic that goes to 192.168.1.1 gateway to one isp and and 192.168.3.1 to the other isp
Exactly like there was two regular router.

To be honest I am not completely sure of what im doing.
But I tried to create 2 Firewall Nat rules
______________________
Firewall Rule 1
----------------------
Chain=srcnat
src. Address=192.168.1.0/24
out. Interface=ISP1
Action=masquerade
______________________
Firewall Rule 2
----------------------
Chain=srcnat
src. Address=192.168.3.0/24
out. Interface=ISP2
Action=masquerade
______________________


Maybe im completely off, Thanks in advance for any help I can get
 
User avatar
boen_robot
Forum Guru
Forum Guru
Posts: 2400
Joined: Thu Aug 31, 2006 4:43 pm
Location: europe://Bulgaria/Plovdiv

Re: Two network with there own wan, How to nat

Fri Sep 25, 2015 7:15 pm

See PCC.

The basic idea is that you "route" (as in "/ip route") based on a routing mark that you place before routing. Regardless of the result, you srcnat (or better yet - masquerade) both marks.
 
Nic335
newbie
Topic Author
Posts: 25
Joined: Wed Jun 04, 2014 9:20 pm

Re: Two network with there own wan, How to nat

Fri Sep 25, 2015 8:27 pm

See PCC.

The basic idea is that you "route" (as in "/ip route") based on a routing mark that you place before routing. Regardless of the result, you srcnat (or better yet - masquerade) both marks.
Thanks for you reply.

I just read.the PCC article, and im not so sure still how to do what im trying to achieve since I think this article example is about how to create load balancing.

Would you mind giving me an example based on my scenario :? ?
 
User avatar
bajodel
Long time Member
Long time Member
Posts: 552
Joined: Sun Nov 24, 2013 8:30 am
Location: Italy

Re: Two network with there own wan, How to nat

Mon Sep 28, 2015 12:56 pm

Just use the same logic, do not pcc/load_balancing but set static marks depending on source network. You'll route net1 to wan1/ppoe1 and net2 to wan2/ppoe2 ..

Who is online

Users browsing this forum: No registered users and 7 guests