H3C S9500 Command Manual-Release2132[V2.03]-01 IP Access Volume

HomeSupportSwitchesH3C S9500 Series SwitchesReference GuidesCommand ReferencesH3C S9500 Command Manual-Release2132[V2.03]-01 IP Access Volume
05-Port Mirroring Commands
Title Size Download
05-Port Mirroring Commands 62.94 KB

Chapter 1  Port Mirroring Configuration Commands

1.1  Port Mirroring Configuration Commands

1.1.1  display mirroring-group

Syntax

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

View

Any view

Default Level

1: Monitor level

Parameters

groupid: Number of the port mirroring group to be displayed, in the range 1 to 24.

all: Displays all port mirroring groups.

local: Displays local mirroring groups.

remote-destination: Displays remote destination mirroring groups.

remote-source: Displays remote source port mirroring groups.

Description

Use the display mirroring-group command to display information about the specified port mirroring group or groups.

The output varies by port mirroring group type and is sorted by mirroring group number.

Examples

# Display information about all port mirroring groups.

<Sysname> display mirroring-group all

mirroring-group 3:

    type: local

    status: active

    mirroring port:

        GigabitEthernet4/2/1  inbound

        GigabitEthernet4/2/2  outbound

    monitor port: GigabitEthernet4/3/1

mirroring-group 6:

    type: remote-source

    status: inactive

    mirroring port:

        GigabitEthernet4/3/4  inbound

    reflector port: GigabitEthernet4/2/4

    remote-probe vlan:

mirroring-group 9:

    type: remote-destination

    status: active

    monitor port: GigabitEthernet4/2/1

    remote-probe vlan: 2

Table 1-1 Description on the fields of the display mirroring-group command

Field

Description

mirroring-group

Port mirroring group number

type

Port mirroring group type, which can be local, remote-source, and remote-dest.

status

Status of a port mirroring group. “Active” for already effective, and “inactive” for not effective yet.

mirroring port

Port where traffic is copied.

monitor port

Port to which mirrored traffic is sent.

reflector port

Reflector port used for remote port mirroring.

remote-probe vlan

VLAN used for transmitting mirrored traffic. It is used for remote port mirroring.

 

1.1.2  mirroring-group

Syntax

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

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

View

System view

Default Level

2: System level

Parameters

groupid: Specifies the number of the port mirroring group to be created or removed, in the range 1 to 24.

local: Creates/removes a local port mirroring group.

remote-source: Creates/removes a remote source port mirroring group.

remote-destination: Creates/removes a remote destination port mirroring group.

all: Removes all the port mirroring groups.

Description

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

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

Specify the type of a port mirroring group to be created:

l           With local specified, you create a local port mirroring group.

l           With remote-destination specified, you create a remote destination port mirroring group.

l           With remote-source specified, you create a remote source port mirroring group.

Specify the type or ID of the port mirroring group to be deleted:

l           With groupid specified, you delete the port mirroring group with the groupid.

l           With all specified, you delete all the port mirroring groups.

l           With local specified, you delete all the local port mirroring groups.

l           With remote-destination specified, you delete all the remote destination port mirroring groups.

l           With remote-source specified, you delete all the remote source port mirroring groups.

Examples

# Create a local port mirroring group numbered 1.

<Sysname> system-view

[Sysname] mirroring-group 1 local

1.1.3  mirroring-group mirroring-port

Syntax

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

undo mirroring-group groupid mirroring-port mirroring-port-list { inbound | outbound | both }

View

System view

Default Level

2: System level

Parameters

groupid: Number of a local or remote source mirroring group, in the range 1 to 24.

mirroring-port-list: A list of ports/port ranges to be assigned to or removed from the port mirroring group specified by groupid. The total number of single ports plus port ranges cannot exceed eight. In the list, a single port takes the form of interface-type interface-number. A port range takes the form interface-type start-interface-number to interface-type end-interface-number, where the end port number must be greater than the start port number.

inbound: Mirrors only inbound packets on the specified port(s).

outbound: Mirrors only outbound packets on the specified port(s).

both: Mirrors both inbound and outbound packets on the specified port(s).

Description

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

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

When removing a mirroring 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 of the port. Otherwise, the removal will fail.

Examples

# Assign ports Ethernet 1/1/1 through Ethernet 1/1/6 to port mirroring group 1 as mirroring ports, assuming that port mirroring group 1 already exists.

<Sysname> system-view

[Sysname] mirroring-group 1 mirroring-port ethernet 1/1/1 to ethernet 1/1/6 both

# Remove ports Ethernet 1/1/1 through Ethernet1/1/4 from port mirroring group 1.

<Sysname> system-view

[Sysname] undo mirroring-group 1 mirroring-port ethernet 1/1/1 to ethernet 1/1/4 both

1.1.4  mirroring-group monitor-port

Syntax

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

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

View

System view

Default Level

2: System level

Parameters

groupid: Number of a local or remote destination mirroring group, in the range 1 to 24.

monitor-port-id: Specifies the 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 the mirroring-group monitor-port command to assign a port to a local or remote destination mirroring group as the monitor port.

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

