The mpls ldp auto-config command enables MPLS LDP automatic configuration on all OSPF interfaces which can establish OSPF neighbor relationships in a specified OSPF process.
The undo mpls ldp auto-config command disables the function.
By default, MPLS LDP automatic configuration is disabled on OSPF interfaces.
Usage Scenario
To configure MPLS LDP on an OSPF interface, enable MPLS LDP globally first and then on the interface. If a large number of interfaces need MPLS LDP, configure them one by one, which is time-consuming and prone to configuration incorrectness. To address this issue, run the mpls ldp auto-config command in the OSPF view. After the mpls ldp auto-config command is run, MPLS LDP is enabled automatically on all OSPF-capable interfaces, which simplifies configurations. If you want to disable MPLS LDP automatic configuration, run the undo mpls ldp auto-config command.
Precautions
After the mpls ldp auto-config command is run for an OSPF process, MPLS LDP is enabled automatically on all interfaces which can establish OSPF neighbor relationships in the OSPF process. If you want to disable MPLS LDP from an interface, run the ospf mpls ldp auto-config disable command in the interface view.