Register now or log in to join your professional community.
This can be done by multiple ways, for example:1) Create access lists of prefixes allowed or deny for redistribution and permitonly these prefixes to be redistributed2) Tag prefixes (in OSPF) or (in BGP) and on all other routers doNOT redistribute prefixes having this tag (community) because that wouldmean this prefix has been originated in another protocol and doubleredistribution of the same prefix should be prohibited.You should be able to set the tag when redistributing from BGP into OSPF.Then, when going from OSPF into BGP, you can match on that same tag.