Back to blog

MikroTik / RouterOS  ·  Tutorial  ·  September 2026

OSPF on RouterOS 7
— and Talking to Cisco

RouterOS 7 rebuilt the entire routing engine, and OSPF config looks nothing like the ROS6 tutorials still clogging search results. This post teaches the new model — instance, area, interface-template — on a three-router topology with a twist: one of the routers is a Cisco. Because OSPF is a standard, and the proof is watching a hEX and a 2911 become neighbors.

RouterOS 7 OSPF Dynamic Routing Cisco Interop Multi-Vendor MTCRE

one OSPF area 0 — two vendors MT-1 (RB5009) RID 1.1.1.1 · LAN 10.1.0.0/24 has the internet — originates default MT-2 (hEX) RID 2.2.2.2 · LAN 10.2.0.0/24 CSC-1 (Cisco 2911) RID 3.3.3.3 · LAN 10.3.0.0/24 10.0.12.0/30 10.0.13.0/30 10.0.23.0/30 a triangle, so every LAN has two paths — kill any one link and OSPF reroutes around it

Static routes stop scaling the moment there are two paths — you've felt this if you built the redundant topologies in this series. OSPF is the standard answer: every router describes its links, everyone floods the descriptions, and each router computes shortest paths itself. Link dies → new computation → traffic reroutes, no human involved. The Cisco multi-area lab covers the protocol theory in depth; this post is about RouterOS 7's implementation — and about proving the two vendors interoperate, because most real Greek SMB networks are exactly this mix.

ROS7's model takes three objects where Cisco takes one: an instance (the process — router-id lives here), an area (attached to the instance), and interface-templates (which interfaces/networks join which area, with per-interface settings like cost and passive). It's more verbose than network … area 0 — and more explicit, which you'll appreciate the first time you read someone else's config.

Prerequisites

01

Addressing and the Plan

A triangle of /30s, one LAN per router, loopback-style router-IDs. Same discipline as every lab in this series: the table first, then the keyboard.

ElementValue
MT-1 ↔ MT-210.0.12.0/30 (MT-1 .1, MT-2 .2) — ether1 both sides
MT-1 ↔ CSC-110.0.13.0/30 (MT-1 .1, CSC-1 .2) — ether2 / Gi0/0
MT-2 ↔ CSC-110.0.23.0/30 (MT-2 .1, CSC-1 .2) — ether2 / Gi0/1
LANsMT-1: 10.1.0.0/24 · MT-2: 10.2.0.0/24 · CSC-1: 10.3.0.0/24
Router-IDs1.1.1.1 / 2.2.2.2 / 3.3.3.3 — set explicitly, never auto-derived
WANMT-1 only — static default to the ISP, redistributed into OSPF
💡 Always Set the Router-ID Explicitly

Both vendors will auto-pick a router-id from an interface address if you don't set one — and that ID silently changes when addressing changes, which resets adjacencies and makes the LSA database confusing to read ("who is 10.0.23.1?"). An explicit, memorable ID per box (1.1.1.1, 2.2.2.2…) costs one line and makes every print/show for the rest of the network's life legible. On MikroTik it lives on the instance; on Cisco, under router ospf.

02

The MikroTik Side — Instance, Area, Templates

Three objects, in order. The interface-template is where ROS7 differs most from both ROS6 and Cisco — it matches interfaces OR networks, and carries the per-link settings.

MT-1 — full OSPF config (MT-2 mirrors with its own RID/LAN)
# 1. The instance — the routing process itself
[admin@MT-1] > /routing/ospf/instance add name=default version=2 router-id=1.1.1.1

# 2. The backbone area, attached to the instance
[admin@MT-1] > /routing/ospf/area add name=backbone area-id=0.0.0.0 instance=default

# 3. Interface templates — the /30s speak OSPF, the LAN is announced but passive
[admin@MT-1] > /routing/ospf/interface-template add area=backbone interfaces=ether1 networks=10.0.12.0/30 type=ptp
[admin@MT-1] > /routing/ospf/interface-template add area=backbone interfaces=ether2 networks=10.0.13.0/30 type=ptp
[admin@MT-1] > /routing/ospf/interface-template add area=backbone interfaces=bridge-lan networks=10.1.0.0/24 passive

# Adjacency to MT-2 comes up in seconds:
[admin@MT-1] > /routing/ospf/neighbor print
 0  instance=default area=backbone address=10.0.12.2
    router-id=2.2.2.2 state=Full state-changes=2

# And MT-2's LAN appears with routing-table code "Do" (dynamic ospf):
[admin@MT-1] > /ip/route print where dst-address=10.2.0.0/24
   DST-ADDRESS     GATEWAY      DISTANCE
Do 10.2.0.0/24     10.0.12.2    110
⚠ Gotcha — Point-to-Point Type on /30s, Both Ends

On a /30 between two routers, set type=ptp (and ip ospf network point-to-point on the Cisco side). The default broadcast type works, but it runs a pointless DR election on a two-router link, adds a type-2 LSA, and — the interop trap — the network type must match on both ends or the adjacency sticks in ExStart/Exchange. Mismatched network types are the #1 cause of "the MikroTik and the Cisco see each other but never reach Full".

03

The Cisco Side — and the Moment of Interop

Standard IOS OSPF from part 7 of the Cisco series. The only requirement is agreement: area, hello/dead timers, network type, MTU. Then a 2911 and an RB5009 shake hands like it's nothing.

