< Home

Configuring DLDP

This section provides a sample of configuring DLDP using the edit-config method.

Table 1 Configuring DLDP

Operation

XPATH

edit-config

/huawei-dldp:dldp

Data Requirements

Table 2 Configuring DLDP

Item

Data

Description

DLDP function

true

Enable DLDP globally.

DLDP authentication mode

dldpAuthMD5

Set the DLDP authentication mode to dldpAuthMD5.

DLDP authentication password

huawei

Set the DLDP authentication password to huawei.

Type and number of an interface

GigabitEthernet0/0/1

Create the interface GE0/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</dldp:dldpPasswords>
				</dldp:dldpSys>
				<dldp:dldpInterfaces>
					<dldp:dldpInterface>
						<dldp:ifName>GigabitEthernet0/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>GigabitEthernet0/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>
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic