Use the commands in this section to configure port mirroring.
Go to CLI configuration mode:
hostname > enable hostname # configure terminal
View the interface configuration:
hostname (config) # show policymgr interfaces
If the interface pair with the mirror port is not already in tap mode, change it:
hostname (config) # policymgr interface <interfacePair> op-mode tap hostname (config) # policymgr interface <interfacePair> re-configure
where
<interfacePair>is the interface pair designation.Configure the mirror port:
hostname (config) # policymgr interface <interfacePair> mirror port <portName>
where
<interfacePair>is the interface pair from which traffic will be forwarded, and<portName>is the port that will receive the mirrored traffic.Verify your change:
hostname (config) # show policymgr interfaces
Save your change:
hostname (config) # write memory
Note
If you configure multiple mirror ports for the same interface pair in the same session, the last port you configure takes effect. In the following example, pether6 is overwritten by pether9.
hostname (config) # policymgr interface A mirror port pether6 hostname (config) # policymgr interface A mirror port pether9
Go to CLI configuration mode:
hostname > enable hostname # configure terminal
Clear the mirror port:
hostname (config) # policymgr interface <interfacePair> mirror clear
Verify your change:
hostname (config) # show policymgr interfaces
Save your change:
hostname (config) # write memory
Examples
The following example displays the current interface pairs and their status, and then configures pether6 on Interface B as the mirror port for the monitoring traffic on Interface A.
hostname (config) # show policymgr interfaces Policy enabled : yes Interface A Active : yes op mode : monitor (permissive) fail-safe : close policy : mixed tolerance : 1 mirror-port : Ports : pether3 pether4 QinQ : no QinQ-evet : 0x88a8 Interface B Active : yes op-mode : tap (tapping) fail-safe : close policy : mixed tolerance : 1 mirror-port : Ports : pether5 pether6 QinQ : no QinQ-evet : 0x88a8 Interface C Active : yes op mode : tap (tapping) fail-safe : close policy : mixed tolerance : 1 mirror-port : Ports : pether7 pether8 QinQ : no QinQ-evet : 0x88a8 Interface D Active : yes op mode : tap (tapping) fail-safe : close policy : mixed tolerance : 1 mirror-port : Ports : pether9 pether10 QinQ : no QinQ-evet : 0x88a8 hostname (config) # policymgr interface A mirror port pether6 hostname (config) # show policymgr interfaces Policy enabled : yes Interface A Active : yes op mode : monitor (permissive) fail-safe : close policy : mixed tolerance : 1 mirror-port : pether6 Ports : pether3 pether4 QinQ : no QinQ-evt : 0x88a8 ...
The following example clears port mirroring on Interface A.
hostname (config) # policymgr interface A mirror clear
The following example configures pether6 as the mirror port for both Interface A and Interface D.
hostname (config) # policymgr interface A mirror port pether6 hostname (config) # policymgr interface D mirror port pether6
The following example configures pether6 as the mirror port for Interface A and pether9 as the mirror port for Interface C.
hostname (config) # policymgr interface A mirror port pether6 hostname (config) # policymgr interface C mirror port pether9
Configuring NX to handle QinQ traffic
When the NX appliance is receiving only QinQ traffic on a port pair, enabling QinQ mode on those ports is essential for proper handling of packets/traffic. In this case, it is essential to enable QinQ mode on the specified port pair to avoid latency or datapath related issues.
When the NX appliance is receiving mixed traffic (no vLAN tag, single vLAN tag, and double vLAN tag QinQ traffic) on a port pair, it is important to separate the QinQ (doble vLAN) traffic to different port pair and enable QinQ mode on that respective port pair for optimal performance and proper handling.
The following example displays commands to enable QinQ mode:
NX-2500-254 (config) # policymgr interface A qinq ? evet Configure interface QinQ external vlan ether type evlan Configure interface QinQ flag hostname (config) # policymgr interface A qinq evlan enable hostname (config) # policymgr interface A qinq evet 0x? 0x88a8 802.1ad ether type 0x9100 802.1QinQ ether type 0x8100 802.1Q ether type hostname (config) # policymgr interface A qinq evet 0x8100 hostname (config) # policymgr interface A re-configure