cisco router switch:Route Redistribution and TAGGing
Using Tagging to prevent the routing loop:
router rip
version 2
redistribute ospf metric 2 route-map RED_OSPF
route-map RED_OSPF deny 10
match tag 1
route-map RED_OSPF permit 20
set tag 2
router ospf 1
redistribute rip metric 20 route-map RED_RIP
route-map RED_RIP deny 10
match tag 2
route-map RED_RIP permit 20
set tag 1