No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

S600-E V200R011C10 NETCONF YANG API Reference

This document describes the NETCONF API functions supported by the switch, including the data model and samples.
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
DNS Management

DNS Management

This section describes the configuration model of DNS and provides examples of XML packets.

Data Model

The configuration model file matching DNS is ietf-system.yang.

Table 2-164  DNS server configuration

Object

Description

Value Remarks

/ietf-system:system/dns-resolver/server/transport/udp-and-tcp/address

Indicates the IP address of a DNS server.

The value is an IPv4 address in dotted decimal notation.

N/A

Configuring DNS

This section provides a sample of configuring DNS using the edit-config:merge method.

Table 2-165  Configuring DNS

Operation

XPATH

edit-config:merge

/ietf-system:system/dns-resolver

Data Requirements

Table 2-166  Configuring DNS

Item

Data

Description

DNS server name

t2

-

DNS server address.

192.168.1.5

-

Request Example

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="1" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <sys:system xmlns:sys="urn:ietf:params:xml:ns:yang:ietf-system">
        <sys:dns-resolver>
          <sys:server>
            <sys:name>t2</sys:name>
            <sys:udp-and-tcp>
              <sys:address>192.168.1.5</sys:address>
            </sys:udp-and-tcp>
          </sys:server>
        </sys:dns-resolver>
      </sys:system>
    </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="35">
  <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="36">
  <rpc-error>
    <error-type>application</error-type>
    <error-tag>operation-failed</error-tag>
    <error-severity>error</error-severity>
    <error-message>parse rpc config error.</error-message>
  </rpc-error>
</rpc-reply>
Translation
Download
Updated: 2019-03-30

Document ID: EDOC1000178028

Views: 4489

Downloads: 0

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next