Community discussions

MikroTik App
 
caspat
newbie
Topic Author
Posts: 48
Joined: Wed Apr 28, 2010 3:55 pm

Routing different gateway

Wed Sep 29, 2010 12:12 pm

Hi,
What i want to do is route a selected source adress to a different gateway on the network.
Default gateway for internal network is on wan on router1, i want to route pc1 to go out by router2.
Is there someone that can help me with this?
Patrick
dual wan.jpg
You do not have the required permissions to view the files attached to this post.
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: Routing different gateway

Wed Sep 29, 2010 3:54 pm

Search the forums for policy routing.
 
caspat
newbie
Topic Author
Posts: 48
Joined: Wed Apr 28, 2010 3:55 pm

Re: Routing different gateway

Wed Sep 29, 2010 9:04 pm

All that i can find is 2 wan connected to the same router...
Please help!!
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: Routing different gateway

Wed Sep 29, 2010 9:30 pm

/ip firewall mangle
add chain=prerouting src-address=ip.address.of.pc1 action=mark-routing new-routing-mark=via_ISP2
/ip route 
add route-mark=via_ISP1 dst-address=0.0.0.0/0 gateway=ip.address.of.ISP2router
 
caspat
newbie
Topic Author
Posts: 48
Joined: Wed Apr 28, 2010 3:55 pm

Re: Routing different gateway

Wed Sep 29, 2010 9:54 pm

Ok i think i forget to tell somithing, there are many router in the internal network, all routed by ospf.
dual wan.jpg
You do not have the required permissions to view the files attached to this post.
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: Routing different gateway

Wed Sep 29, 2010 10:26 pm

As long as router 1 and router 2 are connected what I posted will still work on router 2, on router 1 you'd create the same thing but instead of the gateway on the route with a routing mark being the ISP2 gateway IP address you'd enter the IP address of router 2.

But, depending on configuration, that's a stab in the dark. If you have a large meshed OSPF network between the ISPs and the customer the solution may well get very difficult to implement. That's a huge addition to the original question, and you should probably pay a consultant to get the ideal answer as it depends on many, many parameters.
 
caspat
newbie
Topic Author
Posts: 48
Joined: Wed Apr 28, 2010 3:55 pm

Re: Routing different gateway

Thu Sep 30, 2010 4:46 am

What i understand in that, is that i have to put this config in each router?
Or juste the router where the pc is conected?

Who is online

Users browsing this forum: No registered users and 19 guests