DLDP Management
This section describes the configuration model of DLDP management and provides examples of XML packets.
Data Model
The data model file matching DLDP management is huawei-dldp.yang.
Object |
Description |
Value |
Remarks |
---|---|---|---|
/huawei-dldp:dldp/dldpSys/dldpEnable |
Indicates whether to enable DLDP globally. |
The value is of the Boolean type:
The default value is false. |
N/A |
/huawei-dldp:dldp/dldpSys/dldpAuthMode |
Indicates the DLDP authentication mode. |
The value is of the enumerated type:
|
This object cannot be set to the enumerated value dldpAuthHMAC-SHA256. |
/huawei-dldp:dldp/dldpSys/dldpPasswords |
Indicates the DLDP authentication password. |
The value is a string of 6 to 16 case-sensitive characters in plain text and consists of at least two of the following: lowercase letters, uppercase letters, digits, and special characters excluding question marks (?) and spaces. |
This object is available when the value of dldpAuthMode is not dldpAuthNone. |
/huawei-dldp:dldp/dldpInterfaces/dldpInterface/ifName |
Indicates the type and number of an interface. |
The value is a character string. |
The interface must be a Layer 2 physical interface. |
/huawei-dldp:dldp/dldpInterfaces/dldpInterface/dldpEnable |
Indicates whether to enable DLDP on an interface. |
The value is of the Boolean type:
|
N/A |
Configuring DLDP
This section provides a sample of configuring DLDP using the edit-config method.
Operation |
XPATH |
---|---|
edit-config |
/huawei-dldp:dldp |
Data Requirements
Item |
Data |
Description |
---|---|---|
DLDP function |
true |
Enable DLDP globally. |
DLDP authentication mode |
dldpAuthMD5 |
Set the DLDP authentication mode to dldpAuthMD5. |
DLDP authentication password |
huawei@123 |
Set the DLDP authentication password to huawei@123. |
Type and number of an interface |
GigabitEthernet1/0/1 |
Create the interface GE1/0/1. |
Whether to enable DLDP on the interface |
true |
Enable DLDP on the interface. |
Interface type |
iana-if-type:ethernetCsmacd |
Set the interface type. |
Request Example
<?xml version="1.0" encoding="utf-8"?> <rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="5"> <edit-config> <target> <running/> </target> <config xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"> <dldp:dldp xmlns:dldp"http://www.huawei.com/netconf/vrp/huawei-dldp"> <dldp:dldpSys nc:operation="merge"> <dldp:dldpEnable>true</dldp:dldpEnable> <dldp:dldpAuthMode>dldpAuthMD5</dldp:dldpAuthMode> <dldp:dldpPasswords>huawei@123</dldp:dldpPasswords> </dldp:dldpSys> <dldp:dldpInterfaces> <dldp:dldpInterface> <dldp:ifName>GigabitEthernet1/0/1</dldp:ifName> <dldp:dldpEnable>true</dldp:dldpEnable> </dldp:dldpInterface> </dldp:dldpInterfaces> </dldp:dldp> <if:interfaces xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces"> <if:interface nc:operation="merge"> <if:name>GigabitEthernet1/0/1</if:name> <if:type xmlns:iana-if-type="urn:ietf:params:xml:ns:yang:iana-if-type">iana-if-type:ethernetCsmacd</if:type> </if:interface> </if:interfaces> </config> </edit-config> </rpc>
Response Example
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="2"> <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="183"> <rpc-error> <error-app-tag>-1</error-app-tag> <error-message>This interface does not support.</error-message> <error-info>Error on node /huawei-dldp:dldp/dldpInterfaces/dldpInterface[ifName="Eth-Trunk3"]</error-info> </rpc-error> </rpc-reply>