To configure the control plane as a source for an On-board Packet Capture (OPC) session, and to define the direction of the
capture, use the monitor capture control-plane Privileged EXEC mode command. Use the no form of the command to remove the
control plane or a capture direction from the capture session.
Syntax
monitor capture capture-name
control-plane
{in | out | both}
no monitor capture
capture-name
control-plane [in | out | both]
Parameters
-
capture-name - The name of the OPC session (Range: 1-32 characters)
-
control-plane - Specifies the control plane as a source for the OPC session.
-
{in | out | both} - Defines the direction of the traffic to capture
Default configuration
The control plane is not defined as a source for an OPC session.
Command Mode
Privileged EXEC mode
User Guidelines
Use this command to define that the control plane is a source for an OPC session, and to define the direction of traffic to
capture. The control plane is the control traffic to and from the system CPU. This command is mandatory for an OPC session.
If the control plane is not defined as a source for an OPC session then the activation of the session (command monitor capture
start) will fail.
Use the in, out, or both keyword to define the direction of the traffic that will be captured. The in direction means that
only the traffic to the CPU will be captured. The out direction means that only the traffic from the CPU will be captured.
The both direction means that both traffic from and to the CPU will be captured.
If the command is defined multiple times, the direction defined in the most recent command will be the used as the capture
direction.
This command can be applied only for an OPC session that is not active.
If the OPC session named by the user already exists then this command will enable control plane packet capture for the existing
OPC session. If the OPC session named by the user does not exist, then this command will create the OPC session and enable
control plane packet capture for it. Up to 4 OPC sessions are supported.
Use the no monitor capture capture-name control-plane command to disable control-plane capturing.
Use the no monitor capture capture-name control-plane both command to disable control-plane capturing.
Use the no monitor capture capture-name control-plane in command to disable ingress traffic control-plane capturing. If only
the in direction was defined for this OPC session, then monitor capture for the control plane will be disabled. If the out
or both direction were defined for this capture session, then the capture will continue on the output traffic direction of
the control plane.
Use the no monitor capture capture-name control-plane out command to disable egress traffic control-plane capturing. If only
the out direction was defined for this OPC session, then monitor capture for the control plane will be disabled. If the in
or both direction were defined for this capture session, then the capture will continue on the ingress traffic direction of
the control plane.
Examples
Example 1: The following command enables packet capture on both directions of the control plane for OPC session cap3. If cap3 does
not exist, this command will also create the OPC session:
switchxxxxxx# monitor capture cap3 control-plane both
Example 2: The following example enables traffic capture on the ingress control plane traffic for an existing OPC session cap3. If
cap3 does not exist, this command will also create the OPC session:
switchxxxxxx# monitor capture cap3 control-plane in
Example 3: The execution of the command in the next example fails because the capture has been activated on OPC session cap3:
switchxxxxxx# monitor capture cap3 control-plane out
Cannot modify - Capture point is currently active.
Example 4: The following example disables control plane traffic capture for cap3 OPC session:
switchxxxxxx# no monitor capture cap3 control-plane
Example 5: The following example disables traffic capture only for the control plane egress direction:
switchxxxxxx# no monitor capture cap3 control-plane out