In the third book of the Ramayana, Aranya Kanda, Rama and Lakshmana were searching for Sita, when they ventured into the territory of Kabandha. Kabandha was originally a gandharva (a celestial musician)—he was the son of Danu. Due to the curses inflicted by Sthulashira, a sage, and Indra, the king of heaven, Kabandha was transformed into a hideous demon, whose body was in the shape of a headless torso with one eye, a big mouth, and two long arms.
After Rama and Lakshmana killed Kabandha, and performed his cremation rites, the demon attained his celestial form, and he briefed them about the steps that they needed to take for freeing Sita from the imprisonment of Ravana, the demon king of Lanka. These steps included the formation of an alliance with Sugriva, Hanumana, and other warriors. Among the lessons in this story is the one on foreign policy. Kabandha informs Rama and Lakshmana that there are six types of foreign policy that a king or nation pursues.
In his Arthashastra, which was composed in the third century BC, centuries after the Ramayana, Kautilya has explained the six types of foreign policy that a nation should follow: (1) Sandhi (treaty for peace); (2) Vigrah (waging war); (3) Asana (neutrality) (4) Yana (marching) - presumably as a preparation for war; (5) Samsrya (alliance) and (6) Dwidibhava (making peace with one and waging war with another).