SPAN
NX-OSSPAN (Switched Port Analyzer) configuration manages monitor sessions for traffic mirroring on NX-OS devices. Supports local SPAN sessions that mirror traffic to a local destination port, and ERSPAN sessions that encapsulate mirrored traffic in GRE and send it to a remote destination IP. Each session can specify source interfaces, source VLANs, filter VLANs, and various ERSPAN-specific parameters. The global ERSPAN origin IPv4 and IPv6 addresses are configured under system.
SPAN (Switched Port Analyzer) configuration manages monitor sessions for traffic mirroring on NX-OS devices. Supports local SPAN sessions that mirror traffic to a local destination port, and ERSPAN sessions that encapsulate mirrored traffic in GRE and send it to a remote destination IP. Each session can specify source interfaces, source VLANs, filter VLANs, and various ERSPAN-specific parameters.
Diagram
Section titled “Diagram”Diagram
Section titled “Diagram”Classes
Section titled “Classes”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| devices | List | devices | No | |
| device_groups | List | device_groups | No | |
| global | Class | global | No | |
| templates | List | templates | No |
devices (nxos)
Section titled “devices (nxos)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| configuration | Class | configuration | No |
device_groups (nxos)
Section titled “device_groups (nxos)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| configuration | Class | configuration | No |
global (nxos)
Section titled “global (nxos)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| configuration | Class | configuration | No |
templates (nxos)
Section titled “templates (nxos)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| configuration | Class | configuration | No |
configuration (nxos.devices)
Section titled “configuration (nxos.devices)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| system | Class | system | No | |
| monitor_ | List | monitor_ | No |
system (nxos.devices.configuration)
Section titled “system (nxos.devices.configuration)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| erspan_ | IP | No | ||
| erspan_ | IP | No |
system (nxos.devices.configuration)
Section titled “system (nxos.devices.configuration)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| erspan_ | IP | No |
monitor_sessions (nxos.devices.configuration)
Section titled “monitor_sessions (nxos.devices.configuration)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| id | Integer | min: 1, max: 32 | Yes | |
| type | Choice | local, erspan-source, erspan-destination | No | |
| shutdown | Boolean | true, false | No | |
| description | String | No | ||
| destination_ | Choice | ethernet, loopback, mgmt, port-channel, vlan, vni | No | |
| destination_ | Any | String or Integer[min: 0] | No | |
| filter_ | String | No | ||
| mtu | Integer | min: 64, max: 10240 | No | |
| erspan_id | Integer | min: 0, max: 1023 | No | |
| destination_ip | IP | No | ||
| destination_ | IP | No | ||
| source_ip | IP | No | ||
| source_ipv6 | IP | No | ||
| ip_dscp | Integer | min: 0, max: 63 | No | |
| ip_ttl | Integer | min: 1, max: 255 | No | |
| vrf | String | No | ||
| header_type | Choice | 2, 3, 3-rfc-compliant | No | |
| source_ | Choice | none, rx, tx, both | No | |
| marker_packet | Boolean | true, false | No | |
| marker_ | Integer | min: 1, max: 1000 | No | |
| source_ | List | source_ | No | |
| source_vlans | List | source_vlans | No | |
| filter_vlans | Class | filter_vlans | No |
source_interfaces (nxos.devices.configuration.monitor_sessions)
Section titled “source_interfaces (nxos.devices.configuration.monitor_sessions)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| interface_type | Choice | ethernet, loopback, mgmt, port-channel, vlan, vni | Yes | |
| interface_id | Any | String or Integer[min: 0] | Yes | |
| direction | Choice | rx, tx, both | No |
source_vlans (nxos.devices.configuration.monitor_sessions)
Section titled “source_vlans (nxos.devices.configuration.monitor_sessions)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| vlans | Class | vlans | Yes | |
| direction | Choice | rx, tx, both | No |
filter_vlans (nxos.devices.configuration.monitor_sessions)
Section titled “filter_vlans (nxos.devices.configuration.monitor_sessions)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| ids | List | Integer[min: 1, max: 4094] | No | |
| ranges | List | ranges | No |
vlans (nxos.devices.configuration.monitor_sessions.source_vlans)
Section titled “vlans (nxos.devices.configuration.monitor_sessions.source_vlans)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| ids | List | Integer[min: 1, max: 4094] | No | |
| ranges | List | ranges | No |
ranges (nxos.devices.configuration.monitor_sessions.filter_vlans)
Section titled “ranges (nxos.devices.configuration.monitor_sessions.filter_vlans)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| from | Integer | min: 1, max: 4094 | Yes | |
| to | Integer | min: 1, max: 4094 | Yes |
Examples
Section titled “Examples”Example 1: Local SPAN session mirroring Ethernet1/1 traffic to Ethernet1/2
nxos: devices: - name: LEAF1 configuration: monitor_sessions: - id: 1 type: local description: "Mirror server traffic" shutdown: false destination_interface_type: ethernet destination_interface_id: "1/2" source_interfaces: - interface_type: ethernet interface_id: "1/1" direction: bothExample 2: Local SPAN with source VLANs and filter VLANs
nxos: devices: - name: LEAF1 configuration: monitor_sessions: - id: 2 type: local description: "Monitor VLAN traffic" shutdown: false destination_interface_type: ethernet destination_interface_id: "1/48" mtu: 9000 filter_access_group: "SPAN-FILTER" source_vlans: - vlans: ids: [100] direction: rx - vlans: ids: [200] direction: rx filter_vlans: ids: [100, 200]Example 3: ERSPAN source session with global IPv4 and IPv6 origin addresses
nxos: devices: - name: SPINE1 configuration: system: erspan_origin_ip_address: 10.0.0.1 erspan_origin_ipv6_address: 2001:db8::1 monitor_sessions: - id: 3 type: erspan-source description: "ERSPAN to remote analyzer" shutdown: false erspan_id: 100 destination_ip: "10.1.1.1" ip_dscp: 10 ip_ttl: 64 vrf: default header_type: "3" source_interfaces: - interface_type: ethernet interface_id: "1/1" direction: both - interface_type: ethernet interface_id: "1/2" direction: rxExamples
Section titled “Examples”Example 1: Local SPAN session mirroring Ethernet1/1 traffic to Ethernet1/2
nxos: devices: - name: LEAF1 configuration: monitor_sessions: - id: 1 type: local description: "Mirror server traffic" shutdown: false destination_interface_type: ethernet destination_interface_id: "1/2" source_interfaces: - interface_type: ethernet interface_id: "1/1" direction: bothExample 2: Local SPAN with source VLANs and filter VLANs
nxos: devices: - name: LEAF1 configuration: monitor_sessions: - id: 2 type: local description: "Monitor VLAN traffic" shutdown: false destination_interface_type: ethernet destination_interface_id: "1/48" mtu: 9000 filter_access_group: "SPAN-FILTER" source_vlans: - vlans: ids: [100] direction: rx - vlans: ids: [200] direction: rx filter_vlans: ids: [100, 200]Example 3: ERSPAN source session with global origin IP
nxos: devices: - name: SPINE1 configuration: system: erspan_origin_ip_address: 10.0.0.1 monitor_sessions: - id: 3 type: erspan-source description: "ERSPAN to remote analyzer" shutdown: false erspan_id: 100 destination_ip: "10.1.1.1" ip_dscp: 10 ip_ttl: 64 vrf: default header_type: "3" source_interfaces: - interface_type: ethernet interface_id: "1/1" direction: both - interface_type: ethernet interface_id: "1/2" direction: rx