Note that:

l           Before assigning a port to a mirroring group, make sure that the group already exists.

l           In a mirroring group, you can configure only one monitor port. This port must not belong to any other mirroring group.

Examples

# Configure Ethernet 1/1/1 as the monitor port in the remote destination mirroring group numbered 1.

<Sysname> system-view

[Sysname] mirroring-group 1 remote-destination

[Sysname] mirroring-group 1 monitor-port ethernet 1/1/1

1.1.5  mirroring-group reflector-port

Syntax

In system view:

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

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

In Ethernet interface view:

mirroring-group groupid reflector-port

undo mirroring-group groupid reflector-port

View

System view, Ethernet interface view

Default Level

2: System level

Parameters

groupid: Number of a remote source mirroring group, in the range 1 to 24.

reflector-port-id: Port to be configured as the reflector port in the specified mirroring group. 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 the mirroring-group reflector-port command to configure the reflector port in a remote source mirroring group.

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

 

&  Note:

l      A remote source port mirroring group can contain only one reflector port.

l      Ports on XP4CA, XP4B, GV48D, GP48D, and XP4DB boards cannot be configured as the reflector ports for port mirroring.

 

Examples

# Configure port Ethernet 1/1/1 as the reflector port of the remote source mirroring group numbered 1 in system view.

<Sysname> system-view

[Sysname] mirroring-group 1 remote-source

[Sysname] mirroring-group 1 reflector-port ethernet 1/1/1

# Configure port Ethernet 1/1/2 as the reflector port of the remote source mirroring group numbered 2 in interface view.

<Sysname> system-view

[Sysname] mirroring-group 2 remote-source

[Sysname] interface ethernet 1/1/2

[Sysname-Ethernet1/1/2] mirroring-group 2 reflector-port

1.1.6  mirroring-group remote-probe vlan

Syntax

mirroring-group groupid remote-probe vlan rprobe-vlan-id

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

View

System view

Default Level

2: System level

Parameters

groupid: Number of a remote source or destination mirroring group, in the range 1 to 24.

rprobe-vlan-id: ID of the VLAN to be configured as the remote probe VLAN. This VLAN must be a static VLAN that already exists.

Description

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

Use the undo mirroring-group remote-probe vlan command to remove a remote probe VLAN from its remote source or destination mirroring group.

For a remote source or destination mirroring group, you must configure and can configure only one remote probe VLAN to carry mirrored packets. For the mirrored packets to be forwarded to the monitor port, ensure that the probe VLAN you configured is the same as the one configured in the cooperating mirroring group on the remote device.

 

&  Note:

To ensure correct packet handling, you are recommended to use the VLAN configured as a remote probe VLAN for remote mirroring only.

 

Examples

# Specify VLAN 2 as the remote probe VLAN of the remote source mirroring group numbered 1, assuming that VLAN 2 already exists.

<Sysname> system-view

[Sysname] mirroring-group 1 remote-source

[Sysname] mirroring-group 1 remote-probe vlan 2

1.1.7  mirroring-port

Syntax

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

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

View

Ethernet interface view

Default Level

2: System level

Parameters

groupid: Number of a local or remote source mirroring group, in the range 1 to 24.

inbound: Mirrors only inbound packets on the current port.

outbound: Mirrors only outbound packets on the current port.

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

Description

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

Use the undo mirroring-port command to remove the current port from the port mirroring group to which it has been assigned as a mirroring port.

When assigning a port to a mirroring group as a mirroring port, note that:

l           If you do not specify the mirroring-group groupid keyword-argument combination, the mirroring-port command adds the current port to port mirroring group 1.

l           When removing a mirroring port from a mirroring group, make sure the traffic direction you specified in the undo [ mirroring-group groupid ] mirroring-port command matches the actual monitored direction of the port. Otherwise, the removal will fail.

Examples

# Configure port Ethernet 1/1/1 as a mirroring port in the remote source mirroring group numbered 2.

<Sysname> system-view

[Sysname] mirroring-group 2 remote-source

[Sysname] interface ethernet 1/1/1

[Sysname-Ethernet1/1/1] mirroring-group 2 mirroring-port both

1.1.8  monitor-port

Syntax

[ mirroring-group groupid ] monitor-port

undo [ mirroring-group groupid ] monitor-port

View

Ethernet interface view

Default Level

2: System level

Parameters

groupid: Number of a local or remote destination mirroring group, in the range 1 to 24.

Description

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

Use the undo monitor-port command to remove the current port from the port mirroring group to which it has been assigned as the monitor port.

When assigning a port to a mirroring group as the monitor port, note that:

l           If you do not specify the mirroring-group groupid keyword-argument combination, the monitor-port command adds the current port to port mirroring group 1.

l           The port cannot belong to any other mirroring group.

Examples

# Configure port Ethernet 1/1/1 as the monitor port of local mirroring group numbered 1.

<Sysname> system-view

[Sysname] mirroring-group 1 local

[Sysname] interface ethernet 1/1/1

[Sysname-Ethernet1/1/1] monitor-port

 

  • 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
新华三官网