H3C S5500-SI Series Ethernet Switches Command Manual(V1.01)

HomeSupportSwitchesH3C S5500 Switch SeriesReference GuidesCommand ReferencesH3C S5500-SI Series Ethernet Switches Command Manual(V1.01)
21-Port Mirroring Commands
Title Size Download
21-Port Mirroring Commands 62 KB

Chapter 1  Port Mirroring Configuration Commands

1.1  Port Mirroring Configuration Commands

1.1.1  display mirroring-group

Syntax

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

View

Any view

Parameters

group-id: Port mirroring group number, in the range of 1 to 4.

all: Specifies all the port mirroring groups.

local: Specifies local port mirroring groups.

remote-destination: Specifies remote destination port mirroring groups.

remote-source: Specifies remote source port mirroring groups.

Description

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

The output information varies with port mirroring group type and is organized by mirroring group numbers.

Examples

# Display the information about all the port mirroring groups.

<Sysname> display mirroring-group all

mirroring-group 1:

    type: local

    status: active

    mirroring port:

        GigabitEthernet1/0/1  both

    monitor port: GigabitEthernet1/0/10

mirroring-group 2:

    type: remote-source

    status: active

    mirroring port:

        GigabitEthernet1/0/3  both

    monitor egress port: GigabitEthernet1/0/11

    remote-probe vlan: 200

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-destination.

status

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

mirroring port

Source mirroring port

monitor port

Destination mirroring port

monitor egress port

Outbound mirroring port

remote-probe vlan

Remote mirroring VLAN

 

1.1.2  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: Port mirroring group number, in the range of 1 to 4.

all: Removes All the port mirroring groups.

local: Creates/Removes a local port mirroring group.

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

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

Description

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

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

You need to specify the type of the port mirroring group to be created when creating it.

l           Use the keyword local to create a local port mirroring group.

l           Use the keyword remote-destination to create a remote destination port mirroring group.

l           Use the keyword remote-source to create a remote source port mirroring group.

You need to specify the port mirroring group type or the mirroring group number when removing a port mirroring group:

l           Use the group-id argument to specify the port mirroring group to be removed.

l           Use the all keyword to remove all the port mirroring groups.

l           Use the local keyword to remove all the local port mirroring groups.

l           Use the remote-destination keyword to remove all the remote destination port mirroring groups.

l           Use the remote-source keyword to remove all the remote source mirroring groups.

Examples

# Create a local port mirroring group numbered 1.

<Sysname> system-view

[Sysname] mirroring-group 1 local

# Create remote destination mirroring group numbered 2.

<Sysname> system-view

[Sysname] mirroring-group 2 remote-destination

1.1.3  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

Parameters

group-id: Port mirroring group number, in the range of 1 to 4.

mirroring-port-list: List of ports to be added to the port mirroring group. You can specify multiple ports by providing this argument in the form of { interface-type interface-number [ to interface-type interface-number ] }&<1-8>, where the interface-type argument is port type, the interface-number argument is the port number, and &<1-8> means that you can provide up to eight port indexes/port index lists for this argument.

both: Specifies to duplicate both inbound and outbound packets.

inbound: Specifies to duplicate inbound packets only.

outbound: Specifies to duplicate outbound packets only.

Description

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

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

Note that:

l           The source port cannot be a member port of the current mirroring group.

l           A remote destination mirroring group cannot contain source mirroring ports.

Examples

# Add ports to port mirroring group 1 as source ports (assuming that port mirroring group 1 already exists).

<Sysname> system-view

[Sysname] mirroring-group 1 mirroring-port GigabitEthernet 1/0/1 to GigabitEthernet 1/0/5 both

# Remove source mirroring ports from port mirroring group 1.

[Sysname] undo mirroring-group 1 mirroring-port GigabitEthernet 1/0/1 to GigabitEthernet 1/0/3 both

1.1.4  mirroring-group monitor-egress

Syntax

In system view:

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

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

In Ethernet port view:

mirroring-group group-id monitor-egress

undo mirroring-group group-id monitor-egress

View

System view, Ethernet port view

Parameters

group-id: Port mirroring group number, in the range of 1 to 4.

monitor-egress-port-id: Index of the port to be configured as the outbound mirroring port. You need to provide this argument in the format of { interface-type interface-number }, where interface-type is port type and interface-number is port number.

Description

Use the mirroring-group monitor-egress command to configure a port as the outbound mirroring port of a remote port mirroring group.

Use the undo mirroring-group monitor-egress command to remove the outbound mirroring port configured from a remote port mirroring group.

Note that:

l           Only remote source port mirroring groups can have outbound mirroring ports. A port mirroring group can have only one outbound mirroring port.

l           The outbound port cannot be a member port of the current mirroring group.

