Sie sind auf Seite 1von 8

Ethernet Port Mirroring Configuration

Ethernet Port Mirroring


Configuration

Maipu Communication Technology Co., Ltd


No. 16, Jiuxing Avenue
Hi-tech Park
Chengdu, Sichuan Province
Peoples Republic of China - 610041
Tel: (86) 28-85148850, 85148041
Fax: (86) 28-85148948, 85148139
URL: http:// www.maipu.com
Email: overseas@maipu.com

Maipu Confidential & Proprietary Information

Page 1 of 8

Ethernet Port Mirroring Configuration

All rights reserved. Printed in the Peoples Republic of China.

No part of this document may be reproduced, transmitted, transcribed, stored in a retrieval system, or
translated into any language or computer language, in any form or by any means, electronic, mechanical,
magnetic, optical, chemical, manual or otherwise without the prior written consent of Maipu Communication
Technology Co., Ltd.

Maipu makes no representations or warranties with respect to this document contents and specifically
disclaims any implied warranties of merchantability or fitness for any specific purpose. Further, Maipu
reserves the right to revise this document and to make changes from time to time in its content without
being obligated to notify any person of such revisions or changes.

Maipu values and appreciates comments you may have concerning our products or this document. Please
address comments to:

Maipu Communication Technology Co., Ltd


No. 16, Jiuxing Avenue
Hi-tech Park
Chengdu, Sichuan Province
Peoples Republic of China - 610041
Tel: (86) 28-85148850, 85148041
Fax: (86) 28-85148948, 85148139
URL: http:// www.maipu.com
Email: overseas@maipu.com

All other products or services mentioned herein may be registered trademarks, trademarks, or service
marks of their respective manufacturers, companies, or organizations.

Maipu Confidential & Proprietary Information

Page 2 of 8

Ethernet Port Mirroring Configuration

Maipu Feedback Form


Your opinion helps us improve the quality of our product documentation and offer better
services. Please fax your comments and suggestions to (86) 28-85148948, 85148139 or email
to overseas@maipu.com.
Document
Title
Product

Docume

Version

nt

1.0

Revision
Number
Evaluate

Presentation:

this

(Introductions, procedures, illustrations, completeness, arrangement,

document

appearance)
Good

Fair Average Poor

Accessibility:
(Contents, index, headings, numbering)
Good

Fair Average Poor

Editorial:
(Language, vocabulary, readability, clarity, technical accuracy, content)
Good

Fair Average Poor

Your

Please check suggestions to improve this document:

suggestion

Improve introduction Make more concise

s to

Improve Contents

Improve arrangement Add more technical information

Include images Make it less technical

Add more detail Improve index

improve
the
document

Add more step-by-step procedures/tutorials

If you wish to be contacted, complete the following:


Name

Compan
y

Postcode

Address

Telephone

Maipu Confidential & Proprietary Information

E-mail

Page 3 of 8

Ethernet Port Mirroring Configuration

Contents
Chapter 1 Ethernet Port Mirroring Configuration........................................................ 5
1.1 Configure Ethernet Port Mirroring......................................................................................... 5
1.1.1 Overview........................................................................................................................5
1.1.2 Mirroring........................................................................................................................ 5
1.1.3 Configuring port mirroring........................................................................................... 6
1.1.4 Mirroring Configuration................................................................................................6

Maipu Confidential & Proprietary Information

Page 4 of 8

Ethernet Port Mirroring Configuration

Chapter 1 Ethernet Port Mirroring


Configuration
1.1 Configure Ethernet Port Mirroring
1.1.1 Overview
Mirroring refers to the process of copying packets that meet the specified rules to a
destination port. Generally, a destination port is connected to a data detect device, which
users can use to analyze the mirrored packets for monitoring and troubleshooting the
network.

Figure 1-1 mirroring


1.1.1.1 Traffic Mirroring
Traffic mirroring maps traffic flows that match specific ACLs to the specified destination
port for packet analysis and monitoring. Before configuring traffic mirroring, you need to
define ACLs required for flow identification.
1.1.1.2

Port Mirroring

Port mirroring refers to the process of copying the packets received or sent by the
specified port to the destination port.

1.1.2 Mirroring
Switch support one-to-one and multiple-to-one mirroring.
Mirrored: mirror source can be port or packet sent or received by CPU
Mirror: For MyPower S3100 series switch, mirror port can be only one. If multiple mirror
port is configured, the last will be effective.
Note:
mirror port cannot be used as a normal port.
Maipu Confidential & Proprietary Information

