Deploy Fast Path Provider for CGW 2 with basic NAT
This document describes the prerequisites and steps to deploy the Fast Path Provider (FPP) for the Connectivity Gateway (CGW) 2 with NAT use case.
Prerequisites
Steps
Install the FPP chart in the
instancemode using the following chart configuration:Connectivity Gateway (CGW) using VPP as a packet processing engine has better performance than a Linux kernel-based solution. For cluster-internal usage, CGW can handle routing and apply basic NAT.
Caution
FPP-based CGWs must be only scheduled on the nodes with FPP version 2.0.0 or later serving as VPP Switch to have VPP interfaces configured properly.
Below is a diagram with the CGW with NAT example deployment described further in this section:
CGW2 with NAT This is the full configuration of the CGW
values.yamlfile:yamlConfigure the
instancemode based on the CGW example above.- Provide the CNF name:
yamlFor FPP 2.0, the configuration above creates the VPPDeployment object with mode set to
instance, which in turn creates KubernetesStatefulSetobject (as opposed toDaemonSetwhich is used for thenodemode), and adds thecennso.net/cnf: cgwlabel to all resources created by the chart.- Define imageSecret to download the FPP Manager image from a private registry:
yaml- Configure the networking.
This example uses memifs for in-cluster networking. Starting from the left side, sgi interface is created. This connects the IP network receiving traffic from UPG. Next, on the right side, you have two network interfaces. One is inet, which has connectivity to the Internet. Second is vpn, which connects to the backend services:
yaml- The routing tables are configured as follows:
yamlBased on the routing applied in table rt-sgi, the incoming traffic is forwarded either to the inet interface, where the NAT is applied, or routed to the vpn interface, which connects user traffic with the corporate backend (no NAT applied). rt-inet has the backroute information on where to forward the returning traffic.
- Configure the NAT using VPP CLI
FPP enables configuring the basic NAT using CLI commands in
vppConfigs[].spec.afterCommands:yamlThe
frame-queue-neltsparameter is recommended to be set if we use more than 1 worker thread. The calculation uses the following formula:text- queue size for memif is 512
- DPDK queue size is configurable (using numRxDesc and numTxDesc), by default set to 2048 each
- When using 2 memifs for NAT input and NAT output interface - this gives (512+512)*4 =
4096 - When using memif and DPDK interface - (512+2048)*4 =
10240
For more configuration options, visit the official VPP NAT documentationOpens in a new tab.
- Configure the resources
The minimal resource configuration to achieve 500k NAT translations in a production environment is as follows:
yamlFor a use case that requires higher performance, assign 6 CPU cores.
Measured memory consumption for different settings: