VMwareVspanSession

VMwareVspanSession
VMwareVspanSession

The VMwareVspanSession data object defines the configuration of a VLAN Services and Protocols for Advanced Networks (VSPAN) session.

You use a VSPAN session for the following operations:

  • To mirror network traffic (inbound/outbound) from a set of source entities to a set of destination entities.
  • To assist in troubleshooting.
  • As input for security and other network analysis appliances.

The type of entities that you can specify as source or destination is determined by the session type. You can use uplink distributed virtual ports only for mixed destination mirror VSPAN sessions (mixedDestMirror). For all sessions except mixedDestMirror sessions, you cannot use uplink distributed virtual ports as destination ports. sessionType is required for vSphere Distributed Switch 5.1 and later, ignored for prior version if set.

Session Type Source Destination
mixedDestMirror Distributed Ports Distributed Ports + Uplink Ports Name
dvPortMirror Distributed Ports Distributed Ports
remoteMirrorSource Distributed Ports Uplink Ports Name
remoteMirrorDest VLAN Distributed Ports
encapRemoteMirrorSource Distributed Ports IP address
AllOf
This class requires all of the following:
JSON Example
{
    "_typeName": "string",
    "key": "string",
    "name": "string",
    "description": "string",
    "enabled": false,
    "sourcePortTransmitted": {
        "_typeName": "string",
        "portKey": [
            "string"
        ],
        "uplinkPortName": [
            "string"
        ],
        "wildcardPortConnecteeType": [
            "string"
        ],
        "vlans": [
            0
        ],
        "ipAddress": [
            "string"
        ]
    },
    "sourcePortReceived": {
        "_typeName": "string",
        "portKey": [
            "string"
        ],
        "uplinkPortName": [
            "string"
        ],
        "wildcardPortConnecteeType": [
            "string"
        ],
        "vlans": [
            0
        ],
        "ipAddress": [
            "string"
        ]
    },
    "destinationPort": {
        "_typeName": "string",
        "portKey": [
            "string"
        ],
        "uplinkPortName": [
            "string"
        ],
        "wildcardPortConnecteeType": [
            "string"
        ],
        "vlans": [
            0
        ],
        "ipAddress": [
            "string"
        ]
    },
    "encapsulationVlanId": 0,
    "stripOriginalVlan": false,
    "mirroredPacketLength": 0,
    "normalTrafficAllowed": false,
    "sessionType": "string",
    "samplingRate": 0,
    "encapType": "string",
    "erspanId": 0,
    "erspanCOS": 0,
    "erspanGraNanosec": false,
    "netstack": "string"
}
string
key
Optional

The generated key as the identifier for the session.

string
name
Optional

The display name.

string
description
Optional

The description for the session.

boolean
enabled
Required

Whether the session is enabled.

sourcePortTransmitted
Optional

This class defines the ports, uplink ports name, vlans and IP addresses participating in a Distributed Port Mirroring session.

See VMwareVspanSession.

sourcePortReceived
Optional

This class defines the ports, uplink ports name, vlans and IP addresses participating in a Distributed Port Mirroring session.

See VMwareVspanSession.

destinationPort
Optional

This class defines the ports, uplink ports name, vlans and IP addresses participating in a Distributed Port Mirroring session.

See VMwareVspanSession.

integer As int32 As int32
encapsulationVlanId
Optional

VLAN ID used to encapsulate the mirrored traffic.

boolean
stripOriginalVlan
Required

Whether to strip the original VLAN tag.

if false, the original VLAN tag will be preserved on the mirrored traffic. If encapsulationVlanId has been set and this property is false, the frames will be double tagged with the original VLAN ID as the inner tag.

integer As int32 As int32
mirroredPacketLength
Optional

An integer that describes how much of each frame to mirror.

If unset, all of the frame would be mirrored. Setting this property to a smaller value is useful when the consumer will look only at the headers. The value cannot be less than 60.

boolean
normalTrafficAllowed
Required

Whether or not destination ports can send and receive "normal" traffic.

Setting this to false will make mirror ports be used solely for mirroring and not double as normal access ports.

string
sessionType
Optional

Type of the session.

See VMwareDVSVspanSessionTypeEnum for valid values. Default value is mixedDestMirror if unspecified in a VSPAN create operation.

integer As int32 As int32
samplingRate
Optional

Sampling rate of the session.

If its value is n, one of every n packets is mirrored. Valid values are between 1 to 65535, and default value is 1.

string
encapType
Optional

Encapsulation type of the session.

See VMwareDVSVspanSessionEncapTypeEnum for valid values. Default value is encapProtocolGRE if unspecified in a VSPAN create operation.

integer As int32 As int32
erspanId
Optional

ERSPAN ID of the session.

Valid values are between 0 to 0x3ff, and default value is 0. This value is applicable only if encaptType is erspan2 or erspan3

integer As int32 As int32
erspanCOS
Optional

Class of Service of the monitored frame.

Valid values are between 0 to 7, and default value is 0. This value is applicable only if encaptType is erspan2 or erspan3

boolean
erspanGraNanosec
Optional

Timestamp Granularity.

If the value is false, timestamp-granularity will be microsecond. Otherwise the timestamp-granularity will be nanosecond This value is applicable only if encaptType is erspan3

string
netstack
Optional

Netstack instance of the session.