Page 5 of 8

Ethernet Port Mirroring Configuration

1.1.3 Configuring port mirroring


Table 1-1 Mirroring functions and related command
Function

Specifications

Related command

Link

Mirroring

Traffic

mirrored-to

QoS

mirroring

no mirrored-to

configuratio
n

Port mirroring

mirror destination-interface

Configuring
Port

mirror source-interface

Mirroring

1.1.4 Mirroring Configuration


For mirroring features, see section Overview.
1.1.4.1 Configuring Traffic Mirroring
i.

Configuration prerequisites

ACLs for identifying traffics have been defined. For defining ACLs, see the description
on the ACL module in QoS.
The destination port has been defined.
The port on which to perform traffic mirroring configuration and the direction of traffic
mirroring has been determined.
ii. Configuration procedure
Perform the configuration in global configuration mode.
Table 1-2 Configure traffic mirroring
Operation

Command

Configure traffic mirroring

mirrored-to

Description

ip-group The command is for traffic


{ acl-number | acl-name } mirroring on the packets
[ subitem subitem ] | which meet ACL rules
{

link-group

{ acl-number | (only be effective on ACL


acl-name } [ subitem permit
rules).
The
subitem ] } interface destination port should be
ethernet interface-num
specified when using this
Cancel traffic mirroring

no mirrored-to { ip-group command for the first time.


{ acl-number |
[ subitem
link-group

acl-name
subitem ] }

Maipu Confidential & Proprietary Information

acl-name }

subitem ] |
{ acl-number |
}
[
subitem

Page 6 of 8

Ethernet Port Mirroring Configuration

Note:
ip-group { acl-number | acl-name } [ subitem subitem ]: Specifies a basic or
an advanced ACL. The acl-number argument ranges from 2000 to 3999
acl-name: Name of a string, start with letters without space and quotation
mark subitem: option parameter for specifying the sub-item in acl-list, in the
range of 0 to 127.
link-group { acl-number | acl-name } [ subitem subitem ]: Specifies a Layer
2 ACL. The acl-number argument ranges from 4000 to 4999; acl-name :
Name of a string, start with letters without space and quotation marksubitem:
option parameter for specifying the subitem in acl-list, in the range of 0 to 127.
interface ethernet { interface-num }: Specifies destination port (also called
monitor port) of traffic.
iii.

Configuration example
! Mirror acl-list 2000 to Ethernet 0/0/1.
Switch(config)#access-list 2000 permit 1.1.1.1 0
Config ACL subitem successfully.
Switch(config)#mirrored-to ip-group 2000 interface ethernet 0/0/1
Config mirrored-to successfully.

1.1.4.2 Configuring Port Mirroring


i.

Configuration prerequisites

The source port is specified and whether the packets to be mirrored are ingress or
egress is specified: ingress
ingress: only mirrors the packets received via the port; egress
egress: only
mirrors the packets sent by the port; both
both: mirrors the packets received and sent by the
port at the same time.

The destination port is specified.

ii.

Configuration procedure

Perform the following configuration in global configuration mode.


Table 1-3 Configure port mirroring
Operation

Command

Description

Configure destination port


(so called monitor port)

mirror
destination-interface

This command will cancel


original port mirroring.

interface-num
Configure source port (so
called mirrored port)

mirror source-interface
{ interface-list | cpu } { both |
egress | ingress }

Show port mirroring

show mirror

Maipu Confidential & Proprietary Information

both means both ingress


and egress; cpu means
mirroring cpu packets.

Page 7 of 8

Ethernet Port Mirroring Configuration

Note:
A port cannot be monitor and mirrored port at the same time.
iii.

Configuration example
! Mirror egress of ethernet 0/0/1 to ethernet 0/0/12 to ethernet 0/1/1
Switch(config)#mirror destination-interface ethernet 0/1/1
Config monitor port successfully !
Switch(config)#mirror source-interface ethernet 0/0/1 to ethernet 0/0/12
egress
Config mirrored port successfully !
! Mirror cpu both to ethernet 0/1/2
Switch(config)#mirror destination-interface ethernet 0/1/2
Config monitor port successfully !
Switch(config)#mirror source-interface cpu both
Config mirrored port successfully !

Maipu Confidential & Proprietary Information

Page 8 of 8