This section provides a sample of configuring a remote LDP session using the edit-config method.
Operation |
XPATH |
|---|---|
edit-config |
|
Item |
Data |
|---|---|
LSR ID |
10.1.1.1 |
Whether MPLS is enabled globally |
true |
Whether LDP is enabled globally |
true |
VRF name |
_public_ |
Name of a remote peer |
LSRC |
IP address of a remote MPLS LDP peer |
10.2.1.1 |
<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="11" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<edit-config>
<target>
<running/>
</target>
<config>
<mpls:mpls xmlns:mpls="http://www.huawei.com/netconf/vrp/huawei-mpls">
<mpls:mplsCommon>
<mpls:mplsCommonCfg>
<mpls:mplsLsrID>10.1.1.1</mpls:mplsLsrID>
<mpls:mplsEnable>true</mpls:mplsEnable>
<mpls:ldpEnable>true</mpls:ldpEnable>
</mpls:mplsCommonCfg>
</mpls:mplsCommon>
<mpls:mplsLdp>
<mpls:ldpInstances>
<mpls:ldpInstance>
<mpls:vrfName>_public_</mpls:vrfName>
<mpls:ldpRemotePeers>
<mpls:ldpRemotePeer>
<mpls:remotePeerName>LSRC</mpls:remotePeerName>
<mpls:remoteIp>10.2.1.1</mpls:remoteIp>
</mpls:ldpRemotePeer>
</mpls:ldpRemotePeers>
</mpls:ldpInstance>
</mpls:ldpInstances>
</mpls:mplsLdp>
</mpls:mpls>
</config>
</edit-config>
</rpc>
Sample of successful response
<?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="11"> <ok/> </rpc-reply>
Sample of failed response
<?xml version='1.0' encoding='UTF-8'?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="4">
<rpc-error>
<error-app-tag>-1</error-app-tag>
<error-message>The remotePeerName has already existed.</error-message>
<error-info>Error on node /huawei-mpls:mpls/mplsLdp/ldpInstances/ldpInstance[vrfName="_public_"]/ldpRemotePeers/ldpRemotePeer[remotePeerName="LSRC"]</error-info>
</rpc-error>
</rpc-reply>