L3-ext-gw-modes-spec
Contents
Enabling configurable external gateway modes
Please note this specification is still being drafted. Your early feedback is welcome.
High level description
WIP
Semantics of the various gateway modes
- SNAT+DNAT (only mode currently supported). Enables default gateway with NAT and Floating IPs
- SNAT only. Does not allow floating IPs on the external network.
- DNAT only. No default NAT for traffic (allow L3 forwarding to external network? Does it make sense? discuss.). Floating IP association still allowed.
- No SNAT, No DNAT. The external gateway will be the default route in the Quantum router, but traffic will not be NATted.
API Changes
Currently the external gateway is configured for a router using the following attribute:
'external_gateway_info': {'allow_post': True, 'allow_put': True, 'is_visible': True, 'default': None}
This attribute is a free-form value at the moment. Leveraging the dict validator introduced in Grizzly, it will be possible to give a structure to this attribute, in the following way:
- network_id: the identifier of the network to be used an external gateway
- enable_snat: {True | False} (default: True)
- enable_dnat: {True | False} (default: True)
Please note that preserving the network_id attribute, together with the default values for the other attributes, guarantees backward compatibility. if enable_dnat or enable_snat are set to True, then the API will throw a 400 if the network specified for the gateway is not external, consistently with the Quantum v2 API.
Data Model Changes
The router data model entity should not store just a reference to the external gateway port, but it should also store the 'gateway mode', as this information needs to be persisted in the database.
OVS plugin support
WIP.
Other plugins
Supporting plugins beyond the OVS plugin is beyond the scope of this blueprint. Support for other plugins might be added with separate blueprints/bug fixes.