igp metric (SRv6 TE Policy view)

Function

The igp metric command configures a metric for an SRv6 TE Policy involved in SPF computation performed using the IGP shortcut and forwarding adjacency functions.

The undo igp metric command restores the default settings.

By default, the SRv6 TE Policy metric is equal to the IGP metric minus 1.

Format

igp metric { relative relativeValue | absolute absoluteValue }

undo igp metric [ relative relativeValue | absolute absoluteValue ]

Parameters

Parameter Description Value
relative relativeValue

Specifies the relative metric mode.

The relativeValue is an integer ranging from -10 to 10 and is the offset between SRv6 TE Policy metric and an IGP metric. The default value is -1.

absolute absoluteValue

Specifies the absolute metric mode.

The absoluteValue is an integer ranging from 1 to 65535.

Views

SRv6 TE policy view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
srpolicy write

Usage Guidelines

Usage Scenario

This command is used to configure an IGP metric for an SRv6 TE Policy.

You can specify the metric of an SRv6 TE Policy involved in path computation performed using the IGP shortcut function.

If an absolute metric is used, the metric of the SRv6 TE Policy is the configured metric.

If a relative metric is used, the metric of the SRv6 TE Policy is the sum of the corresponding IGP path metric and the relative metric.

Example

# Set SRv6 TE Policy metric to a value equal an IGP metric minus 5 during SPF calculation.
<HUAWEI> system-view
[~HUAWEI] segment-routing ipv6
[*HUAWEI-segment-routing-ipv6] srv6-te policy a1 endpoint 2001:DB8:1::2 color 1
[*HUAWEI-segment-routing-ipv6-policy-a1] igp metric relative -5
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >