[RFE] Add ERSPAN for tap-as-a-service with OVS and OVN

Bug #2015471 reported by Lajos Katona
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
neutron
New
Wishlist
Lajos Katona

Bug Description

ERSPAN (Encapsulated Remote Switch Port Analyzer) is a videly used tool to analyse traffic of switch ports. The whole concept first was used widely in Cisco switches.

ERSPAN protocol is used in 2 versions, version 1 (Type II), and version 2 (Type III) (Note: Type I was not widely used) ERSPAN version 2 adds an extra ERSPAN header over GRE, and a similar but more flexible extra ERSPAN header is used for version 3 (see [1]).

Since OVS 2.10 it is possible to use ERSPAN with OVS (see [2], and [3]) both ERSPAN v1 and v2.
Since OVN v22.12.0 it is possible to create mirrors with OVN (see [4], I can't find it in the release-notes or in any OVN docs, I suppose that is my lack of experience with OVN).
NOTE: OVN only supports ERSPAN v1, and with OVN it is also possible to create a clean GRE type mirror.

There's a few things to consider, I add here now only the question of how the API should look like.

The current TAAS API deals with 2 high level objects:
* The Tap Service identifies the destination of the mirroring, which is a Neutron port (see [5])
* The Tap Flow identifies the source of the mirroring, which is again a Neutron port (see [6]). There is a N:1 relationship between tap-flows and tap-services, so multiple tap-flows can be the source of one tap-service.

With ERSPAN this model is not that useful:

* one way forward can be to keep the current API with extra fields for both Tap Service and for Tap flow:
Tap Service: new field that mark the tap-service as ERSPAN destination port (in this case the port field should not be obligatory)
Tap Flow: new fields: erspan_dst_ip and erspan_idx.

* Another option is to encode this in the Tap Service and we could keep at least the Tap Flow unchanged. This would mean that for "legacy" mirroring with OVS or SRIOV the API behaves differently, or used differenltly.

* Yet another option is to introduce a new API for ERSPAN to make as simple as possible.

[1]: https://datatracker.ietf.org/doc/id/draft-foschiano-erspan-02.txt => Note this is a draft, and I think ERSPAN was not standardized.
[2]: https://docs.openvswitch.org/en/latest/faq/configuration/
[3]: http://www.openvswitch.org//support/dist-docs/ovs-fields.7.txt
[4]: https://github.com/ovn-org/ovn/commit/323f978cbf4599568fcca9edec8ed53c076d2664
[5]: https://docs.openstack.org/api-ref/network/v2/index.html#create-tap-service
[6]: https://docs.openstack.org/api-ref/network/v2/index.html#create-tap-flow

Tags: rfe-approved
Changed in neutron:
importance: Undecided → Wishlist
description: updated
Revision history for this message
Bence Romsics (bence-romsics) wrote :

Thanks for opening this. As usual I added this in your name to the drivers meeting agenda:
https://wiki.openstack.org/wiki/Meetings/NeutronDrivers

Revision history for this message
Rodolfo Alonso (rodolfo-alonso-hernandez) wrote :

This RFE was approved in the Neutron drivers meeting. It was agreed to request a spec to define the implementation details and alternatives proposed.

Thanks for this proposal!

tags: added: rfe-approved
removed: rfe
Changed in neutron:
assignee: nobody → Lajos Katona (lajos-katona)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron-specs (master)

Related fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/neutron-specs/+/882151

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron-specs (master)

Reviewed: https://review.opendev.org/c/openstack/neutron-specs/+/882151
Committed: https://opendev.org/openstack/neutron-specs/commit/de2ee265faa6bac9d8ae168293dd8cc47c8a9ccc
Submitter: "Zuul (22348)"
Branch: master

commit de2ee265faa6bac9d8ae168293dd8cc47c8a9ccc
Author: elajkat <email address hidden>
Date: Wed Apr 26 10:05:24 2023 +0200

    ERSPAN and GRE mirroring for tap-as-a-service

    Change-Id: Idc52ffb78033c658558dba381dc742cc23c0f2b7
    Related-Bug: #2015471

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron-lib (master)

Related fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/neutron-lib/+/885354

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron-tempest-plugin (master)

Related fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/neutron-tempest-plugin/+/886004

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron-lib (master)

Related fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/neutron-lib/+/895603

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron (master)

Related fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/neutron/+/905840

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron-lib (master)

Reviewed: https://review.opendev.org/c/openstack/neutron-lib/+/885354
Committed: https://opendev.org/openstack/neutron-lib/commit/72442e0ba0637898f8dbf0af757e81c7332c9c7a
Submitter: "Zuul (22348)"
Branch: master

commit 72442e0ba0637898f8dbf0af757e81c7332c9c7a
Author: elajkat <email address hidden>
Date: Mon Jun 5 14:48:37 2023 +0200

    Tap mirror API def and API ref

    Change-Id: Ifa1bf6abbf5d25769820b545d8d3bab195b146d3
    Related-Bug: #2015471

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.opendev.org/c/openstack/neutron-lib/+/895603
Committed: https://opendev.org/openstack/neutron-lib/commit/584de2c144a75b9e9c63a32ff7f4a53922fcd7a2
Submitter: "Zuul (22348)"
Branch: master

commit 584de2c144a75b9e9c63a32ff7f4a53922fcd7a2
Author: elajkat <email address hidden>
Date: Mon Sep 18 10:28:45 2023 +0200

    Add Tap Mirror exception

    Add TapMirrorNotFound and TapMirrorTunnelConflict to
    taas exceptions.

    Change-Id: I96413cdeaa85f8f52c80a5e6dd72e0ddaa2e10ed
    Related-Bug: #2015471

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.