IOS-XR has the concept of an "import-candidate" flag on each VPN/ VRF path. If it is set, the path can be imported to other VRFs. In BGP, during the bestpath selection process, the best bath is marked as "import-candidate". Other paths may marked as "import-candidate" if they satisfy the following conditions:
If the Path is a VPN path and has the same local and remote RD, the path is always an "import-candidate". (2) is not considered.
Apart from (1), paths satisfying all the below conditions will be "import-candidate":
The path’s net should have a bestpath
Selective multipath configuration should not deny this path
Path should not be an accept-own self-originated path
AS-Path Multipath relax is configured AND the number of AS-hops for the path equals that of bestpath
AS-Path Multipath relax is not configured AND the AS-Path sequence for the path equals that of bestpath
Path’s nexthop is not same as bestpath’s nexthop
If we reach this place, then the path is marked as "import-candidate"
Global routing table
From IOS-XR version 4.3.1 onwards we we support importing default-VRF (global) IPv4/IPv6 unicast routes into VRFs. Therefore, the flag is also applied on BGP paths in the default (global) VRF.
The flag is used in the VPN topology only when import is triggered. When a change in the table (version) takes place, the import thread would do a versioned work, touch each (source) prefix that has changed, check if anything else has changed, prepare an RT-set that combines RTs of all the "import-candidate" paths, and visit all VRFs whose import RTs match this RT-set.
For each such (destination) table, it would check its max-paths config. If, for instance, "max-path ibgp 2" config is present for a destination table, then both the paths for RD1:p/m would be imported to that table. Otherwise, only the bestpath would be imported.
When the primary RR session goes down, the path will be deleted immediately and the second path will be promoted to be the bestpath. Import will then be triggered to replace the currently imported path with the new path for each destination table. This would not lead to any traffic loss.
This flag is used for import dampening. If a path for a given net/prefix flaps for the first time, the path is marked as “import suspect”. If a second flap happens in the “import suspect” state, the net is skipped from import processing for 10 seconds. This is to reduce import churn.
After the “timeout”, or if no further flaps are observed, the suspect states are cleared. A “flap” happens when a path changes from being imported to being not imported even if the attributes are not changed.