Page 1 of 1

A specific ip to use only one WAN ! Please help .

Posted: Sat Jul 07, 2012 9:36 pm
by kapone91
Hello,

I have one mikrotik RB1100AHx2 configured with 2 wan's wich use static ip.
I also configured it to do load balancing.

The problem is that one computer from the network must work only with one of the wan's.
How do i setup this ?

ex:

i have ether 1 - ISP 1 , ether 2 - ISP , ether 3 - LAN.
I want that ip:192.168.0.186 to work only through ether 2 , to connect to internet only through
that ISP .
It's anything that i can do ?

I tried to add some rules in mangle , some rules in routes , but nothing worked.

If someone can help me , would appreciate.

Thank you.

Re: A specific ip to use only one WAN ! Please help .

Posted: Mon Jul 09, 2012 5:42 pm
by CelticComms
There are a few ways of doing so.

e.g. Set a pre-routing mangle rule to and action "mark routing" for that specific source IP. Then make the relevant routing rules in the routing table for the WAN, default gateway and local subnet flagged with the same routing mark that you used in the mangle rule. That would ensure that only routes with the relevant routing marks are considered by connections from the specific IP in question.

Re: A specific ip to use only one WAN ! Please help .

Posted: Tue Jul 10, 2012 2:55 pm
by kapone91
Hello , and thank you for reply , cand you show me an e.g code to understand how this works please.
Or a wiki where to read about.

Re: A specific ip to use only one WAN ! Please help .

Posted: Tue Jul 10, 2012 8:30 pm
by CelticComms
Have a look at the route lookup section on this page:

http://wiki.mikrotik.com/wiki/Manual:IP/Route

By marking with a routing mark only routing entries with the corresponding routing marks will be used when the route is looked up.

Re: A specific ip to use only one WAN ! Please help .

Posted: Tue Jul 10, 2012 10:50 pm
by antkamidiv
Add an ip route rule where src-address is ip you want. Use a special route table for this rule.
Add the route into this table where gateway is specific wan.