Hello,
Yes, it is legal and possible to repeat class 11th and 12th again even after passing it from either the same stream or a different stream from a different or same board. You can apply for this by either sending a mail to the respective board about it or you can contact the school from which you are pursuing it. The procdeure requires filling out certain forms with some documents in the school from which you want to pursue your 11th and 12th again.
I hope this helps,
All the best
Regular exam updates, QnA, Predictors, College Applications & E-books now on your Mobile