Setup guide
Routing Tables
Routing tables is a way to organize routing rules into groups for a purpose of easy management.
These tables can be created/deleted in the /ip policy-routing menu.
The routes in the routing tables are managed the same way as the static routes described above, but
in the submenu /ip policy-routing table name submenu, where name is the name of the table.
Property Description
name (name) - table name
Example
There is always a table called main, this table cannot be deleted and its name cannot be changed.
The main table can be managed in the /ip route submenu as well:
[admin@Wandy] ip policy-routing> table main
[admin@Wandy] ip policy-routing table main> print
Flags: X - disabled, I - invalid, D - dynamic, R - rejected
# TYPE DST-ADDRESS G GATEWAY DISTANCE INTERFACE
0 static 192.168.1.0/24 r 192.168.0.50 1 Local
1 static 0.0.0.0/0 r 10.0.0.1 1 Public
2 D connect 192.168.0.0/24 r 0.0.0.0 0 Local
3 D connect 10.0.0.0/24 r 0.0.0.0 0 Public
[admin@Wandy] ip policy-routing table main>
[admin@Wandy] ip policy-routing table main> /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.1.0/24 r 192.168.0.50 1 Local
1 S 0.0.0.0/0 r 10.0.0.1 1 Public
2 DC 192.168.0.0/24 r 0.0.0.0 0 Local
3 DC 10.0.0.0/24 r 0.0.0.0 0 Public
[admin@Wandy] ip policy-routing table main>
To add a new table named mt:
[admin@Wandy] ip policy-routing> add name=mt
[admin@Wandy] ip policy-routing> print
Flags: D - dynamic
# NAME
0 mt
1 D main
[admin@Wandy] ip policy-routing>
To add the route to the 10.5.5.0/24 network via 10.0.0.22 gateway to the mt table:
[admin@Wandy] ip policy-routing> table mt
[admin@Wandy] ip policy-routing table mt> add dst-address=10.5.5.0/24 \
\... gateway=10.0.0.22
[admin@Wandy] ip policy-routing table mt> print
Flags: X - disabled, I - invalid, D - dynamic, R - rejected
# TYPE DST-ADDRESS G GATEWAY DISTANCE INTERFACE
0 static 10.5.5.0/24 r 10.0.0.22 1 Public
[admin@Wandy] ip policy-routing table mt>
Policy Rules
ip policy-routing rule
Property Description