H3C WX3000 Series Unified Switches Switching Engine Command Reference-6W103

HomeSupportWirelessH3C WX3000 Series Unified SwitchesReference GuidesCommand ReferencesH3C WX3000 Series Unified Switches Switching Engine Command Reference-6W103
22-Mirroring Command
Title Size Download
22-Mirroring Command 54.66 KB

Mirroring Commands

display mirroring-group

Syntax

display mirroring-group { group-id | all | local | remote-destination | remote-source }

View

Any view

Parameters

group-id: Number of a port mirroring group, in the range of 1 to 20.

all: Specifies to display the parameter settings of all mirroring groups.

local: Specifies to display the parameter settings of local port mirroring groups.

remote-destination: Specifies to display the parameter settings of the destination groups for remote mirroring.

remote-source: Specifies to display the parameter settings of the source groups for remote mirroring.

Description

Use the display mirroring-group command to display the information of a mirroring group.

Related commands: mirroring-group mirroring-port, mirroring-group monitor-port.

Examples

# Display the configuration information about port mirroring group 1.

<device> display mirroring-group 1

mirroring-group 1:

    type: local

    status: active

    mirroring port:

        GigabitEthernet1/0/1  both

    mirroring mac:

    mirroring vlan:

    monitor port: GigabitEthernet1/0/2

Table 1-1 display mirroring-group command output description

Field

Description

type

A mirroring group’s type, including local, remote-source and remote-destination.

status

A mirroring group’s status. “active” for already effective, and “inactive” for not effective yet.

mirroring port

Mirroring source port

both

The direction of packets to be mirrored:

l      both: mirrors the packets received on and sent by the port.

l      inbound: mirrors the packets received on the port.

l      outbound: mirrors the packets sent by the port.

mirroring mac

The specified MAC address and VLAN ID for MAC-based mirroring

mirroring vlan

The specified VLAN ID for VLAN-based mirroring

monitor port

Mirroring destination port

 

mirroring-group

Syntax

mirroring-group group-id { local | remote-destination | remote-source }

undo mirroring-group { group-id | all | local | remote-destination | remote-source }

View

System view

Parameters

group-id: Number of a port mirroring group, in the range 1 to 20.

all: Specifies to remove all mirroring groups.

local: Specifies the mirroring group as a local port mirroring group.

remote-destination: Specifies the mirroring group as the destination mirroring group for remote port mirroring.

remote-source: Specifies the mirroring group as the source mirroring group for remote port mirroring.

Description

Use the mirroring-group command to configure a port mirroring group.

Use the undo mirroring-group command to remove a port mirroring group.

Related commands: display mirroring-group.

Examples

# Configure a port mirroring group on the local device.

<device> system-view

System View: return to User View with Ctrl+Z.

[device] mirroring-group 1 local

mirroring-group mirroring-mac

Syntax

mirroring-group group-id mirroring-mac mac vlan vlan-id

undo mirroring-group group-id mirroring-mac [ [ mac ] vlan vlan-id ]

View

System view

Parameters

group-id: Number of a port mirroring group, in the range 1 to 20.

mac: Specified MAC address, in the format of H-H-H. The MAC address must be a static one existing in the MAC address table.

vlan vlan-id: Specifies the VLAN to which the static MAC address belongs.

Description

Use the mirroring-group mirroring-mac command to configure the MAC-based mirroring for a local or remote source mirroring group.

Use the undo mirroring-group mirroring-mac command to remove the configuration.

Examples

# Configure MAC-based mirroring to mirror packets whose source/destination MAC addresses match 000f-e20f-0101 to port GigabitEthernet 1/0/2 on the local device.

<device> system-view

System View: return to User View with Ctrl+Z.

[device] mac-address static 000f-e20f-0101 interface Gigabitethernet 1/0/1 vlan 2

[device] mirroring-group 1 local

[device] mirroring-group 1 mirroring-mac 000f-e20f-0101 vlan 2

[device] mirroring-group 1 monitor-port GigabitEthernet 1/0/2

mirroring-group mirroring-port

Syntax

mirroring-group group-id mirroring-port mirroring-port-list { both | inbound | outbound }

undo mirroring-group group-id mirroring-port mirroring-port-list

View

System view/Ethernet port view

Parameters

