If you means mutual redistribution, into eigrp you need to set the eigrp metric when redistributing from other protocols. Into ospf, you dont need to apply any metric unless you need to set metrics, type or tags.
If you have a redistribution loop, then would need to configure some route-maps, that set a tag to the redistributed routes into the other routing protocol. This way, on the other redistribution point, you could match on this tag and deny the redistribution. This way will avoid redistribution loops from eigrp to ospf and from ospf to eigrp.
Also, take in account the administrative distances. The redistributed route should have always higher AD than the source routing protocol if there is several redistribution points. If not, will be preferred the redistributed route before the "natural" route in that redistribution points.
The most basic redistribution commands is:
For routes into EIGRP:
For routes into OSPF:
As Alejandro also writes, take care of redistribution loop and suboptimal routing.
yes, actually this the current configuration that I've been used but as you said am facing problem with redistirubtion loop.
I think it's recommend to use eigrp metic 10 into ospf and ospf redistribute eigrp with same metrci 10.
I will check this and might this avoid the loop.
If you're experiencing routing loops, i suggest you set different 'tags' to routes from each protocol. For example you set a tag of 10 for eigrp routes and 20 for ospf routes.
You can then deny any routes with a tag of 10 from entering the eigrp process domain and do the same for routes with a tag of 20 for the ospf domain.
This would ensure you dont have routing loops in your network.
The way to use route-maps, access-lists and set a tag is the following :
router ospf 1
redistribute eigrp 100 subnets route-map EIGRP-to-OSPF
ip access-list standard ODD
permit 0.0.1.0 255.255.254.255
! this entry will deny redistribution for routes with tag 3333. This tag wil be set in the other redistribution point, from OSPF to EIGRP.
route-map EIGRP-to-OSPF deny 5
match tag 3333
! will match some specific routes, will tag this and sets metric-type.
route-map EIGRP-to-OSPF permit 10
match ip address ODD
set metric-type type-2
set tag 1111
! will match everything else, and set tag and metric-type.
route-map EIGRP-to-OSPF permit 20
set metric-type type-1
set tag 2222
On the other redistribution point, route map redistributing from OSPF to EIGRP will have to match first on tags 1111 and 2222 and deny redistribution. Will match everything else and set tag to 3333 from OSPF to EIGRP.
Under the redistribute command, have to add the route-map option, and the appropiate route-map, with the right match and set commands. Anything that will be denied for redistribution will match a route-map deny, anything will be redistribute will match a route-map permit and will have the set tag.
So what you tag on outgoing direction, will have to be denied in the opposite direction.