MikroTik MTCRE lab 3 of 14
Policy routing with routing tables, rules and mangle
Send different traffic out of different providers: create routing tables, route a whole subnet with a routing rule, steer one application with mangle routing marks, keep local traffic in the main table, and give each policy a fall-back.
Run this lab
It needs Lite: its 6 nodes are set to 6 vCPU and 3,072 MB in total. That fits the free demo too.
In your workspace: Shared, then MikroTik MTCRE RouterOS v7 guided labs, then 03 - Policy routing with routing tables rules and mangle
- Level
- Advanced
- Time
- About 60 minutes
- Nodes need
- 6 vCPU, 3,072 MB
- Smallest plan
- Lite
The scenario
A hotel has a fast fibre line (ISP1) and a cheap cable line (ISP2). The manager wants:
- guests always on the cable line, so they never slow down the hotel systems;
- staff on the fibre, except their VoIP calls to the phone provider (192.0.2.20), which must use the cable line because the provider only accepts calls from the cable address;
- guests and staff still able to reach each other's LANs inside the hotel (the guest printer, for example);
- if the cable line fails, guests and VoIP use the fibre.
| Device | Interface | Address |
|---|---|---|
| GW | ether1 (WAN1) · ether2 (WAN2) | 203.0.113.2/30 · 198.51.100.2/30 |
| GW | ether3 (Staff) · ether4 (Guest) | 192.168.10.1/24 · 192.168.20.1/24 |
| Internet (Core) | – | web 192.0.2.10, VoIP provider 192.0.2.20 |
| PC-Staff · PC-Guest | eth0 | 192.168.10.10 · 192.168.20.10 |
What you’ll practise
- Create routing tables with fib and add routes to them
- Use /routing rule to choose a table by source address, and understand lookup versus lookup-only-in-table
- Mark traffic with mangle mark-routing and route it with a table
- Keep LAN-to-LAN traffic in the main table
- Prove which path each flow takes with traceroute
The tasks
- Create a routing table for the cable line
- Send all guest traffic to the cable table with a routing rule
- Keep hotel-internal traffic in the main table
- Send staff VoIP calls to the cable line with mangle
- Read the policy
The Lab Tasks pane has the scenario, these tasks, the checks to run, hints and the full solution.
Topology and devices
The network as it opens in EVE-NG, drawn from the lab’s own canvas, and the image each node runs.
Every link, as text
- GW
ether1to ISP1ether1 - GW
ether2to ISP2ether1 - ISP1
ether2to Coreether1 - ISP2
ether2to Coreether2 - GW
ether3to PC-Staffeth0 - GW
ether4to PC-Guesteth0
| Node | Device | Image in Add Node | Set to |
|---|---|---|---|
| ISP1 | MikroTik RouterOS | mikrotik-7.14.2 | 1 vCPU, 256 MB |
| ISP2 | MikroTik RouterOS | mikrotik-7.14.2 | 1 vCPU, 256 MB |
| Core | MikroTik RouterOS | mikrotik-7.14.2 | 1 vCPU, 256 MB |
| GW | MikroTik RouterOS | mikrotik-7.14.2 | 1 vCPU, 256 MB |
| PC-Staff | VPCS host | Built in to EVE-NG | Counted as 1 vCPU, 1,024 MB |
| PC-Guest | VPCS host | Built in to EVE-NG | Counted as 1 vCPU, 1,024 MB |
How to open this lab
Sign in to your workspace at
lab.cloudlabbox.com.In File Manager, open Shared, then the folder
MikroTik MTCRE RouterOS v7 guided labs.Open
03 - Policy routing with routing tables rules and mangleand start its nodes, then open Lab Tasks for the scenario and the steps.
The lab is read-only. You can start the nodes and configure the devices, but changes to the topology can’t be saved. To change it, rebuild it in your own folder.
More MikroTik MTCRE labs
CloudLabBox is independent of MikroTik. The lab follows exam topics and isn’t vendor training material; vendor names identify the exams and the images in the workspace.