Port Forwarding API

Registered by Gal Sagie

Port forwarding is a common feature in networking and more specifically in PaaS and
SaaS cloud systems which aim at reusing the same public IP for different clients
that use different VMs for their services.

This is especially relevant for deployments which lack a large number of
public IPs they can assign.

Common use case for this feature is a client requesting a specific service, the
serving platform (PaaS, SaaS) allocate a VM to run the service and then allocate a
client port to access this service.
This means that various clients use the same public IP, but the TCP/UDP destination
port is used to distinguish between the end point VMs.


client1 => maps to port 80 (VM1)
client2 => maps to port 80 (VM2)

This spec focus on the API level, a detailed reference implementation spec
will be written upon approve of API.

Problem Description

* In tight environments operators would like to reuse public IPs instead
  of assigning to each VM its own public IP (floating IP).

* Docker support port-mapping feature and hence a big eco-system of automation
  orchestration and management plugins leverage it.
  We would like to make Neutron compatible for these tools and systems
  and provide a similar API

Proposed Change

Introduce port forwarding API and implementation on the public address of the
virtual router external gateway interface (connecting the router to a public network).

The user can define various port forwarding rules on the router containing
the client port and the destination VM and destination port.

Implementing this feature per floating IP is complicated due the fact that DNAT
in DVR is distributed among the compute nodes, this feature resemble the
difficulties and challenges of distributing SNAT and hence at this point
should remain in the network node.

It seems however that any solution that distribute SNAT will also be able
to support distributing port forwarding.

Blueprint information

Miguel Lavalle
Gal Sagie
Needs approval
Series goal:
Accepted for rocky
Milestone target:
milestone icon rocky-rc1
Started by
Miguel Lavalle
Completed by
Miguel Lavalle

Related branches



Gerrit topic: https://review.openstack.org/#/q/topic:bp/port_forwarding

Addressed by: https://review.openstack.org/533850
    FIP port forwarding support[1]

Addressed by: https://review.openstack.org/535647
    FIP port forwarding support[2]

Addressed by: https://review.openstack.org/535638
    WIP: Introduce API definition of Floating IP Port Forwarding

Addressed by: https://review.openstack.org/579910
    [server side] Floating IP port forwarding plugin

Addressed by: https://review.openstack.org/574673
    [server side] Fix race issue for port forwarding plugin

Addressed by: https://review.openstack.org/575326
    [server side] Expose port forwardings in FIP API

Gerrit topic: https://review.openstack.org/#q,topic:bp/port_forwarding,n,z

Addressed by: https://review.openstack.org/585731
    Add ext_parent policy check

Gerrit topic: https://review.openstack.org/#q,topic:bug/1491317,n,z

Addressed by: https://review.openstack.org/588079
    Add release note for port forwardings.

Addressed by: https://review.openstack.org/588996
    api-ref for floating IPs port forwardings

Addressed by: https://review.openstack.org/588997
    Add FIP port forwarding to Networking Guide

Addressed by: https://review.openstack.org/589071
    Add 'is_filter' and 'is_sort_key' to fip pf attributes


Work Items

This blueprint contains Public information 
Everyone can see this information.