Patent ID: 8155118

Claim:
A method of mirroring network traffic, the method comprising: receiving a data packet by a network device; categorizing the data packet into one of a plurality of monitoring classes, wherein each of the plurality of monitoring classes identifies a different type of data packet, wherein at least one of the plurality of monitoring classes is to be mirrored and at least another one of the plurality of monitoring classes is not to be mirrored, and wherein at least one of the plurality of monitoring classes has a different probability of being randomly selected for mirroring than at least another one of the plurality of monitoring classes; in response to a determination that the data packet is categorized into a monitoring class to be mirrored, applying an algorithm including randomization to determine whether the data packet is selected to be mirrored, wherein the probability that the data packet is selected to be mirrored is based upon the monitoring class into which the data packet is categorized; sending the data packet to a destination port; and if the data packet is selected to be mirrored, then also sending the data packet to a mirror port.