The segment-list command references a segment list configured for the candidate path of an SR-MPLS TE Policy.
The undo segment-list command deletes segment list reference configuration.
By default, a segment list configured for the candidate path of an SR-MPLS TE Policy is not referenced.
Parameter | Description | Value |
---|---|---|
list-name |
Specifies a segment list name. The segment list must have been created using the segment-list command in the segment routing view. |
The value is a string of 1 to 31 case-sensitive characters. When double quotation marks are used around the string, spaces are allowed in the string. |
weight weight-value |
Weight value of the segment list. If the weight configured for a segment list of a candidate path is less than the average weight, the segment list does not forward traffic. (Average weight = Sum of weights configured for all segment lists of a candidate path/Maximum number of segment lists that can be used by the involved device for load balancing). For example, if a maximum of M segment lists can be used by a device for load balancing and a candidate path has a total of N segment lists, the average weight of the N segment lists is calculated as follows: (Weight 1 + Weight 2 + ... + Weight N)/M = X. Segment lists whose weights are less than X do not forward traffic. |
The value is an integer that ranges from 0 to 4294967295. The default value is 1. |
Usage Scenario
After configuring a segment list for the candidate path of an SR-MPLS TE Policy, you can run the segment-list command in the candidate path view to reference the segment list. This enables traffic to be forwarded through the segment list if the candidate path is preferentially selected.
<HUAWEI> system-view [~HUAWEI] segment-routing [*HUAWEI-segment-routing] sr-te policy policy1 endpoint 1.1.1.1 color 100 [*HUAWEI-segment-routing-te-policy-policy1] candidate-path preference 100 [*HUAWEI-segment-routing-te-policy-policy1-path] segment-list list1 weight 1 <HUAWEI> system-view [~HUAWEI] segment-routing [*HUAWEI-segment-routing] sr-te policy policy1 endpoint 1.1.1.1 color 100 [*HUAWEI-segment-routing-te-policy-policy1] candidate-path preference 100 [*HUAWEI-segment-routing-te-policy-policy1-path] segment-list list1