MikroTik MTCRE lab 10 of 14

OSPF routing filters and their limits

Write RouterOS 7 routing filter rules: control which networks an ASBR exports and with what metric and type, discover why an inbound filter on a link-state protocol creates a black hole, and fix the problem at its source.

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 10 - OSPF routing filters and their limits

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

Two routers redistribute their connected networks into OSPF with no filtering at all. R1 exports Fernvale's customer networks, plus an internal test network that must never leave R1 (172.16.99.0/24). R2 exports a partner network (10.77.0.0/16), plus a quarantine network for infected machines (10.66.0.0/16) that must not be reachable from anywhere else. A colleague tried to fix the quarantine problem on R3 with an inbound filter; you'll see why that fails and do it properly.

RouterExports todayShould export
R1 (ASBR)172.16.10.0/24, 172.16.20.0/24, 172.16.99.0/24 and its links172.16.10.0/24 (type 2, metric 20) and 172.16.20.0/24 (type 1, metric 50) only
R2 (ASBR)10.77.0.0/16, 10.66.0.0/16 and its links10.77.0.0/16 only

What you’ll practise

  • Write v7 routing filter rules with if/else, dst, dst-len, accept, reject and set
  • Attach filters to an OSPF instance as out-filter-chain and in-filter-chain
  • Control exported externals: drop one, change metric and type of another
  • Explain why an in-filter on one OSPF router doesn't stop the route spreading
  • Filter at the source instead

The tasks

  1. See what leaks
  2. Learn the RouterOS 7 filter language
  3. Control what R1 exports
  4. Try the inbound filter on R3 and find its limit
  5. Filter at the source

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 OSPF routing filters and their limits6 nodes, 5 links. Every link is listed as text below the diagram.R1R2R3R4PC1PC2ether2eth0ether2eth0ether1ether1ether2ether1ether2ether1
6 nodes, with the interface names each link uses. On a narrow screen, scroll the diagram sideways.
Nodes in OSPF routing filters and their limits, with the image each runs and the vCPU and RAM it’s set to
NodeDeviceImage in Add NodeSet to
R1MikroTik RouterOSmikrotik-7.14.21 vCPU, 256 MB
R2MikroTik RouterOSmikrotik-7.14.21 vCPU, 256 MB
R3MikroTik RouterOSmikrotik-7.14.21 vCPU, 256 MB
R4MikroTik RouterOSmikrotik-7.14.21 vCPU, 256 MB
PC1VPCS hostBuilt in to EVE-NGCounted as 1 vCPU, 1,024 MB
PC2VPCS 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 10 - OSPF routing filters and their limits 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

Related labs in other courses

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.