Assigning a Metric to the LSP

The user can assign a metric to the LSP, which can be used by routing protocols to determine the relative preference among several LSPs towards a given destination.

To assign a metric of five to LSP 'tunnel1', complete the following steps.
  1. Enable the device for configuration.
    device# configure
  2. Enable the MPLS router.
    device(config)# router mpls
  3. Enable and configure the label switched path (LSP).
    device(config-rouoter-mpls)# lsp tunnel1
    In this example, the selected LSP is named tunnel1.
  4. Assign a metric of five to LSP tunnel1.
    device(config-router-mpls-lsp-tunnel1)# metric 5

Example

the following example shows assigning a metric value of 5 to LSP tunnel1.

device# configure 
device(config)# router mpls
device(config-router-mpls)# lsp tunnel1
device(config-router-mpls-lsp-tunnel1)# metric 5

By default, all LSPs have a metric of one. A lower metric is preferred over a higher one. When multiple LSPs have the same destination LSR, and they have the same metric, the traffic load is shared among them.