A couple of factors must first be kept in mind. Childhood quarrels such as the one you describe often result from petty prejudices or imagined grievances. It is also difficult to know for certain that your son is completely innocent. The ideal solution is to make contact with the parents of the classmates in question and to try to work out a reconciliation between the youngsters through adult guidance.
The problem facing your son can also be turned into a valuable educational experience. Life can be filled with situations of social hostility of which he is receiving a foretaste at a very young age. You must therefore guide him in breaking down the barriers that separate him from those classmates and expose him to what he views as unjust harassment. Parents can certainly help in such an effort by inviting those classmates to their home for a meal or activity in which they must be polite to their hosts child and thus foster a new relationship. King Solomon has already advised us to feed our enemy and there is the famous Talmudic dictum that hospitality has the power to turn enemies into friends.
Only if such efforts fail because of the violent nature of your son's classmates should you resort to involving the school authorities or consider transferring schools.