Real networks run more than one routing protocol — OSPF inside, BGP to the ISP, a few static routes, a legacy EIGRP corner. Redistribution is the glue that lets them share routes, and it's the classic footgun that causes routing loops. Pair it with BFD — failure detection in milliseconds instead of seconds — and you have a fast, stable multi-protocol core.
Two topics that belong together in any grown-up routing design. Redistribution injects routes from one protocol into another — OSPF into BGP, static into OSPF, EIGRP into OSPF at a migration boundary. It's essential and dangerous: done carelessly, a route redistributed out and back in creates a routing loop or black hole, because the receiving protocol loses the original's loop-prevention context. The fix is disciplined tagging and filtering.
BFD (Bidirectional Forwarding Detection) is the other half: a lightweight hello protocol that detects a dead neighbour in milliseconds, independent of any routing protocol's own (slow) timers. You bolt it onto OSPF/BGP/EIGRP/static so failover happens in a blink instead of the default dead-timer seconds. Together they make a multi-protocol network both correct and fast — and the concepts map cleanly to RouterOS.
01
Injecting routes needs a starting metric the target protocol understands, and control over route type. Never redistribute blindly — always through a route-map.
# Static routes into OSPF as external type-1 (metric increases along the path): R1(config)# router ospf 1 R1(config-router)# redistribute static subnets metric 50 metric-type 1 route-map STATIC-IN # OSPF into BGP (advertise internal networks to the ISP edge): R1(config)# router bgp 65001 R1(config-router-af)# redistribute ospf 1 route-map OSPF-TO-BGP
subnets, and E2 Metrics Don't Add Up
Two traps. Redistributing into OSPF without the subnets keyword silently injects only classful networks — your /24s and /30s just don't appear, and you'll swear the command didn't work. Always add subnets. Second: OSPF external routes default to type-2 (E2), whose metric is the seed cost only and does not increase as the route travels — so two exit points can look equal and you get suboptimal routing or flapping. Use type-1 (E1) when you want the internal cost added along the way, which is usually what you actually mean.
02
With redistribution at two or more points between the same pair of protocols, a route can leak out one and back in another, looping. Tag on the way out, deny the tag on the way back.
# On redistribution OSPF->BGP, stamp a tag identifying "this came from OSPF". R1(config)# route-map OSPF-TO-BGP permit 10 R1(config-route-map)# set tag 111 # On the OTHER redistribution point (BGP->OSPF), REFUSE anything tagged 111 # so an OSPF route can't loop back into OSPF via BGP. R1(config)# route-map BGP-TO-OSPF deny 10 R1(config-route-map)# match tag 111 R1(config)# route-map BGP-TO-OSPF permit 20 # everything else allowed
When the same prefix is learned by two protocols, the router installs the one with the lower administrative distance (eBGP 20, EIGRP 90, OSPF 110, RIP 120…) regardless of the actual metric — which during redistribution can make it prefer a redistributed copy over the native route and create a sneaky loop or suboptimal path. In mutual redistribution, sanity-check with show ip route <prefix> at each boundary and, where needed, adjust AD (distance) so the native route always wins. Tagging plus an AD check is the belt-and-braces that keeps redistribution safe.
03
Routing protocols detect a dead neighbour on their own timers — OSPF's default dead interval is 40 seconds. BFD does it in a fraction of a second, then tells the protocol to reconverge immediately.
# Sub-second timers on the link (300ms x3 = ~900ms detection). R1(config)# interface GigabitEthernet0/0 R1(config-if)# bfd interval 300 min_rx 300 multiplier 3 # Tell OSPF to use BFD for neighbour liveness on all interfaces: R1(config)# router ospf 1 R1(config-router)# bfd all-interfaces # And BGP to drop the session the instant BFD reports the peer down: R1(config)# router bgp 65001 R1(config-router)# neighbor 198.51.100.1 fall-over bfd
Aggressive BFD timers detect real failures fast — and also detect microbursts, brief CPU spikes, and lossy wireless links as "failures," flapping your routing. On a clean fibre link, 300ms×3 is fine; on a congested or wireless path, loosen the timers (or don't run BFD there) or you trade slow-but-stable for fast-but-flapping. Match the timers to the link quality, and remember BFD reconvergence is only as useful as your backup path — fast detection with no alternative route just fails fast.
04
Confirm what actually got redistributed (and with what tag/type), and that BFD sessions are up with the timers you intended.
R1# show ip route ospf | inc E1|E2 # external routes + their type R1# show ip ospf database external # what we injected, with tags R1# show ip bgp | inc <prefix> # redistributed routes reached BGP R1# show bfd neighbors detail # session UP, negotiated timers
Takeaways
subnets into OSPF or your non-classful routes vanish.NOCTIS designs and audits multi-protocol routing on Cisco and MikroTik across Crete — safe redistribution with loop prevention, sane administrative distance, and BFD-fast failover matched to your link quality.
Book a Discovery Call →