Setup guide

C - connect, S - static, r - rip, o - ospf, b - bgp
# DST-ADDRESS G GATEWAY DISTANCE INTERFACE
0 S 192.168.0.0/16 r 10.10.10.2 1 Local
1 S 0.0.0.0/0 r 10.10.10.1 1 Public
2 DC 10.10.10.0/24 r 0.0.0.0 0 Public
[admin@Wandy] ip route> print detail
Flags: X - disabled, I - invalid, D - dynamic, J - rejected,
C - connect, S - static, r - rip, o - ospf, b - bgp
0 S dst-address=192.168.0.0/16 preferred-source=0.0.0.0
gateway=10.10.10.2 gateway-state=reachable distance=1
interface=Local
1 S dst-address=0.0.0.0/0 preferred-source=0.0.0.0 gateway=10.10.10.1
gateway-state=reachable distance=1 interface=Public
2 DC dst-address=10.10.10.0/24 preferred-source=10.10.10.1
gateway=0.0.0.0 gateway-state=reachable distance=0 interface=Public
[admin@Wandy] ip route>
To set the 192.168.0.0/16 network is reachable via both 10.10.10.2 and 10.10.10.254 gateways:
[admin@Wandy] ip route> set 0 gateway=10.10.10.2,10.10.10.254
[admin@Wandy] ip route> print
Flags: X - disabled, I - invalid, D - dynamic, J - rejected,
C - connect, S - static, r - rip, o - ospf, b - bgp
# DST-ADDRESS G GATEWAY DISTANCE INTERFACE
0 S 192.168.0.0/16 r 10.10.10.2 1 Local
r 10.10.10.254 Local
1 S 0.0.0.0/0 r 10.10.10.1 1 Public
2 DC 10.10.10.0/24 r 0.0.0.0 0 Public
[admin@Wandy] ip route>
Routing Tables
ip policy-routing
Description
Policy routing allows to select routes in order to variate the use of network resources to certain
classes of users (in other words, you can set different routes to the same networks depending on
some classifiers). This is implemented using multiple routing tables and a list of rules specifying
how these tables should be used.
The Policy Routing is implemented in the Wandy RouterOS based on source and destination
addresses of a packet, the interface the packet arrives to the router and the firewall mark that may be
associated with some packets.
When finding the route for a packet, the packet is matched against policy routing rules one after
another, until some rule matches the packet. Then action specified in that rule is executed. If no rule
matches the packet, it is assumed that there is no route to given host and appropriate action is taken
(packet dropped and ICMP error sent back to the source).
If a routing table does not have a route for the packet, next rule after the one that directed to the
current table is examined, until the route is found, end of rule list is reached or some rule with
action drop or unreachable is hit. Thus it is good to have last rule say "from everywhere to
everywhere, all interfaces, lookup main route table", because then gateways can be found
(connected routes are entered in the main table only).
Note that the only way for packet to be forwarded is to have some rule direct to some routing table
that contains route to packet destination.