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
Search the forums for policy routing.
All that i can find is 2 wan connected to the same router…
Please help!!
/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
Ok i think i forget to tell somithing, there are many router in the internal network, all routed by ospf.
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.
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?