Redistributing routes without building an accidental loop

Redistribution feels simple the first time you type it: redistribute ospf 1 under your BGP process, hit enter, and routes show up on the other side. It feels simple right up until a route you redistributed into OSPF comes back out through EIGRP, back into OSPF, and now you have a loop that only shows up under load.

Where loops actually come from

Almost every redistribution loop has the same shape: two routing domains connected in more than one place, each redistributing into the other. Neither protocol can see the other's loop-prevention machinery, so a route can circle the topology indefinitely increasing its metric each pass — or worse, settle on a suboptimal path that looks perfectly healthy.

The fix isn't "never redistribute twice." It's controlling which routes cross the boundary and tagging them so you can filter on the way back.

A checklist that actually works

  • Redistribute at as few boundary points as possible — ideally one.
  • Tag every redistributed route (route-map with set tag) so you can recognize it later.
  • Filter on re-entry: never let a tagged route redistribute back into the domain it came from.
  • Set sane default metrics — a redistributed route with no seed metric can look artificially attractive or get filtered entirely depending on the target protocol.
  • Summarize at the boundary when you can. Fewer routes crossing means fewer surprises.

The two-boundary trap

The classic failure case is a pair of routers both connected to two domains — say, OSPF and EIGRP — both configured to redistribute both ways. Router A redistributes an OSPF route into EIGRP. Router B, also dual-connected, sees that EIGRP route and redistributes it back into OSPF. Now OSPF has two paths to the same destination: the original, and a via-EIGRP version with an inflated metric. Everything still works — until the original path fails, and traffic silently prefers a worse path nobody remembers configuring.

Tagging catches this immediately: filter any route tagged "from EIGRP" from being redistributed into EIGRP, and the loop can't form no matter how the topology grows.