Access control list-based port mirroring techniques
Embodiments presented herein describe techniques for selecting incoming network frames to be mirrored using an access control list. According to one embodiment, an incoming frame is received. Upon determining that the incoming frame matches an entry in the access control list, a mirror field of the entry is evaluated. The mirror field identifies at least one mirroring action to perform on the frame. The identified mirroring action is performed on the frame.
1. A method for mirroring an incoming frame based on an access control list, the method comprising:
storing mirroring settings in one or more configuration registers;
upon determining that the incoming frame matches an entry in the access control list, identifying an action to perform on the frame, wherein the entry includes a field which includes a plurality of bits specifying one of a plurality of actions, and wherein the plurality of actions that can be specified by the plurality of bits comprises one or more of:
(i) performing mirroring according to the mirroring settings specified in the configuration registers,
(ii) bypassing the mirroring settings specified in the configuration registers and mirroring the frame,
(iii) bypassing logical port and VLAN filtering criteria in the mirroring settings specified in the configuration registers and mirroring the frame if a sampling process is enabled and permits the mirroring of the frame, and
(iv) bypassing the mirroring settings specified in the configuration registers and not mirroring the frame; and
performing the identified action on the frame.
2. The method of claim 1 , wherein performing the sampling process comprises:
decrementing a sample counter by one; and
upon determining the sample counter is equal to zero:
mirroring the frame, and
resetting the sample counter to a non-zero value.
3. The method of claim 2 , wherein performing the sampling process further comprises, upon determining the sample counter has a non-zero value after decrementing the sample counter, declining to mirror the frame.
4. The method of claim 1 , wherein the sampling process is performed in a metering control block of the access control list.
5. The method of claim 1 , wherein the access control list specifies conditions for processing a frame according to a rule and actions for managing incoming network frames in a distributed networking switch.