RIB/FIB API - IPv4 tunnel table programming

The RIB API service proto definition requires the client to provide values for all of the parameters listed in Table: IPv4 tunnel table programming when performing an add or replace of an IPv4 MPLS tunnel. When performing a delete operation, only the bolded parameters (the lookup keys) are required. Table: IPv4 tunnel table programming describes the meaning of each parameter and its valid range.

Table: IPv4 tunnel table programming
Parameter Type Description

prefix

string

IPv4 host address

preferences

uint32 (0-65535)

RIB API preference, used to compare one RIB API entry to another one; the lowest preference wins

ttm_preference

uint32 (0-255)

TTM preference, used in the programming of the tunnel in TTM

metric

uint32 (0-16777215)

Route cost/metric

next-hop-group[id]

list

A list of next-hop groups

id

uint32 (1-32)

Unique identifier of the next-hop group. Selected by the client

weight

uint32

Weight assigned to the next-hop-group when weighted ECMP is needed between next-hop-groups

primary

Mandatory

ip_address

string

IPv4 or IPv6 address on a local subnet; can be a secondary address

pushed_label_stack

list of uint32

A list of one or more MPLS labels, up to ten MPLS labels

backup

Optional

ip_address

string

IPv4 or IPv6 address on a local subnet; can be a secondary address

pushed_label_stack

list of uint32

A list of up to ten MPLS labels

egress-statistics

enable

boolean

Indicates whether statistics collection is enabled for this entry

The router's RIB API database can hold up to eight different gPRC-programmed entries per IPv4 tunnel endpoint. Typically N entries would be associated with N different gRPC clients although the same client can program multiple entries for the same tunnel endpoint as long as the preference values are unique

When an IPv4 tunnel endpoint entry is successfully added or modified in the RIB API database, the router assesses whether the entry is valid or invalid and constantly re-evaluates this status. The tunnel is invalid if none of its primary next hops can be resolved to an interface that is up or if MPLS programming using the RIB API is currently administratively disabled.

If the IPv4 tunnel entry is valid the router compares it to all other valid API-programmed entries for the same IPv4 endpoint address. The router chooses any non-stale entry over a stale entry, then the entry with the lowest preference value, and then if there is a tie, the lowest metric, and then if there is a still a tie, the entry from the client with the lowest 128-bit IP address (an IPv4 address is encoded in the lower 32 bits).

If the entry is valid and the best relative to other RIB API entries then it is programmed into the FIB and added to the base router IPv4 tunnel table. The tunnel entry is now active and can be used to resolve the next hops of other routes. For more information, see the 7450 ESS, 7750 SR, 7950 XRS, and VSR Unicast Routing Protocols Guide.