mapping-server prefix-sid-mapping

Function

The mapping-server prefix-sid-mapping command configures mapping between a specific or multiple pairs of prefixes and SIDs.

The undo mapping-server prefix-sid-mapping command deletes mapping between a specific or multiple pairs of prefixes and SIDs.

By default, no mapping between prefixes and SIDs is configured.

Format

mapping-server prefix-sid-mapping prefix-value mask-len-value sid-value [ range range-value ] [ attached ]

undo mapping-server prefix-sid-mapping [ prefix-value mask-len-value [ sid-value [ range range-value ] [ attached ] ] ]

Parameters

Parameter Description Value
prefix-value

Specifies the IP prefix.

The value is in dotted decimal notation.

mask-len-value

Specifies the length of IP prefix.

The value is an integer ranging from 0 to 32.Only the 32-bit mask length is supported currently.

sid-value

Specifies the start of SID index range.

The value is an integer ranging from 0 to 65534.

range range-value

Specifies the number of successive SIDs to be assigned.

The value is an integer ranging from 1 to 65535.

attached

Indicates whether the mapped prefix belongs to a local directly connected network.

-

Views

Segment routing view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
segr write

Usage Guidelines

Usage Scenario

In LDP and SR interworking scenarios, if SR is not supported on the LDP side, run the mapping-server prefix-sid-mapping command on an SR device to map the LDP prefixes to SIDs and advertise the mapping to the SR domain. This command is run on a mapping server.

Precautions

The Mapping SID is assigned to the IP address prefix with 32-bit mask only.

Example

# Configure mapping between two pairs of prefixes and SIDs. Assuming the SRGB range is 16000 to 23999, prefixes 10.1.1.1/32 and 10.1.1.2/32 are assigned SIDs 16010 and 16011, respectively.
<HUAWEI> system-view
[~HUAWEI] segment-routing
[*HUAWEI-segment-routing] mapping-server prefix-sid-mapping 10.1.1.1 32 10 range 2 attached
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >