Routing tables and VRF configuration
Routing tables specify the paths that data packets take to reach their destinations. Each entry in a routing table defines a network destination, the next hop to reach it, and the interface used for transmission. Routing tables can be tied to VRFs (Virtual Routing and Forwarding instances), which separate traffic into logical routing domains for different network contexts, such as separating Access, Data, and Control Networks.
User Plane Gateway (UPG) uses the RoutingTable Custom Resource (CR) to create and manage routing tables. The UPG Helm chart automatically generates RoutingTable objects based on the per-interface route definitions in values.yaml. It supports routing for the following networks:
- Access Network (GRX)
- Data Network (SGI)
- NAT pools (default gateway)
To define additional routes not covered by the Helm chart, do so separately during deployment, outside of the UPG chart.
See the example of the values.yaml input to configure networking:
This configuration creates the following RoutingTable CRs:
To verify the applied routes on a UPG instance, use this VPP CLI command:
See the output example:
Assign routing tables to instances
RoutingTable CRs are assigned to UPG instances using labels. These labels are either:
- Automatically assigned by the UPG chart using the
fpp-manager.cennso.com/plumbing-instanceper-instance label based on the chart name, release name, and UPG instance name - Manually defined in the VPPConfig CR under the spec.routingTableSelectors section
Here’s an example of labels generated by the UPG chart:
You can configure routingTableSelectors in values.yaml to apply the same routing table to multiple UPG instances. You can also define multiple label sets for a UPG instance to apply multiple routing tables based on different labels, for example:
This configuration is propagated to the VPPConfig CR that matches the UPG instance:
In this case, the UPG chart generates the basic routing tables that match these labels:
app.kubernetes.io/instance: upg-01-upg-fppapp.kubernetes.io/name: upgcennso.net/cnf: upginstance: inst01
You can create additional RoutingTable objects with custom labels (like crossInstance) outside the UPG chart:
In this case, all UPG instances with a matching VPPConfig label (crossInstance: default-routing-test-apn) will apply the specified routing table.