Indian legends speak of two dynasties that ruled India, Surya, Solar and Chandra Vamsa, Lunar Dynasty.
Lord Rama belonged to Ikshvaku of Surya or Lunar Dynasty while the Kauravas and Pandavas belonged to Lunar Dynasty or Chandra Vamsa.
However, Vivaswan, the father of Vaivaswatha Manu of Solar Dynasty has been identified as Surya Deva (The Sun).
Chandra is said to to be a son of Atri Maharshi, (a son of Brahma) or of the ocean (Ksheera Sagara Mathanam).
Chandra’s son Budha married Ila the daughter of Vaivaswata Manu and their son Pururavas inherited Pratishthanapura.
Both these dynasties are related.