group-id: Number of a port mirroring group, in the range 1 to 20.

mirroring-port mirroring-port-list: Specifies a list of source ports. mirroring-port-list is available in system view only, and there is no such argument in Ethernet port view. mirroring-port-list is provided in the format of mirroring-port-list = { interface-type interface-number [ to interface-type interface-number ] }&<1-8>, where interface-type is the port type, and interface-number is the port number, and &<1-8> means that you can specify up to 8 ports or port lists.

both: Specifies to mirror the packets received on and sent from the port.

inbound: Specifies to mirror the packets received on the port.

outbound: Specifies to mirror the packets sent from the port.

Description

Use the mirroring-group mirroring-port command to configure the source ports for a local mirroring group or a remote source mirroring group.

Use the undo mirroring-group mirroring-port command to remove the source ports of a local mirroring group or a remote source mirroring group.

Note that you cannot configure a member port of an existing mirroring group as a source port for port mirroring.

Related commands: display mirroring-group.

Examples

# Configure GigabitEthernet 1/0/1 as the source port of local mirroring group 1, and mirror all packets received on this port.

<device> system-view

System View: return to User View with Ctrl+Z.

[device] mirroring-group 1 local

[device] mirroring-group 1 mirroring-port GigabitEthernet 1/0/1 inbound

mirroring-group mirroring-vlan

Syntax

mirroring-group group-id mirroring-vlan vlan-id inbound

undo mirroring-group group-id mirroring-vlan [ vlan-id inbound ]

View

System view

Parameters

group-id: Number of a port mirroring group, in the range 1 to 20.

mirroring-vlan vlan-id: Specifies a VLAN. The vlan-id argument ranges from 1 to 4094. The specified VLAN must be an existing VLAN on the device.

inbound: Specifies to mirror packets received on all ports of the VLAN.

Description

Use the mirroring-group mirroring-vlan command to configure the VLAN-based mirroring for a local or remote source mirroring group.

Use the undo mirroring-group mirroring-vlan command to remove the configuration.

You can monitor packets of multiple VLANs by executing the mirroring-group mirroring-vlan command for several times.

Examples

# Configure VLAN-based mirroring to mirror packets received on all ports in VLAN 2 to port GigabitEthernet 1/0/2 on the local device.

<device> system-view

System View: return to User View with Ctrl+Z.

[device] mirroring-group 1 local

[device] mirroring-group 1 mirroring-vlan 2 inbound

[device] mirroring-group 1 monitor-port GigabitEthernet 1/0/2

mirroring-group monitor-port

Syntax

mirroring-group group-id monitor-port monitor-port

undo mirroring-group group-id monitor-port monitor-port

View

System view/Ethernet port view

Parameters

group-id: Number of a port mirroring group, in the range 1 to 20.

monitor-port monitor-port: Specifies the destination port for port mirroring. monitor-port is available in system view only, and there is no such argument in Ethernet port view.

Description

Use the mirroring-group monitor-port command to configure the destination port for a local mirroring group or a remote destination mirroring group.

Use the undo mirroring-group monitor-port to remove the destination port of a local mirroring group or a remote destination mirroring group.

Note that you cannot configure a member port of an existing mirroring group, a member port of an aggregation group, or a port enabled with LACP or STP as the destination port.

Related commands: display mirroring-group.

Examples

# Configure GigabitEthernet 1/0/4 as the destination port of local mirroring group 1.

<device> system-view

System View: return to User View with Ctrl+Z.

[device] mirroring-group 1 local

[device] mirroring-group 1 monitor-port GigabitEthernet 1/0/4

mirroring-group reflector-port

Syntax

mirroring-group group-id reflector-port reflector-port

undo mirroring-group group-id reflector-port reflector-port

View

System view/Ethernet port view

Parameters

group-id: Number of a port mirroring group, in the range 1 to 20.

reflector-port reflector-port: Specifies the reflector port. reflector-port is available in system view only, and there is no such argument in Ethernet port view.

Description

Use the mirroring-group reflector-port command to specify the reflector port for a remote source mirroring group.

Use the undo mirroring-group reflector-port command to remove the reflector port of a remote source mirroring group.

Note the following when you configure the reflector port:

