Dropped on nine by Tamim Iqbal, Rohit (104) and KL Rahul (77) forged a 180-run stand, the highest opening partnership at this year's tournament, to give India a strong foundation.
Rohit tied Sri Lankan Kumar Sangakkara's record of four hundreds in a single World Cup and also overtook Australian David Warner as the leading scorer at this tournament.
Rishabh Pant made 48 but the Bangladesh bowlers, led by Mustafizur Rahman (5-59), stemmed the boundary flow at the end as India fell short of the 350-mark which had looked within their reach at one stage.
India will qualify for the semi-finals with a victory over Bangladesh who must win to stay alive in the race.
News that makes sense
Your trusted source for staying up-to-date with the world around you. Get free daily news updates and analysis, straight to your inbox.
(Reporting by Amlan Chakraborty; Editing by Ken Ferris)
