In this present paper, we investigate Bianchi type II VIII and IX string cosmological models in the context of f (R) gravity. Exact solutions of the field equations are obtained. It is found that the scale factors (A, B) admit oscillatory nature in case of Bianchi type II and IX models. The strings do not exist in all three cosmological models for the f (R) theory of gravitation.