Span Session and Packet Capture Commands

source

To configure the source interface for a SPAN session, use the source command in session configuration mode. To remove the source configuration, use the no form of the command.

source {all interface interface-name vlan vlan-id vm-vnic vm-name vnic-id}

no source {all interface interface-name vlan vlan-id vm-vnic vm-name vnic-id}

Syntax Description

all

Specifies all supported interfaces for a SPAN session.

interface interface-name

Specifies a physical interface.

vlan vlan-id

Specifies a VLAN interface. Range: 1 to 4094.

vm-vnic vm-name

Specifies a vNIC interface with the VM name.

vnic-id

Specifies the VNIC ID. Range: 0 to 8.

Command Default

None

Command Modes

Session configuration (config-session-2)#

Command History

Release Modification
3.5.1

This command was introduced.

Usage Guidelines

In the case of virtio net or SRIOV VF, you have to specify the VM group name and NIC ID of the VM interface. If the VM vNIC is virtio net type, then the SPAN session is applied on the OVS bridge. If VM vNIC is SRIOV VF, then the mirror is applied to the hardware bridge. The interface name is specified for a physical interface, for example, GE0-0 or eth0.

Examples

The following configuration shows how to configure a source interface for a SPAN session:


nfvis(config)# monitor session 2
nfvis(config-session-2)# bridge lan-br
nfvis(config-session-2)# source interface GE0-0
nfvis(config-session-2)# commit

destination

To configure the destination interface for a SPAN session, use the destination command in session configuration mode. To remove the destination configuration, use the no form of the command

destination {interface interface-name vlan vlan-id vm-vnic vm-name vnic-id}

no destination {interface interface-name vlan vlan-id vm-vnic vm-name vnic-id}

Syntax Description

interface interface-name

Specifies a physical interface.

vlan vlan-id

Specifies a VLAN interface. Range: 1 to 4094.

vm-vnic vm-name

Specifies a vNIC interface with the VM name.

vnic-id

Specifies the VNIC ID. Range: 0 to 8.

Command Default

None

Command Modes

Session configuration (config-session-2)#

Command History

Release Modification
3.5.1

This command was introduced.

Usage Guidelines

You must dedicate a destination port for SPAN use. Except for traffic that is required for the SPAN session, destination ports do not receive or forward traffic. When the SPAN is configured on the system, there might be some performance hit.

Examples

The following configuration shows how to configure a destination interface for a SPAN session:


nfvis(config)# monitor session 2
nfvis(config-session-2)# bridge lan-br
nfvis(config-session-2)# destination vm-vnic 0

show system monitor session

To display the Switched Port Analyzer (SPAN) session details, use the show system monitor session command in privileged EXEC mode.

show system monitor session

Syntax Description

This command has no arguments or keywords.

Command Default

None

Command Modes

Privileged EXEC (#)

Command History

Release Modification
3.5.1

This command was introduced.

Examples

The following is a sample output of the show system monitor session command:


nfvis# show system monitor session
system monitor session 2
bridge wan-br
destination_vlan ""
destination_interface vnic0
source_vlans ""
source_rx_interfaces "GE0-0"
source_tx_interfaces "GE0-0"
source_all false
statistics "tx_bytes=142660, tx_packets=1380"

monitor session

To create a SPAN session, use the monitor session command in global configuration mode. To remove the SPAN session, use the no form of the command.

monitor session number

no monitor session

Syntax Description

number

Specifies the SPAN session number. Valid range: 1-64

Command Default

None

Command Modes

Global configuration (config)

Command History

Release Modification
3.5.1

This command was introduced.

Examples

The following example shows how to create a SPAN session:


nfvis(config)# monitor session 2
nfvis(config)# commit

tcpdump port

To configure the packet capture feature on a physical port, use the tcpdump port command in global configuration mode. Use the no form of the command to remove the packet capture.

tcpdump port port-name [filter filter-name protocol {ARP | ICMP | TCP | UDP} time seconds ]

no tcpdump port port-name

Syntax Description

port port-name

Specifies the name of the physical port.

filter filter-name

(Optional) Specifies the filter name.

protocol

(Optional) Specifies the protocol to capture specific packets. Supported options are:

  • Internet Control Message Protocol (ICMP)

  • Address Resolution Protocol (ARP)

  • TCP

  • UDP

time seconds

(Optional) Specifies the time period over which packets are captured. The default value is 60 seconds.

Command Default

None

Command Modes

Global configuration (config)

Command History

Release Modification
3.5.1

This command was introduced.

Examples

The following example shows how to configure packet capture on a physical port:


nfvis(config)# tcpdump port eth0 filter filter1 time 30 pcap-location /data/intdatastore/pktcaptures/tcpdump_eth0.pcap
nfvis(config)# commit

tcpdump vnic

To configure the packet capture feature on a virtual network interface controller, use the tcpdump vnic command in global configuration mode. Use the no form of the command to remove the packet capture.

tcpdump vnic tenant-name name deployment-name name vm-name name vnic-id id [filter filter-name protocol {ARP | ICMP | TCP | UDP} time seconds ]

no tcpdump vnic tenant-name name deployment-name name vm-name name vnic-id id

Syntax Description

tenant-name name

Specifies the tenant name.

deployment-name name

Specifies the deployment name.

vm-name name

Specifies the name of the VM.

vnic-id id

Specifies the vNIC ID.

filter filter-name

(Optional) Specifies the filter name.

protocol

(Optional) Specifies the protocol to capture specific packets. Supported options are:

  • Internet Control Message Protocol (ICMP)

  • Address Resolution Protocol (ARP)

  • TCP

  • UDP

time seconds

(Optional) Specifies the time period over which packets are captured. The default value is 60.

Command Default

None

Command Modes

Global configuration (config)

Command History

Release Modification
3.5.1

This command was introduced.

Examples

The following example shows how to configure packet capture on a vNIC:


nfvis(config)# tcpdump vnic tenant-name admin deployment-name 1489084431 vm-name ROUTER vnic-id 0 time 30
pcap-location /data/intdatastore/pktcaptures/1489084431_ROUTER_vnic0.pcap
nfvis(config)# commit