The segment-routing mpls command enables Segment Routing for an OSPF process.
The undo segment-routing mpls command disables Segment Routing for an OSPF process.
By default, Segment Routing is disabled for OSPF processes.
Usage Scenario
In Segment Routing implementation, an IGP is used to collect network-wide topology information and assign a label to each router. Therefore, Segment Routing must be enabled for the IGP. If OSPF is used as the IGP, run the segment-routing mpls command in the OSPF view to enable Segment Routing.
Prerequisites
Segment Routing has been enabled globally, and opaque LSA has been enabled using the opaque-capability enable command.
Precautions
Segment routing cannot work unless this configuration is done.