Configure the Primary and Secondary LSPs
By default, an LSP routes itself hop-by-hop toward the egress router. The LSP tends to follow the shortest path as dictated by the local routing table, usually taking the same path as destination-based, best-effort traffic. These paths are "soft" in nature because they automatically reroute themselves whenever a change occurs in a routing table or in the status of a node or link.
To configure the path so that it follows a particular route, create a named path using the
pathstatement, as described in Create a Named Path. Then apply the named path by including theprimaryorsecondarystatement at the[edit protocols mpls label-switched-pathlsp-path-name]hierarchy level:[edit protocols mpls label-switched-pathlsp-path-name]primarypath-name{...}secondarypath-name{...}A named path can be referenced by any number of LSPs.
The
primarystatement creates the primary path, which is the LSP's preferred path. Thesecondarystatement creates an alternative path. If the primary path can no longer reach the egress router, the alternative path is used.When the software switches from the primary to a secondary path, it continuously attempts to revert to the primary path, switching back to it when it is again reachable, but no sooner than the retry time specified in the
retry-timerstatement. (For more information, see Configure Path Connection Retry Information.)You can configure zero or one primary path. If you do not configure a primary path, the first secondary path that is established is selected as the path.
You can configure zero or more secondary paths. All secondary paths are equal, and the software tries them in the order that they are listed in the configuration. The software does not attempt to switch among secondary paths. If the current secondary path is not available, the next one is tried. To create a set of equal paths, specify secondary paths without specifying a primary path.
If you do not specify any named paths, or if the path that you specify is empty, the software makes all routing decisions necessary to reach the egress router.