Huawei Proprietary and Confidential. Copyright (c) Huawei Technologies Co.,
Ltd i. Table of Contents. Chapter 1 Port Mirroring Configuration Commands .
Command Manual – Port Mirroring Quidway S3500-EA Series Ethernet Switches
Table of Contents
Table of Contents Chapter 1 Port Mirroring Configuration Commands ................................................................. 1-1 1.1 Port Mirroring Configuration Commands ........................................................................... 1-1 1.1.1 display mirroring-group ........................................................................................... 1-1 1.1.2 mirroring-group........................................................................................................ 1-2 1.1.3 mirroring-group mirroring-port ................................................................................. 1-3 1.1.4 mirroring-group monitor-port ................................................................................... 1-4 1.1.5 mirroring-group reflector-port .................................................................................. 1-5 1.1.6 mirroring-group remote-probe vlan ......................................................................... 1-7 1.1.7 mirroring-port........................................................................................................... 1-8 1.1.8 monitor-port ............................................................................................................. 1-8
Huawei Proprietary and Confidential Copyright (c) Huawei Technologies Co., Ltd
i
Command Manual – Port Mirroring Quidway S3500-EA Series Ethernet Switches
Chapter 1 Port Mirroring Configuration Commands
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
Parameter group-id: A port mirroring group number, which can be 1 and 2. local: A local mirroring group. remote-source: A remote source mirroring group. remote-destination: A remote destination mirroring group. all: All mirroring groups.
Description Use the display mirroring-group command to display the information of a mirroring group. The contents displayed vary according to the types of the mirroring groups. And they are arranged by the mirroring group numbers.
Example # Display all the mirroring groups’ information. display mirroring-group all mirroring-group 1: type: local status: active mirroring port: Ethernet1/0/1
both
Ethernet1/0/2
both
monitor port: Ethernet1/0/3
Huawei Proprietary and Confidential Copyright (c) Huawei Technologies Co., Ltd
1-1
Chapter 1 Port Mirroring Configuration Commands
Command Manual – Port Mirroring Quidway S3500-EA Series Ethernet Switches
mirroring-group 2: type: remote-source status: inactive mirroring port: Ethernet1/0/4
both
reflector port: remote-probe vlan: 1900
Table 1-1 Description on the fields of the display mirroring-group command Field
Description
mirroring-group
Port mirroring group number
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
Source mirroring port
monitor port
Destination mirroring port
reflector port
Reflector 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
Parameter group-id: A port mirroring group number, which can be 1 and 2. local: A local mirroring group. remote-source: A remote source mirroring group. remote-destination: A remote destination mirroring group. all: All mirroring groups.
Description Use the mirroring-group command to create a mirroring group. 1-2
Huawei Proprietary and Confidential Copyright (c) Huawei Technologies Co., Ltd
Command Manual – Port Mirroring Quidway S3500-EA Series Ethernet Switches
Chapter 1 Port Mirroring Configuration Commands
Use the undo mirroring-group command to remove a mirroring group. You need to specify the type of the port mirroring group to be created when creating it. z
Use the keyword local to create a local port mirroring group.
z
Use the keyword remote-destination to create a remote destination port mirroring group.
z
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: z
Use the group-id argument to specify the port mirroring group to be removed.
z
Use the all keyword to remove all the port mirroring groups.
z
Use the local keyword to remove all the local port mirroring groups.
z
Use the remote-destination keyword to remove all the remote destination port mirroring groups.
z
Use the remote-source keyword to remove all the remote source mirroring groups.
Note the following: z
With the S3500-EA series, you can configure either one local mirroring group or one remote source mirroring group, but not both, at a time.
z
If the destination port of traffic mirroring and that of the local port mirroring group are different, you cannot configure traffic mirroring and local port mirroring at the same time. For traffic mirroring configuration, see the related parts in the QoS module.
Example # Create local mirroring group 1. system-view [Sysname] mirroring-group 1 local
# Create remote destination mirroring group 2. 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 }
Huawei Proprietary and Confidential Copyright (c) Huawei Technologies Co., Ltd
1-3
Chapter 1 Port Mirroring Configuration Commands
Command Manual – Port Mirroring Quidway S3500-EA Series Ethernet Switches
View System view
Parameter group-id: A port mirroring group number, which can be 1 and 2. mirroring-port-list: A mirroring port list specifies multiple ports. The expression is mirroring-port-list
=
{
interface-type
interface-number
[
to
interface-type
interface-number ] }&, in which interface-type is the port type and interface-number is the port number. & means the parameter before it can be entered up to 8 times. inbound: Specifies only mirroring the packets received by the port. outbound: Specifies only mirroring the packets sent by the port. both: Specifies mirroring all the packets received or sent by the port.
Description Use the mirroring-group mirroring-port command in system view to add a source port to a mirroring group already created. Use the undo mirroring-group mirroring-port command to remove a source port from a mirroring group. Note that: z
You cannot add a port as a source port to a mirroring group if the port is already a member port of another mirroring group.
z
You cannot add a source port to a remote destination mirroring group.
Example # Add a source port to mirroring group 1. system-view [Sysname] mirroring-group 1 mirroring-port Ethernet 1/0/1 to Ethernet 1/0/5 both
# Remove a source port from mirroring group 1. [Sysname] undo mirroring-group 1 mirroring-port Ethernet 1/0/1 to Ethernet 1/0/3 both
1.1.4 mirroring-group monitor-port Syntax mirroring-group group-id monitor-port monitor-port-id undo mirroring-group group-id monitor-port monitor-port-id
1-4
Huawei Proprietary and Confidential Copyright (c) Huawei Technologies Co., Ltd
Command Manual – Port Mirroring Quidway S3500-EA Series Ethernet Switches
Chapter 1 Port Mirroring Configuration Commands
View System view
Parameter group-id: A port mirroring group number, which can be 1 and 2. monitor-port-id:
Destination
port
number.
The
expression
is
interface-type
interface-number, in which interface-type is the port type and interface-number is the port number.
Description Use the mirroring-group monitor-port command to add a destination port to a mirroring group already created. Use the undo mirroring-group monitor-port command to remove a destination port from a mirroring group already created. Note that: z
A port mirroring group can contain only one destination port.
z
You cannot add a destination port to a remote source mirroring group.
z
You must create a mirroring group before you can specify it.
z
An aggregation port cannot be specified as a destination port.
z
The destination port cannot be a member of the mirroring group.
z
A destination port can’t enable STP RSTP or MSTP; otherwise it will affect the device’s normal functions. And vice versa.
Example # Add monitor port Ethernet1/0/1 to remote destination mirroring group 1. system-view [Sysname] mirroring-group 1 remote-destination [Sysname] mirroring-group 1 monitor-port Ethernet 1/0/1
1.1.5 mirroring-group reflector-port Syntax I. In system view: mirroring-group group-id reflector-port reflector-port-id undo mirroring-group group-id reflector-port reflector-port-id
II. In interface view: mirroring-group group-id reflector-port undo mirroring-group group-id reflector-port
Huawei Proprietary and Confidential Copyright (c) Huawei Technologies Co., Ltd
1-5
Command Manual – Port Mirroring Quidway S3500-EA Series Ethernet Switches
Chapter 1 Port Mirroring Configuration Commands
View System view, Ethernet interface view
Parameter group-id: A port mirroring group number, which can be 1 and 2. reflector-port-id:
A reflector
port
number.
The
expression is
interface-type
interface-number, in which interface-type is the port type and interface-number is the port number.
Description Use the mirroring-group reflector-port command to configure a reflector port for a remote source mirroring group. Use the undo mirroring-group reflector-port command to remove the configuration. Note that: z
You can configure a reflector port for a remote source mirroring group only. For other types of mirroring groups or mirroring groups that already have a reflector port, you cannot configure a reflector port.
z
A reflector port cannot be a member port of the current mirroring group, an aggregation port. It is required to be an access port and belong to the default VLAN.
z
It is not recommended to connect network cable to the reflector port and to configure the following functions on this port: STP, RSTP, MSTP, 802.1x, IGMP Snooping, QinQ, port loopback, business loopback, static ARP and MAC address learning. Otherwise it will affect the device’s normal function.
z
A port can be configured as a reflector port only when it operates with the following settings being the defaults: operation mode (half duplex/full duplex), port speed, MDI setting. Conversely, these settings cannot be modified once a port is configured as a reflector port.
Example # In system view, configure reflector port Ethernet 1/0/1 for remote source mirroring group 1. system-view [Sysname] mirroring-group 1 remote-source [Sysname] mirroring-group 1 reflector-port Ethernet 1/0/1
# In Ethernet port view, configure reflector port Ethernet 1/0/2 for remote source mirroring group 1. [Sysname] interface Ethernet 1/0/2 [Sysname-Ethernet1/0/1] mirroring-group 1 reflector-port
1-6
Huawei Proprietary and Confidential Copyright (c) Huawei Technologies Co., Ltd
Command Manual – Port Mirroring Quidway S3500-EA Series Ethernet Switches
Chapter 1 Port Mirroring Configuration Commands
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
Parameter group-id: A port mirroring group number, which can be 1 and 2. rprobe-vlan-id: A remote mirroring VLAN number. The VLAN should have already existed.
Description Use the mirroring-group remote-probe vlan command to configure a mirroring VLAN for a remote source mirroring group or a remote destination mirroring group. Use the undo mirroring-group remote-probe vlan command to remove the configuration. Note that: z
You can only configure a remote mirroring VLAN for a remote source mirroring group or a remote destination mirroring group. For local mirroring groups or mirroring groups that already have a remote mirroring VLAN, you cannot configure a remote mirroring VLAN.
z
Before configuring a VLAN as the remote mirroring VLAN of a remote port mirroring group, make sure the VLAN exists and is a static VLAN. A VLAN cannot be removed if it is configured as a remote mirroring VLAN. To delete a VLAN of this type, you need to first restore it to a normal VLAN. A remote port mirroring group gets invalid if the remote mirroring VLAN configured for it is removed.
z
We recommend that you use a remote mirroring VLAN for remote mirroring only.
Example # Configure remote mirroring VLAN 2 for remote mirroring group 1. system-view [Sysname] mirroring-group 1 remote-source [Sysname] mirroring-group 1 remote-probe vlan 2
Huawei Proprietary and Confidential Copyright (c) Huawei Technologies Co., Ltd
1-7
Chapter 1 Port Mirroring Configuration Commands
Command Manual – Port Mirroring Quidway S3500-EA Series Ethernet Switches
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 interface view
Parameter group-id: A port mirroring group number, which can be 1 and 2. inbound: Specifies only mirroring the packets received by the port. outbound: Specifies only mirroring the packets sent by the port. both: Specifies mirroring all the packets received or sent by the port.
Description Use the mirroring-port command to configure the present port as a mirroring port under interface view. Use the undo mirroring-port command to remove the configuration. The mirroring group is defaulted to 1, if no mirroring group number is specified in the command line.
Example # Add port Ethernet1/0/1 to remote source mirroring group 2. system-view [Sysname] mirroring-group 2 remote-source [Sysname] interface Ethernet 1/0/1 [Sysname-Ethernet1/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 interface view
Parameter group-id: A port mirroring group number, which can be 1 and 2. 1-8
Huawei Proprietary and Confidential Copyright (c) Huawei Technologies Co., Ltd
Command Manual – Port Mirroring Quidway S3500-EA Series Ethernet Switches
Chapter 1 Port Mirroring Configuration Commands
Description Use the monitor-port command to configure the present port as a monitor port under interface view. Use the undo monitor-port command to remove the configuration. The mirroring group number is defaulted to 1, if no mirroring group number is specified in the command line.
Example # Configure port Ethernet 1/0/1 as monitor port of local mirroring group 1. system-view [Sysname] mirroring-group 1 local [Sysname] interface Ethernet 1/0/1 [Sysname-Ethernet1/0/1] monitor-port
Huawei Proprietary and Confidential Copyright (c) Huawei Technologies Co., Ltd
1-9