Step 1
|
configure terminal
switch# configure terminal
switch(config)#
|
Enters global
configuration mode.
|
Step 2
|
interface
ethernet
interface
slot/port]
switch(config)# interface ethernet 2/5
switch(config-if)#
|
Enters interface
configuration mode on the selected slot and port.
|
Step 3
|
switchport
switch(config-if)# switchport
switch(config-if)#
|
Configures switchport
parameters for the selected slot and port or range of ports.
|
Step 4
|
switchport mode [access
|
trunk
|
private-vlan]
switch(config-if)# switchport mode trunk
switch(config-if)#
|
Configures switchport
parameters for the selected slot and port or range of ports.
-
access
-
trunk
-
private-vlan
|
Step 5
|
switchport monitor [ingress [learning]]
switch(config-if)# switchport monitor
|
Configures the
switchport interface as a SPAN destination:
- ingress—
Allows the
SPAN destination port to inject packets that disrupt a certain TCP packet
stream, for example, in networks with IDS.
- ingress learning—
Allows the
SPAN destination port to inject packets, and allows the learning of MAC
addresses, for example, the IDS MAC address.
|
Step 6
|
(Optional) Repeat Steps 2 and 3 to
configure monitoring on additional SPAN destinations
|
(Optional)
|
Step 7
|
no monitor session
session-number
switch(config)# no monitor session 3
|
Clears the configuration of
the specified SPAN session. The new session configuration is added to the
existing session configuration.
|
Step 8
|
monitor
session
session-number [shut]
switch(config)# monitor session 3 rx
switch(config-monitor)#
switch(config)# monitor session 3 tx
switch(config-monitor)#
switch(config)# monitor session 3 shut
switch(config-monitor)#
|
Clears the configuration
of the specified SPAN session. The new session configuration is added to the
existing session configuration.
Enters the monitor
configuration mode. The new session configuration is added to the existing
session configuration. By default, the session is created in the shut state,
and the session is a local SPAN session. The optional keywords are as follows:
-
rx—Specifies an
ingress extended SPAN session.
-
tx—Specifies an
egress extended SPAN session.
-
shut—Specifies a
shut state for the selected session.
|
Step 9
|
mode extended
switch(config-monitor)# mode extended
|
(Optional) Configures the
SPAN session as an extended bidirectional session.
Note
|
You cannot
use this command for a unidirectional SPAN session.
|
|
Step 10
|
descriptiondescription
switch(config-monitor)# description my_span_session_3
|
Configures a
description for the session. By default, no description is defined. The
description can be up to 32 alphanumeric characters.
|
Step 11
|
source {interface {all |
type} |
vlan
{number |
range}} [rx |
tx |
both]
switch(config-monitor)# source interface ethernet 2/1-3, ethernet 3/1 rx
switch(config-monitor)# source interface port-channel 2
switch(config-monitor)# source interface sup-eth 0 both
switch(config-monitor)# source vlan 3, 6-8 rx
switch(config-monitor)# source interface ethernet 101/1/1-3
switch(config-monitor)# source interface all rx
|
Configures sources and the
traffic direction in which to copy packets. You can enter a range of Ethernet
ports, a port channel, an inband interface, a range of VLANs, a Cisco Nexus
2000 Series Fabric Extender interface, or a fabric port channel connected to a
Cisco Nexus 2000 Series Fabric Extender.
You can
configure one or more sources, as either a series of comma-separated entries or
a range of numbers. You can specify up to 128 interfaces. The VLAN range is
from 1 to 3967. The VLAN range of 4048 to 4093 is also supported for Cisco
NX-OS releases prior to 6.1.
You can
specify the traffic direction to copy as ingress (rx), egress (tx), or both. By
default, the direction is both. For a unidirectional session, the direction of
the source must match the direction specified in the session. Beginning with
Cisco NX-OS Release 7.3(0)D1(1), you can use the
all keyword
to enable the monitor session to monitor all VLANs and ports in the VDC such as
physical ports, Port Channels, FEX ports and FEX Port Channels. The
all keyword
is supported only in Extended SPAN sessions.
|
Step 12
|
(Optional) Repeat Step 11 to configure
all SPAN sources.
|
(Optional)
|
Step 13
|
(Optional) filter vlan {number |
range} [include-untagged]
switch(config-monitor)# filter vlan 3-5, 7
|
(Optional)
(Optional)
Configures which VLANs to select from the configured sources. You can configure
one or more VLANs, as either a series of comma-separated entries, or a range of
numbers. The VLAN range is from 1 to 3967. The VLAN range of 4048 to 4093 is
also supported for Cisco NX-OS releases prior to 6.1.
The
include-untagged keyword applies a VLAN access map to one or more VLANs and
includes untagged frames on a port with Layer 3 subinterfaces.
You can enable
monitoring of a higher number of specific VLAN sources than the VLAN source
limits currently supported in extended SPAN monitor session by using the
filter vlan
command with the
source interface
all command to filter the irrelevant VLANs.
|
Step 14
|
(Optional) Repeat Step 13 to configure
all source VLANs to filter.
|
(Optional)
|
Step 15
|
destination interface
type
{number |
range}
switch(config-monitor)# destination interface ethernet 2/5, ethernet 3/7
|
Configures destinations for
copied source packets. You can configure one or more destinations as either a
series of comma-separated entries or a range of numbers. You can specify up to
128 interfaces.
Note
|
SPAN
destination ports must be either access or trunk ports.
|
Note
|
The Cisco
Nexus 2000 Series Fabric Extender interfaces and the fabric port channels
connected to the Cisco Nexus 2000 Series Fabric Extender cannot be configured
as SPAN destinations.
|
|
Step 16
|
(Optional) Repeat Step 15 to configure
all SPAN destination ports.
|
(Optional)
|
Step 17
|
no shut
switch(config-monitor)# no shut
|
Enables the SPAN session.
By default, the session is created in the shut state.
|
Step 18
|
(Optional) show monitor session
{all |
session-number |
range
session-range} [brief]
switch(config-monitor)# show monitor session 3
|
(Optional)
Displays the SPAN
configuration.
|
Step 19
|
(Optional) copy running-config startup-config
switch(config)# copy running-config startup-config
|
(Optional)
Copies the
running configuration to the startup configuration.
|