Configure the Static LSP Metric
You can manually assign a fixed metric value to an LSP. Once configured using the metric statement at the [
edit protocols mpls label-switched-path lsp-name] hierarchy level, the LSP metric is fixed and will not change:[edit protocols mpls label-switched-path lsp-name]metricnumber;The LSP metric has several uses:
- When there are parallel LSPs with the same egress router, the metrics are compared to see which LSP has the lowest metric value (the lowest cost) and therefore the preferred path to the destination. If the metrics are the same, the traffic is shared.
Adjusting the metric values can force traffic to prefer some LSPs over others, regardless of the underlying IGP metric.
- When an IGP shortcut is enabled (see IGP Shortcuts), an IGP route might be installed in the routing table with an LSP as the next-hop, if the LSP is on the shortest path to the destination. In this case, the LSP metric is added to the other IGP metrics to determine the total path metric. For example, if an LSP whose ingress router is X and egress router is Y is on the shortest path to destination Z, the LSP metric is added to the metric for the IGP route from Y to Z to determine the total cost of the path. If several LSPs are potential next-hops, the total metrics of the paths are compared to determine which path is preferred (that is, has the lowest total metric). Or, IGP paths and LSPs leading to the same destination could be compared using the metric value to determine which path is preferred.
By adjusting the LSP metric, you can force traffic to prefer LSPs, to prefer the IGP path, or to share the load among them.
- If router X and Y are BGP peers, and if there is an LSP between them, the LSP metric represents the total cost to reach Y from X. If for any reason the LSP reroutes, the underlying path cost might change significantly, but X's cost to reach Y remains the same (the LSP metric), which allows X to report through BGP MED a stable metric to downstream neighbors. As long as Y remains reachable through the LSP, no changes are visible to downstream BGP neighbors.