What sort of ways have people used throughout history to identify other people who belong/don't belong to the same caste as them? Couldn't someone just change their clothes/dress and attempt to pass themselves off as a member of a separate caste?
In Japan, one method of doing so has been by the family name and place of birth. For instance, while this sort of discrimination was supposedly done away with during the Meiji Restoration, a class of people called burakumin, whom were historically associated with jobs like executioner, slaughterer, and gravedigger (things involving death, which was thought to make one impure), were and have still been discriminated, although this has been less of an issue to the current day. However, in the 1970s, there was a book being circulated that purported to have the addresses and names of burakumin residents, a copy of which was found in many large Japanese businesses, the idea being that its purpose was to assist Japanese people in situations involving family troubles or employment concerns, i.e. de facto discrimination.