Section 97(1)(a) in The Naval Ceremonial, Conditions Of Service And Miscellaneous Regulations, 1964
(a)if either is a ship wearing a President's flag or is a flagship or a foreign warship, the junior ships shall sound the "alert" on the bugle; the other shall immediately do likewise and after a short interval, also sound the "carry on". The junior ship shall, after a short interval, also sound the "carry on". If guards and bands are paraded, the junior ship shall give the salute applicable, as laid down in Regulations 82 to 84, the senior ship's guard receiving the salute at the "slope"; but if one of these ships is a foreign warship, a similar salute to those laid down in Regulations 82 to 84 shall be given by the junior and returned in full by the senior, the bands playing the national anthem of the foreign nation. In cases of doubt as to seniority, Indian Naval Ships shall be prepared to give the salute first at the most opportune moment, provided they are satisfied that it is likely to be returned in a similar manner;