Switching Configuration 37Port MirroringThis section describes the Port Mirroring feature, which can serve as a diagnostic tool, debugging tool, ormeans of fending off attacks.OverviewPort mirroring selects network traffic from specific ports for analysis by a network analyzer, while allowingthe same traffic to be switched to its destination. You can configure many switch ports as source portsand one switch port as a destination port. You can also configure how traffic is mirrored on a source port.Packets received on the source port, transmitted on a port, or both received and transmitted, can bemirrored to the destination port.CLI ExamplesThe following are examples of the commands used in the Port Mirroring feature.Example #1: Set up a Port Mirroring SessionThe following command sequence enables port mirroring and specifies a source and destination ports.console#configureconsole(config)#monitor session 1 modeconsole(config)#monitor session 1 source interface 1/g7 ?rx Monitor ingress packets only.tx Monitor egress packets only. Press enter to execute the command.console(config)#monitor session 1 source interface 1/g7console(config)#monitor session 1 destination interface 1/g10console(config)#exitExample #2: Show the Port Mirroring Sessionconsole#show monitor session 1Session ID Admin Mode Probe Port Mirrored Port Type---------- ---------- ---------- ------------- -----1 Enable 1/g10 1/g7 Rx,TxPort SecurityThis section describes the Port Security feature.OverviewPort Security:• Allows for limiting the number of MAC addresses on a given port.