09-Network Management and Monitoring Command Reference

HomeSupportReference GuidesCommand ReferencesH3C WX Series Access Controllers Command References(R3308 R2308)-6W10709-Network Management and Monitoring Command Reference
07-Mirroring Commands
Title Size Download
07-Mirroring Commands 74.90 KB

 

 

NOTE:

Support for the configuration commands may vary depending on your device model. For more information, see About the WX Series Access Controllers Command References.

 

display mirroring-group

Syntax

display mirroring-group { group-id | all | local } [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

2: System level

Parameters

group-id: Number of the mirroring group to be displayed. Its value is 1.

all: Displays all mirroring groups.

local: Displays local mirroring groups.

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use display mirroring-group to display information about the specified mirroring group or groups, such as the types, status, and content of a mirroring group.

The output varies by mirroring group types and is sorted by mirroring group numbers.

Examples

# Display information about all the mirroring groups.

<Sysname> display mirroring-group all

mirroring-group 3:

    type: local

    status: active

    mirroring port:

        GigabitEthernet1/0/1  inbound

        GigabitEthernet1/0/2  both

    monitor port : GigabitEthernet1/0/3

Table 1 Command output

Field

Description

mirroring-group

Number of the mirroring group

type

Type of the mirroring group

status

Status of the mirroring group, which can be active or inactive

mirroring port

Source port

 

mirroring-group

Syntax

mirroring-group group-id local

undo mirroring-group { group-id | all | local }

View

System view

Default level

2: System level

Parameters

group-id: Number of the mirroring group, with value 1.

all: Removes all mirroring groups by using the undo command.

local: Creates a local mirroring group or removes all local mirroring groups with the undo command.

Description

Use mirroring-group to create a mirroring group.

Use undo mirroring-group to remove the specified mirroring group or groups.

By default, no mirroring group exists on a device.

Related commands: sampler.

Examples

# Create a local mirroring group numbered 1.

<Sysname> system-view

[Sysname] mirroring-group 1 local

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 { both | inbound | outbound }

View

System view

Default level

2: System level

Parameters

group-id: Number of a local or remote source group. The mirroring group specified by the group-id argument must already exist.

mirroring-port-list: A list of source ports/port ranges to be assigned to or removed from the mirroring group specified by group-id. You can specify up to eight single ports, port ranges, or combinations of both for the list. A single port takes the form of interface-type interface-number. A port range takes the form interface-type interface-number to interface-type interface-number ] }&<1-8>, where the end port number must be greater than the start port number, and &<1-8> indicates that you can specify up to eight combinations of single ports and port ranges.

both: Mirrors both inbound and outbound packets on the specified ports.

inbound: Mirrors only inbound packets on the specified ports.

outbound: Mirrors only outbound packets on the specified ports.

Description

Use mirroring-group mirroring-port to assign ports to a local or remote source group as source ports.

Use undo mirroring-group mirroring-port to remove source ports from the mirroring group.

By default, no source port is configured for any mirroring group.

When removing a source port from a mirroring group, make sure the traffic direction you specified in the undo mirroring-group mirroring-port command matches the actual monitored direction specified earlier in the mirroring-group mirroring-port command.

Related commands: mirroring-group.

Examples

# Create local mirroring group 1, configure GigabitEthernet 1/0/1 as a source port of the mirroring group, and specify that the mirroring group monitor the bidirectional traffic of the port.

<Sysname> system-view

[Sysname] mirroring-group 1 local

[Sysname] mirroring-group 1 mirroring-port gigabitethernet 1/0/1 both

mirroring-group monitor-port

Syntax

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

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

View

System view

Default level

2: System level

Parameters

group-id: Number of a local or remote destination group, with value 1. The mirroring group specified by group-id must already exist.

monitor-port-id: Port to be assigned to the specified mirroring group as the monitor port. The argument takes the form of interface-type interface-number, where interface-type specifies the port type and interface-number specifies the port number.

Description

Use mirroring-group monitor-port to assign a port to a local or remote destination group as the monitor port.

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

By default, no monitor port is configured for a mirroring group.

You cannot assign a source port in an existing mirroring group to another mirroring group as the monitor port.

Related commands: mirroring-group.

Examples

# Create local mirroring group 1, and configure port GigabitEthernet 1/0/1 as its monitor port.

<Sysname> system-view

[Sysname] mirroring-group 1 local

[Sysname] mirroring-group 1 monitor-port gigabitethernet 1/0/1

mirroring-port

Syntax

[ mirroring-group group-id ] mirroring-port { inbound | outbound | both }

undo [ mirroring-group group-id ] mirroring-port { inbound | outbound | both }

View

Interface view

Default level

2: System level

Parameters

mirroring-group group-id: Specifies a local or remote source group by its number, with value 1. The mirroring group specified by group-id must already exist.

both: Mirrors both inbound and outbound packets on the current port.

inbound: Mirrors only inbound packets on the current port.

outbound: Mirrors only outbound packets on the current port.

Description

Use mirroring-port to assign the current port to a local or remote source group as a source port.

Use undo mirroring-port to remove the current port from the mirroring group.

By default, a port does not serve as a source port for any mirroring group.

When removing a source port from a mirroring group, make sure the traffic direction you specified in the undo mirroring-group command matches the actual monitored direction of the port specified earlier in the mirroring-port command.

Examples

# Create local mirroring group 1, configure GigabitEthernet 1/0/1 as a source port of the mirroring group, and specify that the mirroring group monitor the bidirectional traffic of the port.

<Sysname> system-view

[Sysname] mirroring-group 1 local

[Sysname] interface gigabitethernet 1/0/1

[Sysname-GigabitEthernet1/0/1] mirroring-group 1 mirroring-port both

monitor-port

Syntax

[ mirroring-group group-id ] monitor-port

undo [ mirroring-group group-id ] monitor-port

View

Interface view

Default level

2: System level

Parameters

mirroring-group group-id: Specifies a local or remote destination group by its number, with value 1. The mirroring group specified by group-id must already exist.

Description

Use monitor-port to assign the current port to a local or remote destination group as the monitor port.

Use undo monitor-port to remove the current port from the mirroring group.

By default, a port does not serve any mirroring group as the monitor port.

You cannot configure a source port of an existing mirroring group as a monitor port.

Related commands: mirroring-group.

Examples

# Create local mirroring group 1, and configure GigabitEthernet 1/0/1 as its monitor port.

<Sysname> system-view

[Sysname] mirroring-group 1 local

[Sysname] interface gigabitethernet 1/0/1

[Sysname-GigabitEthernet1/0/1] monitor-port

# Create remote destination group 2, and configure GigabitEthernet 1/0/2 as its monitor port.

<Sysname> system-view

[Sysname] mirroring-group 2 remote-destination

[Sysname] interface gigabitethernet 1/0/2

[Sysname-GigabitEthernet1/0/2] monitor-port

 

 

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Intelligent Storage
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
  • Technical Blogs
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
新华三官网