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

Try it free for 30 minutesRun it on Lite from £3 a day

The free demo needs no card and no email. Every lab plan includes every guided lab.

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.
DeviceInterfaceAddress
GWether1 (WAN1) · ether2 (WAN2)203.0.113.2/30 · 198.51.100.2/30
GWether3 (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-Guesteth0192.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

  1. Create a routing table for the cable line
  2. Send all guest traffic to the cable table with a routing rule
  3. Keep hotel-internal traffic in the main table
  4. Send staff VoIP calls to the cable line with mangle
  5. 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.

Topology of Policy routing with routing tables rules and mangle6 nodes, 6 links. Every link is listed as text below the diagram.ISP1ISP2CoreGWPC-StaffPC-Guestether3eth0ether4eth0ether1ether1ether2ether1ether2ether1ether2ether2
6 nodes, with the interface names each link uses. On a narrow screen, scroll the diagram sideways.
Nodes in Policy routing with routing tables, rules and mangle, with the image each runs and the vCPU and RAM it’s set to
NodeDeviceImage in Add NodeSet to
ISP1MikroTik RouterOSmikrotik-7.14.21 vCPU, 256 MB
ISP2MikroTik RouterOSmikrotik-7.14.21 vCPU, 256 MB
CoreMikroTik RouterOSmikrotik-7.14.21 vCPU, 256 MB
GWMikroTik RouterOSmikrotik-7.14.21 vCPU, 256 MB
PC-StaffVPCS hostBuilt in to EVE-NGCounted as 1 vCPU, 1,024 MB
PC-GuestVPCS hostBuilt in to EVE-NGCounted as 1 vCPU, 1,024 MB

How to open this lab

  1. Sign in to your workspace at lab.cloudlabbox.com.

  2. In File Manager, open Shared, then the folder MikroTik MTCRE RouterOS v7 guided labs.

  3. Open 03 - Policy routing with routing tables rules and mangle and 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

All 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.