CSC-1 (IOS) — and the adjacency, seen from both sides
CSC-1(config)# router ospf 1
CSC-1(config-router)# router-id 3.3.3.3
CSC-1(config-router)# passive-interface GigabitEthernet0/2   ← the LAN
CSC-1(config-router)# network 10.0.13.0 0.0.0.3 area 0
CSC-1(config-router)# network 10.0.23.0 0.0.0.3 area 0
CSC-1(config-router)# network 10.3.0.0 0.0.0.255 area 0
CSC-1(config)# interface range GigabitEthernet0/0 - 1
CSC-1(config-if-range)# ip ospf network point-to-point

# The Cisco sees two MikroTik neighbors…
CSC-1# show ip ospf neighbor
Neighbor ID     Pri   State     Dead Time   Address      Interface
1.1.1.1           0   FULL/  -  00:00:36    10.0.13.1    GigabitEthernet0/0
2.2.2.2           0   FULL/  -  00:00:34    10.0.23.1    GigabitEthernet0/1

# …and the MikroTik routes to the Cisco LAN, learned via OSPF:
[admin@MT-2] > /ip/route print where dst-address=10.3.0.0/24
Do 10.3.0.0/24     10.0.23.2    110   ← vendor boundary, invisible to the protocol

That FULL/ - is the entire argument for standards-based routing: the protocol doesn't know or care that one end costs €1,200 and runs IOS while the other costs €60 and runs RouterOS. Same packets, same state machine. When a client's network grows one site at a time with whatever hardware made sense that year, OSPF is what makes the patchwork behave like a system.

04

The Default Route, Costs, and a Failure Drill

MT-1 owns the internet, so MT-1 originates the default — conditionally. Then align the cost math between vendors and cut a link to watch the triangle earn its keep.

MT-1 — originate the default; everyone — align costs
# MT-1's own default is a static toward the ISP (with a check-gateway probe,
# as in the Starlink failover post). OSPF advertises it only while it exists:
[admin@MT-1] > /routing/ospf/instance set default originate-default=if-installed

# MT-2 and CSC-1 now both have a default via the triangle:
CSC-1# show ip route | include 0.0.0.0/0
O*E2  0.0.0.0/0 [110/1] via 10.0.13.1, 00:00:22, GigabitEthernet0/0

# Cost alignment: RouterOS interface-templates default to cost=1 regardless
# of speed — set costs explicitly so both vendors agree what "far" means:
[admin@MT-1] > /routing/ospf/interface-template set [find interfaces=ether1] cost=10
# …and on Cisco: interface Gi0/0 → ip ospf cost 10. Same number, same link.

The drill

Start a continuous ping from a PC on MT-2's LAN to one on CSC-1's LAN — steady state, it crosses the direct MT-2↔CSC-1 link. Now disable that link (/interface/ethernet disable ether2 on MT-2). Two or three pings drop, then traffic re-appears — via MT-1, the long way around the triangle. /routing/ospf/neighbor print shows the lost neighbor; traceroute shows the extra hop. Re-enable and it falls back. That's a multi-vendor network healing itself in seconds — with originate-default=if-installed ensuring that even the internet path fails over honestly if MT-1's WAN dies.

💡 Where This Meets the Rest of the Series

This triangle composes directly with earlier posts: run OSPF over WireGuard or GRE tunnels (part 9, Cisco lab 26) and remote sites join the same area 0; feed MT-1's default from the Starlink failover setup and WAN failover propagates to every router automatically. Dynamic routing is the layer that makes all the other redundancy tricks compose instead of fighting.

05

ROS6 → ROS7 Migration Traps Read Before Upgrading

If you learned OSPF on RouterOS 6 — or you're upgrading a router that runs it — the syntax isn't the only thing that changed.

ROS6 habitROS7 reality
/routing ospf network addGone. Networks live on interface-templates now.
router-id on /routing ospf instance defaultInstance still, but you must create the instance — no implicit default one.
redistribute-static=as-type-1redistribute=static on the instance (+ out-select filters if you need per-route control).
passive on the interface entrypassive flag on the interface-template.
distribute-in filtersRewritten routing filters — new rule syntax (if/then), audit any filter config by hand.
Upgrade in place and hopeROS7 tries to convert OSPF config on upgrade; complex configs come through broken. Export, upgrade, verify line by line — with a backup off-box first.
Verify (RouterOS)Equivalent (Cisco)
/routing/ospf/neighbor printshow ip ospf neighbor
/routing/ospf/interface printshow ip ospf interface brief
/routing/ospf/lsa printshow ip ospf database
/ip/route print where routing-table=mainshow ip route ospf
/routing/stats/step print(SPF run stats — debug ip ospf spf, roughly)

Takeaways

  1. ROS7 OSPF is three objects: instance (router-id), area, interface-templates (networks, cost, passive, type). Ignore every ROS6 tutorial — the model changed, not just the syntax.
  2. Set router-ids explicitly on every box, both vendors. Auto-derived IDs change under you and make the whole network harder to read.
  3. type=ptp on /30 links, matched on both ends. Mismatched network types are the top cause of mixed-vendor adjacencies stuck below Full.
  4. Interop is real: agreement on area, timers, network type, and MTU is all a hEX and a 2911 need to reach FULL. The protocol can't see the price tags.
  5. originate-default=if-installed is the honest default: the network learns the way out only while the way out exists — and it composes with check-gateway/IP SLA WAN failover.
  6. Align costs explicitly across vendors — RouterOS templates default to cost 1, Cisco derives from bandwidth; leave both alone and path selection is meaningless.
  7. Never upgrade a ROS6 OSPF router blind. Export the config, upgrade, then verify the converted OSPF section object by object.

Mixed Cisco + MikroTik network that grew organically?

NOCTIS designs and maintains multi-vendor routed networks across Crete — OSPF that heals around failures, WAN failover that propagates everywhere, and documentation that names every router-id. The patchwork can behave like a system.

Book a Discovery Call →