I have a MT router and need to add second default gateway. The current configuration is following:
router ip - 60.60.44.94/30, def gw. 60.60.44.93
behind the router I have one /25 network and lot of RFC1918 NATed networks.
Now I got new fiber from another ISP and want to switch SOME of networks behind this router to new internet.
New IP 160.160.16.47/27, and def. gw 160.160.16.33
if your existing internet source and the new one are on the same physical interface, you should create a new IP adress on your WAN interface and then specify a dst-adress in your masquerade rule.
you should place this rule before the default masquerade rule, or specify a subnet for each rule
Networks 10.10.14.0/24 and 60.60.47.0/25 should go thru main GW (10.10.14.0/24 should be masqueraded, 60.60.47.0/25 - not) and other two networks - thru new GW (192.168.0.0/24 should be masqueraded, 160.160.115.0/26 - should not).
I read this document but this did not helps me a lot.
When and for which condition I have to place a routing marks?
Firewall->Mangle, add roule, based on src addres and add rule based on dst address, actions=mark_routing? mark_routing=new-gw
then add def. gw with same routing mark?
After that I have to add a policy?
I had checked that the router can access new gateway but after that I’ve reconfigured the VLAN configuration and forgot to change PVID on a switch port router connected in. All the time I made my experiments with the policy routing the MT router and new default gw just was in a different vlans. Very stupid. Excuse me.