Configuring port mirroring on the switch
# Create local mirroring group 1.
[Switch]mirroring-group 1 local
# Configure Ethernet 1/0/1 as a source port of the mirroring group.
[Switch]mirroring-group 1 mirroring-port ethernet 1/0/1 both
# Configure Ethernet 1/0/23 as the monitor port of the mirroring group.
[Switch]mirroring-group 1 monitor-port ethernet 1/0/23