The MPLS forwarding policy provides an interface for adding user defined label entries into the label FIB of the router. The user can define an entry into the label FIB by configuring a set of primary and backup next-hops and bind a label to them. This feature is targeted for router programmability in SDN environments.
This section provides information about configuring and operating a MPLS forwarding policy using CLI.
An application of the MPLS forwarding policy is what is referred to as a static label route. A static label route allows the user to configure a SWAP operation on an incoming label to an implicit-null label and the forwarding of the exposed packet to all the resolved next-hops derived from looking up the configured route of the indirect next-hop in the routing table. In addition, the static label route feature provides the ability to configure a SWAP operation on an incoming label to an implicit-null label and the forwarding of the packet to a primary or backup direct next-hop. The policy associates an incoming label, referred to as a binding label, to a Next-Hop Group (NHG) in which the primary and backup direct or indirect next-hops are defined. This type of MPLS forwarding policy is referred to as a label-binding policy.
The following example shows the configuration commands for creating a static label route using a MPLS forwarding policy.
The MPLS forwarding policy follows a number of configuration and operation rules which are enforced for the lifetime of the policy.
There are two levels of validation:
The following policy parameters and validation rules apply to the MPLS forwarding policy:
The following are the details of these two levels of validation, the resolution of the policy, and the operational behavior of the forwarding policy:
The MPLS forwarding policy data path implementation adheres to the following model and principles of operation:
| Note: A route is deleted from the routing table if it is no longer resolved by IGP, BGP, or the static route module. In the case of static route, it is deleted if the user deleted the route. |
When an MPLS packet, including an MPLS-over-GRE packet, with a binding label in the label stack is received over any network IP interface, the packet is forwarded over the primary or backup next-hop of the NHG. Furthermore, spraying of packets is performed over the resolved next-hops of a NHG of resolution type indirect.
The router performs the following procedure:
The following rules determine how the router sets the Ethertype field value of the outgoing packet as follows:
The router sets the TTL of the outgoing packet as per the behavior of a PHP LSR as follows:
The user enables ingress statistics for an MPLS forwarding policy using the CLI provided in Introduction.
The ingress statistics feature is associated with the binding label, that is the ILM of the forwarding policy, and provides aggregate packet and octet counters for packets matching the binding label.
The per-ILM stat index for the MPLS forwarding policy features is assigned at the time the first instance of the policy is programmed in the data path. All instances of the same policy, for example, same binding-label, regardless of the preference parameter value share the same stat index.
The stat index remains assigned as long as the policy exists and the ingress-statistics context is not shutdown. If the last instance of the policy is removed from the forwarding policy database, the CPM frees the stat index and returns it to the pool.
If the ingress statistics is not configured or is shutdown in a specific instance of the forwarding policy, identified by a unique value of pair {bindling-label, preference} of the forwarding policy, an assigned stat index will not be incremented if that instance of the policy is activated
If a stat index is not available at allocation time, the allocation fails and a retry mechanism will check the stat index availability in the background.