- Table of Contents
-
- H3C S3610[S5510] Series Ethernet Switches Command Manual-Release 0001-(V1.02)
- 00-1Cover
- 01-Login Command
- 02-VLAN Command
- 03-IP Address and Performance Command
- 04-QinQ-BPDU Tunnel Command
- 05-Port Correlation Configuration Command
- 06-MAC Address Table Management Command
- 07-MAC-IP-Port Binding Command
- 08-MSTP Command
- 09-Routing Overview Command
- 10-IPv4 Routing Command
- 11-IPv6 Routing Command
- 12-IPv6 Configuration Command
- 13-Multicast Protocol Command
- 14-802.1x-HABP-MAC Authentication Command
- 15-AAA-RADIUS-HWTACACS Command
- 16-ARP Command
- 17-DHCP Command
- 18-ACL Command
- 19-QoS Command
- 20-Port Mirroring Command
- 21-Cluster Management Command
- 22-UDP Helper Command
- 23-SNMP-RMON Command
- 24-NTP Command
- 25-DNS Command
- 26-File System Management Command
- 27-Information Center Command
- 28-System Maintenance and Debugging Command
- 29-NQA Command
- 30-VRRP Command
- 31-SSH Command
- 32-Appendix
- Related Documents
-
Title | Size | Download |
---|---|---|
20-Port Mirroring Command | 78 KB |
Table of Contents
Chapter 1 Port Mirroring Configuration Commands
1.1 Port Mirroring Configuration Commands
1.1.3 mirroring-group mirroring-port
1.1.4 mirroring-group monitor-port
1.1.5 mirroring-group reflector-port
1.1.6 mirroring-group remote-probe vlan
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.
<Sysname> 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
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.
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.
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.
Note the following:
l With the S3610&S5510 series, you can configure either one local mirroring group or one remote source mirroring group, but not both, at a time.
l 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.
<Sysname> system-view
[Sysname] mirroring-group 1 local
# Create remote destination mirroring group 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
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 ] }&<1-8>, in which interface-type is the port type and interface-number is the port number. &<1-8> 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:
l 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.
l You cannot add a source port to a remote destination mirroring group.
Example
# Add a source port to mirroring group 1.
<Sysname> 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
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:
l A port mirroring group can contain only one destination port.
l You cannot add a destination port to a remote source mirroring group.
l You must create a mirroring group before you can specify it.
l An aggregation port cannot be specified as a destination port.
l The destination port cannot be a member of the mirroring group.
l 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.
<Sysname> 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
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:
l 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.
l 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.
l 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.
l 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.
<Sysname> 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.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:
l 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.
l 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.
l We recommend that you use a remote mirroring VLAN for remote mirroring only.
Example
# Configure remote mirroring VLAN 2 for remote mirroring group 1.
<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 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.
<Sysname> 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.
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.
<Sysname> system-view
[Sysname] mirroring-group 1 local
[Sysname] interface Ethernet 1/0/1
[Sysname-Ethernet1/0/1] monitor-port