Support Service Graphs (SFC Encapsulation)

Bug #1587486 reported by Igor D.C.
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
networking-sfc
Fix Released
High
Igor D.C.

Bug Description

Supporting SFC Encapsulation in networking-sfc
[Metadata is a very important capability of SFC Encapsulation, but let's keep it out of scope in this specific discussion]

Let's consider the following simplified use case that requires a single Service Function Chain:
TCP optimization after receiving encrypted traffic (which may actually contain UDP and not TCP):

1. traffic is received somewhere and sent to the networking components capable of forwarding and classification;
2. if the classification is IPSec encrypted traffic, let's go to SF1: an IPSec security gateway, well prepared to decrypt IPSec traffic;
3. traffic is sent from SF1, now decrypted, towards the components capable of forwarding and classification
4. if the classification is UDP, let's go to SF2: a generic function inserted just to inspect UDP traffic - or something else;
5. if the classification is TCP, let's go to SF3: a TCP optimization function, and then go to a NAT function;
6. continue forwarding and eventual classification until the end of the SFC.

Full SFC/use case illustrated: [1]

Does this work without SFC encapsulation?
It depends. It can. Since networking-sfc does not yet support SFC encapsulation, here's how the above use case could be fulfilled with networking-sfc (please assume it is possible to classify IPSec with networking-sfc+OVS, since the actual reality is irrelevant for the discussion):

1. one port-chain made up of a single port-pair-group for the IPsec function, with flow classifier IPSec;
2. one port-chain made up of a single port-pair-group for the UDP/etc function, with flow classifier UDP, and logical_source_port equal to a specific port-pair of port-chain #1;
3. one port-chain made up of a two port-pair-groups for the TCP Optimization function and NAT function respectively, with flow classifier TCP, and logical_source_port equal to a specific port-pair of port-chain #1;

At a first glance, it seems that it would work fine. And it can. Since we can match on the respective egressing Neutron ports of each port-pair of the IPSec function PPG, we can add them as an ingressing constraint/classification when selecting the second and third port-chains (which will depend on whether traffic is UDP or TCP, the actual traffic classification).

But, what is the environment around these port chains?

What if the TCP Optimization port-pair-group (or even just one of its port-pairs) is used in another port-chain that shares the same flow classifier (TCP)? Let's call this new port-chain: port-chain #4.
If the next port-pair-group of port-chain #4, after the TCP optimizer, is not the NAT function, then traffic that flows through either port-chain #3 or #4 might get mixed and go to the wrong function.

As such, this is a possible scenario that would justify the use of SFC Encapsulation. Also, the fact that only 1 port-pair should be provided for the IPSec function is another drawback.

Does the previous scenario work by simply supporting NSH in networking-sfc?
Networking-sfc intends to support NSH and consequently SFC Encapsulation, so it would be expected that the scenario above would work fine in the future.
The issue explained previously will not occur because traffic is supposed to be encapsulated end-to-end, and will always be associated to specific Service Function Paths (SFPs = port-chains). So, traffic between the port chains #3 and #4 wouldn't really get mixed up.

But what happens when the TCP optimization function is (again) part of other chains but, in those chains, it is receiving traffic (of the same class as in port-chain #3, TCP) from another function where this latter one has multiple different sources of traffic for different port-chains.
Please see the following figure for hopefully a better illustration of the issue (SFs don't match SFs in above use case): [2]. Updated version: [4].

This is a difficult example but illustrates the need to scope service function paths to service function chains, by connecting the port-chains through SFP identifiers rather than port-pairs, or by having an additional resource which would be the service function chain (to scope the SFPs). With or without an additional resource to represent the graph, having multiple port-chains/SFPs connected through explicit SFP identifiers in the end still yields a graphs. Consequently, graphs always need to be somehow defined at Neutron level, rather than only orchestration level. Paths need to be scoped to service function chains (which are graphs) or need to be explicitly connected through SFP identifiers, or the API doesn't support SFC encapsulation.

This description is also available on the etherpad [3].

[1] http://i.imgur.com/rxzNNUZ.png
[2] http://i.imgur.com/iFqbi49.png
[3] https://etherpad.openstack.org/p/networking-sfc-and-sfc-encapsulation
[4] http://i.imgur.com/nzgatKB.png

Tags: rfe
Igor D.C. (igordcard)
tags: added: rfe
Changed in networking-sfc:
assignee: nobody → Igor Duarte Cardoso (igordcard)
Revision history for this message
Louis Fourie (lfourie) wrote :

"At a first glance, it seems that it would work fine. And it can. At least if the IPSec function has only a single port-pair, so that we can match on the respective Neutron port as the entry point for the second and third port-chains. This is a problem, but let's suppose it's okay to have a single port-pair for the IPSec function and just ignore the problem for now."

This statement is not true. Port chains 2 and 3 can be set up, each having a number of flow-classifiers that have logical source ports that are the egress ports of the IPSec SFs. If the IPsec SF port-pair-group has three IPsec SFs (SF1, SF2, SF3) then PC2 and PC3 are configured as follows.

PC2 has flow-classifiers:
  FC1=SF1 egress port & UDP
  FC2=SF2 egress port & UDP
  FC3=SF3 egress port & UDP

PC3 has flow-classifiers:
  FC4=SF1 egress port & TCP
  FC5=SF2 egress port & TCP
  FC6=SF3 egress port & TCP

Revision history for this message
Louis Fourie (lfourie) wrote :

Regarding a having another downstream SF after the TCPopt SF, what is the classification to select traffic for that SF? There must be some classification that select SF4 instead of the NAT SF.

Revision history for this message
Louis Fourie (lfourie) wrote :

The current OVS driver does support SFC encapsulation: the MPLS label is used as instead of NSH because it is supported by OVS. I am unclear why you say it does not.

Revision history for this message
Igor D.C. (igordcard) wrote :

Reply to comment #1:
Thanks for clarifying, there is no problem there then, good! I will update the Etherpad from where I copied the description to reflect this.

description: updated
Revision history for this message
Igor D.C. (igordcard) wrote :

[Still regarding comment #1 - I've also updated the description in the RFE]

Reply to comment #2:
The classification is the same, TCP, but there is no classifier involved. It is strictly forwarding based on a SFF, i.e. looking up the Service Path Header and deciding the next hop. Somewhere in port-chain #4, before reaching the TCP Optimizer function, a different classification criteria was matched in comparison to port-chain #1, which made traffic go into a different SFP, consequently (potentially) getting processed by different SFs, even if somewhere in the middle the same SF instance processes the same kind of traffic. Flows are encapsulated and isolated by different service path headers, so next hops are no longer only dependent on classification.

Revision history for this message
Igor D.C. (igordcard) wrote :

Reply to comment #3:
As far as I understand, today networking-sfc alongside its OVS driver use MPLS for temporarily tagging traffic to particular chains and ppgs. Before forwarding traffic to any VM, the MPLS tag is removed. When traffic comes back, classifier re-evaluates its classification and inserts the correct tag again. So, I see the value of having the MPLS service path header-like management in networking-sfc, as it makes you closer to NSH, but is effectively not doing anything at the moment since all pps/ppgs are assumed to require an SFC Proxy, which is handled in OVS itself when it strips off and re-adds the MPLS tag. But even if MPLS was kept when sending the frames to the VMs, it still doesn't support SFC Encapsulation as I describe here, where you have branching and reclassification because you can't connect port-chains together based on SFPs - and you also can't make an NFVO to that.

I think calling my RFE SFC Encapsulation is being too general especially since you already support a part of it, so I'll probably change this. Networking-sfc wants to embrace NSH, the SFC Encapsulation protocol, so that's a good start. If the VMs don't get proxied, the scenario of port-chain #4 above will almost work because traffic will be fully encapsulated (down to layer 2, unlike MPLS which is a shim between L2 and L3) and paths will be maintained when egressing from each VM - meaning that, even if the classification is the same, we can still choose different functions depending on the actual chain that the traffic belongs to (based on the SFP). But, I say "almost" because a way to match on the SFP is still required. Maybe add SPI/SI (or NSP/NSI with current terminology) to the Flow Classifier, or maybe add that as a connection constraint in port-chains themselves - which, automatically, adds the ability to connect port-chains together to form a graph of SFPs (and not a graph of RSPs [NFPs], from ETSI MANO as far as I can understand).

So, in summmary, even if branching/reclassification and graph-like SFCs are not important, port-chains still need to be able to be connected together based on SFPs to achieve proper isolation as in the example of port-chain #4 presented earlier - otherwise, SFC Encapsulation benefits are reduced to simply allowing VMs to change the traffic class without bursting out of the current chain (but if we then want to match on that new traffic class, only one other port-chain can match on it, otherwise there will be a conflict and the only way to solve it is to isolate the new chains to specific SFPs - the connecting factor).

Revision history for this message
Louis Fourie (lfourie) wrote :

They are chained together based on SFP. Currently, the ovs driver
only supports NSH-unaware SFs and acts as a proxy. It needs to do
re-classification at each stage in the chain.

Changed in networking-sfc:
status: New → In Progress
Igor D.C. (igordcard)
summary: - Support SFC Encapsulation
+ Support SFC Encapsulation graphs
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to networking-sfc (master)

Fix proposed to branch: master
Review: https://review.openstack.org/388802

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on networking-sfc (master)

Change abandoned by Armando Migliaccio (<email address hidden>) on branch: master
Review: https://review.openstack.org/388802
Reason: This review is > 4 weeks without comment, and failed Jenkins the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

Revision history for this message
Igor D.C. (igordcard) wrote : Re: Support SFC Graphs (SFC Encapsulation)

This is still in progress.

summary: - Support SFC Encapsulation graphs
+ Support SFC Graphs (SFC Encapsulation)
Igor D.C. (igordcard)
description: updated
description: updated
Igor D.C. (igordcard)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on networking-sfc (master)

Change abandoned by Kevin Benton (<email address hidden>) on branch: master
Review: https://review.openstack.org/419212
Reason: This review is > 4 weeks without comment, and failed Jenkins the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

Igor D.C. (igordcard)
summary: - Support SFC Graphs (SFC Encapsulation)
+ Support Service Graphs (SFC Encapsulation)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to networking-sfc (master)

Fix proposed to branch: master
Review: https://review.openstack.org/468937

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to networking-sfc (master)

Reviewed: https://review.openstack.org/468937
Committed: https://git.openstack.org/cgit/openstack/networking-sfc/commit/?id=cd2e9274e9ec3d19ec84eb5b70416f72dd14391f
Submitter: Jenkins
Branch: master

commit cd2e9274e9ec3d19ec84eb5b70416f72dd14391f
Author: Igor Duarte Cardoso <email address hidden>
Date: Mon May 29 16:53:39 2017 +0000

    OVS Driver tests: scope Flow Rules to Port Chains

    OVS Driver tests make use of the build_ingress_egress() method to
    create a dictionary of all the flow rules that would be passed to the
    OVS agent. This patches invites the Port Chain ID to be used as a
    an argument of build_ingress_egress() in order to scope them per
    Port Chain.

    Previously, multiple flow rules would get clumped together (with
    loss of detail) in some scenarios, e.g. multiple Port Chains sharing
    the same logical source port (via the attached Flow Classifiers).
    This would then difficult testing or provide an incorrect view to the
    test developer, increasing the chance of mistakes.

    Additionally, other related changes were made:
    - Removed unused build_ingress_egress_list() method.
    - Renamed "flows" to "flow_rule" in OVS Driver's rpc.py to be less
      confusing about what's actually being passed.
    - Adapted existing tests to use the new build_ingress_egress().
    - Other small cleanups.

    Partial-Bug: #1587486
    Change-Id: Ic87623b266a2279baf0e2056b9432e984f61739b

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to networking-sfc (master)

Fix proposed to branch: master
Review: https://review.openstack.org/478668

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to networking-sfc (master)

Reviewed: https://review.openstack.org/478668
Committed: https://git.openstack.org/cgit/openstack/networking-sfc/commit/?id=aaf9046b1756ec65099c551051335280e062e133
Submitter: Jenkins
Branch: master

commit aaf9046b1756ec65099c551051335280e062e133
Author: Igor Duarte Cardoso <email address hidden>
Date: Wed Jun 28 22:39:27 2017 +0000

    Add Service Graph documentation

    This patch includes:
    - Relocation of the SFC Encapsulation doc section to its own file;
    - User and developer documentation regarding Service Graphs (with OVS);
    - API JSON samples for the Service Graphs resource;
    - Release notes about the Service Graphs.

    Partial-Bug: #1587486
    Change-Id: Ib0507af6acd7941c114e7a05651e108b2783f3fe

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

Reviewed: https://review.openstack.org/388802
Committed: https://git.openstack.org/cgit/openstack/networking-sfc/commit/?id=50197bb07236507ba83b24e05188687585bd27e3
Submitter: Jenkins
Branch: master

commit 50197bb07236507ba83b24e05188687585bd27e3
Author: Igor Duarte Cardoso <email address hidden>
Date: Wed Oct 19 16:32:40 2016 +0000

    Add Service Graph API/extension resource and stubs

    This patch adds the new Service Graph API resource.
    The respective stub operations have been added to the DB, SFC plugin,
    driver manager, OVS driver, OVS and unit tests.

    Extension unit tests and client-related code have also been added,
    including for the Tempest tests.

    Later patches will include DB+plugin logic, OVS driver+agent logic,
    documentation and OpenStack Client support.

    Partial-Bug: #1587486
    Change-Id: I247b868917731c1cfb7a1f315b154c5cab00bb48

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

Reviewed: https://review.openstack.org/419212
Committed: https://git.openstack.org/cgit/openstack/networking-sfc/commit/?id=9601bea11c8e48fba17e222828dab8f3aef1bad2
Submitter: Jenkins
Branch: master

commit 9601bea11c8e48fba17e222828dab8f3aef1bad2
Author: Igor Duarte Cardoso <email address hidden>
Date: Mon Dec 12 09:48:16 2016 +0000

    Add Service Graph DB and Plugin logic+tests

    This patch adds the new Service Graph resource DB
    and Plugin logic, plus unit tests for both.

    Partial-Bug: #1587486
    Change-Id: Ia67f6b717309559b3bc448ea8aa6f501472747b6

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

Reviewed: https://review.openstack.org/424370
Committed: https://git.openstack.org/cgit/openstack/networking-sfc/commit/?id=e464bedd9a500db5c04ba12de68d8896977530df
Submitter: Jenkins
Branch: master

commit e464bedd9a500db5c04ba12de68d8896977530df
Author: Igor Duarte Cardoso <email address hidden>
Date: Tue Jan 17 17:33:18 2017 +0000

    Add Service Graph OVS Driver+Agent logic+tests

    This patch introduces changes to the OVS Driver and Agent in order to
    make them able to render Service Graphs, plus unit tests.

    Partial-Bug: #1587486
    Change-Id: I372da15f99f3cbfb7ffd1d8bf87a79bc56180afe

Louis Fourie (lfourie)
Changed in networking-sfc:
importance: Undecided → High
milestone: none → queens-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to networking-sfc (master)

Fix proposed to branch: master
Review: https://review.openstack.org/510858

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to networking-sfc (master)

Reviewed: https://review.openstack.org/510858
Committed: https://git.openstack.org/cgit/openstack/networking-sfc/commit/?id=2c2c7b6543cd6fba36d221541b5463846684f837
Submitter: Zuul
Branch: master

commit 2c2c7b6543cd6fba36d221541b5463846684f837
Author: Igor Duarte Cardoso <email address hidden>
Date: Tue Oct 10 12:13:54 2017 +0000

    Update OpenStack Client syntax for graphs (doc)

    The OSC syntax for specifying branching points in Service Graphs
    is going to be different than initially designed. Instead of:

    --port-chains pc1:pc2,pc3;pc2:pc4,pc5

    Now it will look like:

    --branching-point pc1:pc2,pc3 --branching-point pc2:pc4,pc5

    Change-Id: Idcfdc0eacf373ed3961079edfdca948495c2ea1e
    Partial-Bug: #1587486

Igor D.C. (igordcard)
Changed in networking-sfc:
status: In Progress → Fix Released
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.