l           It is not recommended to configure STP, RSTP, MSTP, 802.1x, IGMP Snooping, static ARP and MAC address learning on the outbound mirroring port; otherwise, the mirroring function may be affected.

Examples

# Configure port GigabitEthernet 1/0/1 as the outbound mirroring port of remote port mirroring group 1 in system view.

<Sysname> system-view

[Sysname] mirroring-group 1 remote-source

[Sysname] mirroring-group 1 monitor-egress GigabitEthernet 1/0/1

# Configure port GigabitEthernet 1/0/2 as the outbound mirroring port of remote port mirroring group 2 in Ethernet port view.

<Sysname> system-view

[Sysname] mirroring-group 2 remote-source

[Sysname] interface GigabitEthernet 1/0/2

[Sysname-GigabitEthernet1/0/2] mirroring-group 2 monitor-egress

1.1.5  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

Parameters

group-id: Port mirroring group number, in the range of 1 to 4.

monitor-port-id: Port index. You need to provide this argument in the form of interface-type interface-number, where interface-type is the port type and interface-number is the port number.

Description

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

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

Note that:

l           A port mirroring group can contain only one destination port.

l           The destination port cannot be a member port of the current mirroring group.

l           The destination mirroring port can be an access, trunk, or hybrid port. It must be assigned to the remote mirroring VLAN.

l           A remote source port mirroring group cannot contain destination ports.

l           Before configuring the destination port for a port mirroring group, make sure the port mirroring group exists.

l           Do not enable STP, RSTP, or MSTP on the destination port. Otherwise, the mirroring function may be affected.

l           Do not use the destination mirroring port for any purpose other than port mirroring.

Examples

# Configure GigabitEthernet 1/0/1 as the destination port of port mirroring group 1 (a remote destination port mirroring group).

<Sysname> system-view

[Sysname] mirroring-group 1 remote-destination

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

1.1.6  mirroring-group remote-probe vlan

Syntax

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

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

View

System view

Parameters

group-id: Port mirroring group number, in the range of 1 to 4.

rprobe-vlan-id: ID of the VLAN to be configured as the remote mirroring VLAN. Note that the VLAN must be an existing static VLAN.

Description

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

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

Note that:

l           Only remote source port mirroring groups or remote destination port mirroring groups can have remote mirroring VLANs. A port mirroring group can have only one remote mirroring VLAN.

l           To remove a VLAN operating as a remote port mirroring VLAN, you need to restore it to a normal VLAN first. A remote port mirroring group gets invalid if the corresponding remote port mirroring VLAN is removed.

l           You are recommended to use a remote mirroring VLAN for remote mirroring only.

Examples

# Specify VLAN 2 as the remote mirroring VLAN of port mirroring group 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 group-id ] mirroring-port { inbound | outbound | both }

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

View

Ethernet port view

Parameters

group-id: Port mirroring group number, in the range of 1 to 4.

both: Duplicates both inbound and outbound packets.

inbound: Duplicates the inbound packets only.

outbound: Duplicates the outbound packets only.

Description

Use the mirroring-port command to configure a port as a source mirroring port of a port mirroring group.

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

Note that:

l           If you do not specify the mirroring-group group-id keyword-argument combination, these two commands apply to port mirroring group 1.

l           The source port cannot be a member port of the current mirroring group.

l           A remote destination mirroring group cannot contain source mirroring ports.

Examples

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

<Sysname> system-view

[Sysname] mirroring-group 2 remote-source

[Sysname] interface GigabitEthernet 1/0/1

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

1.1.8  monitor-port

Syntax

[ mirroring-group group-id ] monitor-port

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

View

Ethernet port view

Parameters

group-id: Port mirroring group number, in the range of 1 to 4.

Description

Use the monitor-port command to configure a port as the destination mirroring port of a port mirroring group.

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

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

Note that:

l           If you do not specify the mirroring-group group-id keyword-argument combination, these two commands apply to port mirroring group 1.

l           A remote source mirroring group cannot contain destination mirroring ports.

l           Member ports of existing port mirroring groups cannot be destination ports.

l           The remote destination mirroring port can be an access, trunk, or hybrid port. It must be assigned to the remote mirroring VLAN.

l           Before adding the destination port for a port mirroring group, make sure the port mirroring group exists.

l           Do not enable STP, RSTP, or MSTP on the destination port. Otherwise, the mirroring function may be affected.

l           Do not use the destination mirroring port for any purpose other than port mirroring.

Examples

# Add port GigabitEthernet 1/0/1 to port mirroring group 1 (a local port mirroring group) as the destination port.

<Sysname> system-view

[Sysname] mirroring-group 1 local

[Sysname] interface GigabitEthernet 1/0/1

[Sysname-GigabitEthernet1/0/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 Resources
  • Partner Business Management
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网