I am referring to this question, where OP apparently fixed his issue by redistributing ospf in bgp and vice-versa on the same router.

The user Sebastian warns that this is a dangerous practice.

We had a quite similar problem in our networking course assignment, and solved it with the same solution.

So the question is, is it really a dangerous solution, how and why (in what circumstances) can this solution be problematic?

2 Answers 2


Mutual redistribution can be dangerous because you can get in a situation where each routing protocol gets back through redistribution the same routes it already had.

One way around this for Cisco routers is to tag the routes, and not redistribute some routes based on tags. BGP doesn't have tags, but you can set communities based on the tags to accomplish the same purpose.

There is also the problem of AD (Administrative Distance) where a routing protocol is preferred over other routing protocols if they have the same routes.

Redistribution is often the easy way, but it is also ugly, and it it can have unintended consequences. If you find yourself redistributing routes, then you should probably step back and see if there is a better way of doing things. If you do use redistribution, then you really need to look at all aspects of what it is really doing, and you should mock it up in a lab to see what is really going to happen before you put it into production.

  • We were using the quagga/zebra suite, do you know if the "getting same route back through redistribution" problem was circumvented there?
    – k0s1nsky
    Dec 6, 2017 at 0:03
  • I can't answer specifically for that, but routes don't have any tag or community unless you attach it. You could, for example, tag OSPF routes with 10, then when BGP gets those routes, you have a route map to convert that to community 10:10, and a route map to deny any routes with the community 10:10 to be redistributed to OSPF. Conversely, BGP routes could have a community of 20:20, which a route map distributes to OSPF as tag 20, and OSPF would have a route map to deny redistributing routes with the 20 tag to BGP.
    – Ron Maupin
    Dec 6, 2017 at 0:15

It is only a problem if you have more than one mutual redistribution router. In that case you will likely create a routing loop.

In larger networks there may be more than one router redistributing between two routing domains (in this case, BGP and OSPF). If R1 and R2 are both doing mutual redistribution, a problem can occur when R1 redistributes OSPF into BGP, and then R2 learns those redistributed routes via BGP and then injects them back into OSPF.

To prevent this type of problem you can use route tags to filter redistributed routes so that routes injected from OSPF into BGP (for example) are not relearned into OSPF.

Here is a Cisco document that explains this in more detail. Note especially the section "Avoiding problems due to redistribution."

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.