Configure routing tables and VRF
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) in the Core Cluster to create and manage routing tables. The UPGDeployment CR, applied to the Management Cluster, automatically generates RoutingTable objects based on the per-interface route definitions in the spec.instances section of the CR. 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 UPGDeployment CR, do so separately during deployment in the Core Cluster, outside of the UPGDeployment CR.
See the example of the UPGDeployment CR input to configure networking:
This configuration creates the following RoutingTable CRs:
Assign routing tables to instances
RoutingTable CRs are assigned to UPG instances using labels. These labels are either:
- Automatically assigned by the UPGDeployment CR using the
fpp-manager.cennso.com/plumbing-instanceper-instance label - Manually defined in the UPGDeployment CR under the spec.routingTableSelectors section
Here’s an example of labels generated by the UPGDeployment CR:
You can configure spec.routingTableSelectors in the UPGDeployment CR 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 VPPDeployment CR created for the UPG instance:
In this case, the UPGDeployment CR 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) in the Core Cluster outside the UPGDeployment CR:
In this case, all UPG instances with a matching VPPConfig label (crossInstance: default-routing-test-apn) will apply the specified routing table.
Verification
To verify the applied routes on a UPG instance, use this VPP CLI command:
See the output example: