What is the basis of Caste System?

“The Caste System” is based on two factors like;
(i) Discriminating and excluding the out caste groups.
(ii) Members ofthe same caste are not allowed to form different social community and marry in different caste group.
(iii) Thus, these are the extreme basis of the Caste System.