1. A computer-implementable method comprising: providing a sequence of rules for a packet classifier; marking at least one upward redundant rule; marking at least one downward redundant rule; removing at least one rule marked as upward redundant; and removing at least one rule marked as downward redundant.