l          The reflector port cannot be a member port of an existing mirroring group, a member port of an aggregation group, or a port enabled with LACP or STP. It must be an access port and cannot be configured with the functions like VLAN-VPN, port loopback detection, QoS, port security, and so on.

l          You cannot modify the duplex mode, port rate, and MDI attribute of a reflector port.

Examples

# Configure GigabitEthernet 1/0/2 as the reflector port of remote source mirroring group 1.

<device> system-view

System View: return to User View with Ctrl+Z.

[device] mirroring-group 1 remote-source

[device] mirroring-group 1 reflector-port GigabitEthernet 1/0/2

mirroring-group remote-probe vlan

Syntax

mirroring-group group-id remote-probe vlan remote-probe-vlan-id

undo mirroring-group group-id remote-probe vlan remote-probe-vlan-id

View

System view

Parameters

group-id: Number of a port mirroring group, in the range 1 to 20.

remote-probe vlan remote-probe-vlan-id: Specifies the remote-probe VLAN for the mirroring group.

Description

Use the mirroring-group remote-probe vlan command to specify the remote-probe VLAN for a remote source/destination mirroring group.

Use the undo mirroring-group remote-probe vlan command to remove the configuration of remote-probe VLAN for a remote source/destination mirroring group.

Related commands: display mirroring-group.

Examples

# Configure VLAN 100 as the remote-probe VLAN of remote source mirroring group 1.

<device> system-view

System View: return to User View with Ctrl+Z.

[device] mirroring-group 1 remote-source

[device] mirroring-group 1 remote-probe vlan 100

mirroring-port

Syntax

mirroring-port { both | inbound | outbound }

undo mirroring-port

View

Ethernet port view

Parameters

both: Specifies to mirror all packets received on and sent from the port.

inbound: Specifies to mirror the packets received on the port.

outbound: Specifies to mirror the packets sent from the port.

Description

Use the mirroring-port command to configure the source port.

Use the undo mirroring-port command to remove the configuration of the source port.

Note that you cannot configure a member port of an existing mirroring group as a source port for port mirroring.

Related commands: display mirroring-group.

 

When you configure mirroring source port on an Ethernet port, if local mirroring group 1 does not exist, the device creates the group and adds the port to the group; if local mirroring group 1 already exists, but is not a local mirroring group, your configuration of the source port will fail.

 

Examples

# Configure GigabitEthernet 1/0/1 as the source port, and mirror all packets received on and sent from this port.

<device> system-view

System View: return to User View with Ctrl+Z.

[device] interface GigabitEthernet 1/0/1

[device-GigabitEthernet1/0/1] mirroring-port both

monitor-port

Syntax

monitor-port

undo monitor-port

View

Ethernet port view

Parameters

None

Description

Use the monitor-port command to configure the destination port.

Use the undo monitor-port command to remove the configuration of the destination port.

Note that you cannot configure a member port of an aggregation group, a member port of an aggregation group, or a port enabled with LACP and STP as the mirroring destination port.

Related commands: display mirroring-group.

 

When you configure mirroring destination port on an Ethernet port, if local mirroring group 1 does not exist, the device creates the group and adds the port to the group; if local mirroring group 1 already exists, but is not a local mirroring group, your configuration of the destination port will fail.

 

Examples

# Configure GigabitEthernet 1/0/4 as the destination port.

<device> system-view

System View: return to User View with Ctrl+Z.

[device] interface GigabitEthernet 1/0/4

[device-GigabitEthernet1/0/4] monitor-port

remote-probe vlan

Syntax

remote-probe vlan enable

undo remote-probe vlan enable

View

VLAN view

Parameters

None

Description

Use the remote-probe vlan enable command to configure the current VLAN as the remote-probe VLAN.

Use the undo remote-probe vlan enable command to restore the remote-probe VLAN to a normal VLAN.

Note that you cannot configure a default VLAN, a management VLAN, or a dynamic VLAN as the remote-probe VLAN.

Examples

# Configure VLAN 5 as the remote-probe VLAN.

<device> system-view

System View: return to User View with Ctrl+Z.

[device] vlan 5

[device-vlan5] remote-probe vlan enable

 

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
All Support
  • Become A Partner
  • Partner Policy & Program
  • Global Learning
  • Partner Sales Resources
  • Partner Business Management
  • Service Business
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网