Source-based routing
Caution
This feature is obsolete and replaced by VPPABF CR but may still be used to debug interfaces not managed by FPP.
FPP allows source-based routing with the use of the VPP ACL-based forwarding (ABF) feature. The enablement requires creating a matching access-control list (ACL) for the incoming traffic and a dedicated policy to apply to it.
ACL creation
VPP uses acl-plugin to manage ACLs. Each ACL consists of a pattern for traffic matching and a rule to perform on it. For the ABF feature, ACLs with the apply action permit are required. A dedicated command to create an ACL using VPP CLI should be placed in the afterCommands section of the VPPConfig CR. The VPP CLI command:
As an example, an ACL that matches input traffic from network 10.0.0.0/24 looks as follows:
CLI returns ACL index:<X> where X is a positive integer index of the ACL created. This index will be used to create the ABF policy.
Policy-based routing activation
To use an existing ACL that matches certain traffic and to make a routing decision, run the following:
As an example, ABF Policy with index 0 uses ACL with index 0 and performs lookup in table 100 for IPv4 traffic:
The table ID must match the corresponding RoutingTable spec. Example:
Attach the policy to the input interface through the CLI command:
An example of an attachment policy with index 0 to interface named net-1:
Several ABF policies can be attached to a single input interface.
VPPConfig example
ABF policies creation and attachment must be added in the afterCommands section:
The routingTables: [100] is equivalent to ip table add 100, which adds an empty routing table 100 before afterCommands are executed.