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
- 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.
| Router | Exports today | Should export |
|---|---|---|
| R1 (ASBR) | 172.16.10.0/24, 172.16.20.0/24, 172.16.99.0/24 and its links | 172.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 links | 10.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
- See what leaks
- Learn the RouterOS 7 filter language
- Control what R1 exports
- Try the inbound filter on R3 and find its limit
- 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.
Every link, as text
- R1
ether1to R2ether1 - R2
ether2to R3ether1 - R3
ether2to R4ether1 - R1
ether2to PC1eth0 - R4
ether2to PC2eth0
| Node | Device | Image in Add Node | Set to |
|---|---|---|---|
| R1 | MikroTik RouterOS | mikrotik-7.14.2 | 1 vCPU, 256 MB |
| R2 | MikroTik RouterOS | mikrotik-7.14.2 | 1 vCPU, 256 MB |
| R3 | MikroTik RouterOS | mikrotik-7.14.2 | 1 vCPU, 256 MB |
| R4 | MikroTik RouterOS | mikrotik-7.14.2 | 1 vCPU, 256 MB |
| PC1 | VPCS host | Built in to EVE-NG | Counted as 1 vCPU, 1,024 MB |
| PC2 | 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
10 - OSPF routing filters and their limitsand 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
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.