As far as I know, Indian castes are usually described as a system of hierarchical endogamous social division. Prohibition on intermarriages between members belonging to different castes in a tribal society has been taken as the essential nature of caste system. Indian caste system has undergone changes in different epoches (feudal, colonial and contemporary India) and has been put to different uses, but castes seem to have originated in Ancient times. See Marxist historian D.D. Kosambi's work, The Culture and Civilization of Ancient India in Historical Outline.
Ulhas