Be consistent in following the rules, in order to set a good example. Otherwise, students would not respect you, and gradually lose interest in your class. The rules to be followed should be explained to the students properly, so that they do not have any doubts regarding them.