Configuring DNS

Using the NX-API REST, you can enable DNS configuration that would be enabled by the following CLI commands:

ip domain-lookup <CR>
ip domain-name <default domain name> [use-vrf <vrf-name>] <CR>
ip domain-list [use-vrf <vrf-name>] <CR>
ip name-server [<IPv4|IPv6 address>] use-vrf <vrf-name> <CR>
ip host <name> <IPv4 address>
ipv6 host <IPv6 address>

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference: http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html


CLI Commands

“ip domain-list”, “ip domain-name”, and “ip name-server” are supported under non-default (i.e. user specified) VRF mode as well as VRF “default” mode. The other commands mentioned in this document are supported under default VRF only and the value must be “default” for them when specifying dns:Prof.name.

“default” VRF
ip domain-name <name>
ip domain-list <name>
ip name-server <addr>

non-default VRF
vrf context <vrf>
ip domain-name <name>
ip domain-list <name>
ip name-server <addr>

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference: http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

Enabling DNS

Enabling DNS
POST http://<IP_Address>/api/mo/sys/dns.json 
{
  "topSystem": {
    "children": [
      {
        "dnsEntity": {
          "attributes": {
            "adminSt": "enabled"
}}}]}}
{
    imdata": []
}
<System>
  <dns-items>
    <adminSt>enabled</adminSt>
  </dns-items>
</System>

Enables DNS-based address translation. This feature is enabled by default.


CLI Commands

The CLI commands and options listed below are the equivalent to the payload example displayed in the pane on the right.

ip domain-lookup

Note: The property information for this example was added in Release 9.3(3).


Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
topSystem sys
dnsEntity sys/dns


dnsEntity Properties

The following table contains information about the dnsEntity properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
adminStnw:AdminSt
(scalar:Enum8)
The administrative state of the object or policy.SELECTION:
1 - enabled
2 - disabled
DEFAULT: enabled


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Disabling DNS

Disabling DNS
POST http://<IP_Address>/api/mo/sys/dns.json
{
  "topSystem": {
    "children": [
      {
        "dnsEntity": {
          "attributes": {
            "adminSt": "disabled"
}}}]}}
{
    imdata": []
}
<System>
  <dns-items>
    <adminSt>disabled</adminSt>
  </dns-items>
</System>

Enables DNS-based address translation. This feature is enabled by default.


CLI Commands

The CLI commands and options listed below are the equivalent to the payload example displayed in the pane on the right.

no ip domnewDomain-lookup

Note: The property information for this example was added in Release 9.3(3).


Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
topSystem sys
dnsEntity sys/dns


dnsEntity Properties

The following table contains information about the dnsEntity properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
adminStnw:AdminSt
(scalar:Enum8)
The administrative state of the object or policy.SELECTION:
1 - enabled
2 - disabled
DEFAULT: enabled


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Defining the Default Domain Name

Defining the Default Domain Name
POST http://<IP_Address>/api/mo/sys/dns.json
{
"dnsEntity": {
  "children": [
    {
      "dnsProf": {
        "attributes": {
          "name": "default"
        },
        "children": [
          {
            "dnsDom": {
              "attributes": {
                "name": "newDom"
}}}]}}]}}
{
    imdata": []
}
<System>
  <dns-items>
    <prof-items>
      <Prof-list>
        <name>default</name>
        <dom-items>
          <name>newDom</name>
        </dom-items>
      </Prof-list>
    </prof-items>
  </dns-items>
</System>

Defines the default domain name that Cisco NX-OS uses to complete unqualified host names. You can optionally define a VRF that Cisco NX-OS uses to resolve this domain name if it cannot be resolved in the VRF that you configured this domain name under.

Cisco NX-OS appends the default domain name to any hostname that does not contain a complete domain name before starting a domain-name lookup.


CLI Commands

The CLI commands and options listed below are the equivalent to the payload example displayed in the pane on the right.

ip domain-name newDom

Note: The property information for this example was added in Release 9.3(3).


Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
dnsEntity sys/dns
dnsProf sys/dns/prof-{[name]}
dnsDom sys/dns/prof-{[name]}/vrf-{[name]}/dom


dnsProf Properties

The following table contains information about the dnsProf properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
namepol:ObjName
(naming:Name256)
Object name
MAX SIZE: 64


dnsDom Properties

The following table contains information about the dnsDom properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
namepol:ObjName
(naming:Name256)
Object name
MAX SIZE: 64


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Defining Additional Domain Names

Defining Additional Domain Names
POST http://<IP_Address>/api/mo/sys/dns.json
{
"dnsEntity": {
  "children": [
    {
      "dnsProf": {
        "attributes": {
          "name": "default"
        },
        "children": [
          {
            "dnsDomExt": {
              "attributes": {
                "name": "newList"
}}}]}}]}}
{
    imdata": []
}
<System>
  <dns-items>
    <prof-items>
      <Prof-list>
        <name>default</name>
        <domext-items>
          <DomExt-list>
            <name>newList</name>
          </DomExt-list>
        </domext-items>
      </Prof-list>
    </prof-items>
  </dns-items>
</System>

Defines additional domain names that Cisco NX-OS can use to complete unqualified hostnames. You can optionally define a VRF that Cisco NX-OS uses to resolve these domain names if they cannot be resolved in the VRF that you configured this domain name under.

Cisco NX-OS uses each entry in the domain list to append that domain name to any hostname that does not contain a complete domain name before starting a domain-name lookup. Cisco NX-OS continues this process for each entry in the domain list until it finds a match.


CLI Commands

The CLI commands and options listed below are the equivalent to the payload example displayed in the pane on the right.

ip domain-list newList

Note: The property information for this example was added in Release 9.3(3).


Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
dnsEntity sys/dns
dnsProf sys/dns/prof-{[name]}
dnsDomExt sys/dns/prof-{[name]}/vrf-{[name]}/domext-{[name]}


dnsProf Properties

The following table contains information about the dnsProf properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
namepol:ObjName
(naming:Name256)
Object name
MAX SIZE: 64


dnsDomExt Properties

The following table contains information about the dnsDomExt properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
namepol:ObjName
(naming:Name256)
Object name
MAX SIZE: 64


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Defining IPv4 Name Servers

Defining IPv4 Name Servers 
POST http://<IP_Address>/api/mo/sys/dns.json
{
"dnsEntity": {
  "children": [
    {
      "dnsProf": {
        "attributes": {
          "name": "default"
        },
        "children": [
          {
            "dnsProvider": {
              "attributes": {
                "addr": "128.66.0.0"
}}}]}}]}}
{
    imdata": []
}
<System>
  <dns-items>
    <prof-items>
      <Prof-list>
        <name>default</name>
        <prov-items>
          <Provider-list>
            <addr>128.66.0.0</addr>
          </Provider-list>
        </prov-items>
      </Prof-list>
    </prof-items>
  </dns-items>
</System>

Defines up to six name servers. The address can be either an IPv4 address or an IPv6 address.

You can optionally define a VRF that Cisco NX-OS uses to reach this name server if it cannot be reached in the VRF that you configured this name server under.


CLI Commands

The CLI commands and options listed below are the equivalent to the payload example displayed in the pane on the right.

ip name-server 128.66.0.0

Note: The property information for this example was added in Release 9.3(3).


Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
dnsEntity sys/dns
dnsProf sys/dns/prof-{[name]}
dnsProvider sys/dns/prof-{[name]}/vrf-{[name]}/prov-{[addr]}


dnsProf Properties

The following table contains information about the dnsProf properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
namepol:ObjName
(naming:Name256)
Object name
MAX SIZE: 64


dnsProvider Properties

The following table contains information about the dnsProvider properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
addraddress:Ip
IP address of the providerValue must match ipv4 or ipv6 known format


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Defining IPv6 Name Servers

Defining IPv6 Name Servers 
POST http://<IP_Address>/api/mo/sys/dns.json
{
"dnsEntity": {
  "children": [
    {
      "dnsProf": {
        "attributes": {
          "name": "default"
        },
        "children": [
          {
            "dnsProvider": {
              "attributes": {
                "addr": "2001:db8::"
}}}]}}]}}
{
    imdata": []
}
<System>
  <dns-items>
    <prof-items>
      <Prof-list>
        <name>default</name>
        <prov-items>
          <Provider-list>
            <addr>2001:db8::</addr>
          </Provider-list>
        </prov-items>
      </Prof-list>
    </prof-items>
  </dns-items>
</System>

Defines up to six name servers. The address can be either an IPv4 address or an IPv6 address.

You can optionally define a VRF that Cisco NX-OS uses to reach this name server if it cannot be reached in the VRF that you configured this name server under.


CLI Commands

The CLI commands and options listed below are the equivalent to the payload example displayed in the pane on the right.

ip name-server 2001:DB8::0

Note: The property information for this example was added in Release 9.3(3).


Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
dnsEntity sys/dns
dnsProf sys/dns/prof-{[name]}
dnsProvider sys/dns/prof-{[name]}/vrf-{[name]}/prov-{[addr]}


dnsProf Properties

The following table contains information about the dnsProf properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
namepol:ObjName
(naming:Name256)
Object name
MAX SIZE: 64


dnsProvider Properties

The following table contains information about the dnsProvider properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
addraddress:Ip
IP address of the providerValue must match ipv4 or ipv6 known format


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Defining Static IPv4 Hostname-to-Address Mappings

Defining Static IPv4 Hostname-to-Address Mappings 
POST http://<IP_Address>/api/mo/sys/dns.json
  
{
"dnsEntity": {
  "children": [
    {
      "dnsProf": {
        "attributes": {
          "name": "default"
        },
        "children": [
          {
            "dnsHost": {
              "attributes": {
                "name": "test"
              },
              "children": [
                {
                  "dnsIpv4Host": {
                    "attributes": {
                      "addr": "128.66.0.0"
}}}]}}]}}]}}       
{
    imdata": []
}
<System>
  <dns-items>
    <prof-items>
      <Prof-list>
        <name>default</name>
        <host-items>
          <Host-list>
            <name>test</name>
            <ipv4host-items>
              <addr>128.66.0.0</addr>
            </ipv4host-items>
          </Host-list>
        </host-items>
      </Prof-list>
    </prof-items>
  </dns-items>
</System>

Defines static hostname-to-address mappings in the hostname cache. The address can be either an IPv4 address or an IPv6 address.


CLI Commands

The CLI commands and options listed below are the equivalent to the payload example displayed in the pane on the right.

ip host test 128.66.0.0

Note: The property information for this example was added in Release 9.3(3).


Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
dnsEntity sys/dns
dnsProf sys/dns/prof-{[name]}
dnsHost sys/dns/prof-{[name]}/host-{name}
dnsIpv4Host sys/dns/prof-{[name]}/host-{name}/ipv4host


dnsProf Properties

The following table contains information about the dnsProf properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
namepol:ObjName
(naming:Name256)
Object name
MAX SIZE: 64


dnsHost Properties

The following table contains information about the dnsHost properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
namestring:Basic
Host NameA sequence of characters


dnsIpv4Host Properties

The following table contains information about the dnsIpv4Host properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
addraddress:IPv4
IPv4 Address Of HostnameValue must match ipv4 format


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Defining IPv6 Static Hostname-to-Address Mappings

Defining IPv6 Static Hostname-to-Address Mappings
POST http://<IP_Address>/api/mo/sys/dns.json
{
"dnsEntity": {
  "children": [
    {
      "dnsProf": {
        "attributes": {
          "name": "default"
        },
        "children": [
          {
            "dnsHost": {
              "attributes": {
                "name": "test6"
              },
              "children": [
                {
                  "dnsIpv6Host": {
                    "attributes": {
                      "addr": "2001:db8::"
}}}]}}]}}]}}       
{
    imdata": []
}
<System>
  <dns-items>
    <prof-items>
      <Prof-list>
        <name>default</name>
        <host-items>
          <Host-list>
            <name>test6</name>
            <ipv6host-items>
              <addr>2001:db8::</addr>
            </ipv6host-items>
          </Host-list>
        </host-items>
      </Prof-list>
    </prof-items>
  </dns-items>
</System>

Defines static hostname-to-address mappings in the hostname cache. The address can be either an IPv4 address or an IPv6 address.


CLI Commands

The CLI commands and options listed below are the equivalent to the payload example displayed in the pane on the right.

ipv6 host test6 2001:DB8::0

Note: The property information for this example was added in Release 9.3(3).


Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
dnsEntity sys/dns
dnsProf sys/dns/prof-{[name]}
dnsHost sys/dns/prof-{[name]}/host-{name}
dnsIpv6Host sys/dns/prof-{[name]}/host-{name}/ipv6host


dnsProf Properties

The following table contains information about the dnsProf properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
namepol:ObjName
(naming:Name256)
Object name
MAX SIZE: 64


dnsHost Properties

The following table contains information about the dnsHost properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
namestring:Basic
Host NameA sequence of characters


dnsIpv6Host Properties

The following table contains information about the dnsIpv6Host properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
addraddress:IPv6
IPv6 Address Of HostnameValue must match ipv6 format


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Configuring a Name for the IPv4 Host

Configuring a Name for the IPv4 Host
POST http://<mgmt0_IP>/api/mo/sys/dns.json
{
  "dnsEntity": {
    "children": [
      {
        "dnsProf": {
          "attributes": {
            "name": "default"
          },
          "children": [
            {
              "dnsHost": {
                "attributes": {
                  "name": "Name_1"
                },
                "children": [
                  {
                    "dnsIpv4Host": {
                      "attributes": {
                        "addr": "1.2.3.4"
}}}]}}]}}]}}
{
    "imdata": []
}
<System>
  <dns-items>
    <prof-items>
      <Prof-list>
        <name>default</name>
        <host-items>
          <Host-list>
            <name>Name_1</name>
            <ipv4host-items>
              <addr>1.2.3.4</addr>
            </ipv4host-items>
          </Host-list>
        </host-items>
      </Prof-list>
    </prof-items>
  </dns-items>
</System>


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

ip host Name_1 1.2.3.4

Note: The property information for this example was added in Release 9.3(3).


Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
dnsEntity sys/dns
dnsProf sys/dns/prof-{[name]}
dnsHost sys/dns/prof-{[name]}/host-{name}
dnsIpv4Host sys/dns/prof-{[name]}/host-{name}/ipv4host


dnsProf Properties

The following table contains information about the dnsProf properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
namepol:ObjName
(naming:Name256)
Object name
MAX SIZE: 64


dnsHost Properties

The following table contains information about the dnsHost properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
namestring:Basic
Host NameA sequence of characters


dnsIpv4Host Properties

The following table contains information about the dnsIpv4Host properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
addraddress:IPv4
IPv4 Address Of HostnameValue must match ipv4 format


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Deleting a Name for the IPv4 Host

Deleting a Name for the IPv4 Host
POST http://<mgmt0_IP>/api/mo/sys/dns.json
{
  "dnsEntity": {
    "children": [
      {
        "dnsProf": {
          "attributes": {
            "name": "default"
          },
          "children": [
            {
              "dnsHost": {
                "attributes": {
                  "name": "Name_1"
                },
                "children": [
                  {
                    "dnsIpv4Host": {
                      "attributes": {
                        "status": "deleted"
}}}]}}]}}]}}
{
    "imdata": []
}
<System>
  <dns-items>
    <prof-items>
      <Prof-list>
        <name>default</name>
        <host-items>
          <Host-list>
            <name>Name_1</name>
            <ipv4host-items xc:operation="delete">
            </ipv4host-items>
          </Host-list>
        </host-items>
      </Prof-list>
    </prof-items>
  </dns-items>
</System>


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

no ip host Name_1 1.2.3.4

Note: The property information for this example was added in Release 9.3(3).


Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
dnsEntity sys/dns
dnsProf sys/dns/prof-{[name]}
dnsHost sys/dns/prof-{[name]}/host-{name}
dnsIpv4Host sys/dns/prof-{[name]}/host-{name}/ipv4host


dnsProf Properties

The following table contains information about the dnsProf properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
namepol:ObjName
(naming:Name256)
Object name
MAX SIZE: 64


dnsHost Properties

The following table contains information about the dnsHost properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
namestring:Basic
Host NameA sequence of characters


dnsIpv4Host Properties

The following table contains information about the dnsIpv4Host properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
statusmo:ModificationStatus
(scalar:Bitmask32)
The upgrade status. This property is for internal use only.SELECTION:
2 - created
4 - modified
8 - deleted
16 - replaced


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Configuring a Name for the IPv6 Host

Configuring a Name for the IPv6 Host
POST http://<mgmt0_IP>/api/mo/sys/dns.json
{
  "dnsEntity": {
    "children": [
      {
        "dnsProf": {
          "attributes": {
            "name": "default"
          },
          "children": [
            {
              "dnsHost": {
                "attributes": {
                  "name": "Name_1"
                },
                "children": [
                  {
                    "dnsIpv6Host": {
                      "attributes": {
                        "addr": "1:2::3:4"
}}}]}}]}}]}}
{
    "imdata": []
}
<System>
  <dns-items>
    <prof-items>
      <Prof-list>
        <name>default</name>
        <host-items>
          <Host-list>
            <name>Name_1</name>
            <ipv6host-items>
              <addr>1:2::3:4</addr>
            </ipv6host-items>
          </Host-list>
        </host-items>
      </Prof-list>
    </prof-items>
  </dns-items>
</System>


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

ipv6 host Name_1 1:2::3:4

Note: The property information for this example was added in Release 9.3(3).


Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
dnsEntity sys/dns
dnsProf sys/dns/prof-{[name]}
dnsHost sys/dns/prof-{[name]}/host-{name}
dnsIpv6Host sys/dns/prof-{[name]}/host-{name}/ipv6host


dnsProf Properties

The following table contains information about the dnsProf properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
namepol:ObjName
(naming:Name256)
Object name
MAX SIZE: 64


dnsHost Properties

The following table contains information about the dnsHost properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
namestring:Basic
Host NameA sequence of characters


dnsIpv6Host Properties

The following table contains information about the dnsIpv6Host properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
addraddress:IPv6
IPv6 Address Of HostnameValue must match ipv6 format


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Deleting a Name for the IPv6 Host

Deleting a Name for the IPv6 Host
POST http://<mgmt0_IP>/api/mo/sys/dns.json
{
  "dnsEntity": {
    "children": [
      {
        "dnsProf": {
          "attributes": {
            "name": "default"
          },
          "children": [
            {
              "dnsHost": {
                "attributes": {
                  "name": "Name_1"
                },
                "children": [
                  {
                    "dnsIpv6Host": {
                      "attributes": {
                        "status": "deleted"
}}}]}}]}}]}}
{
    "imdata": []
}
<System>
  <dns-items>
    <prof-items>
      <Prof-list>
        <name>default</name>
        <host-items>
          <Host-list>
            <name>Name_1</name>
            <ipv6host-items xc:operation="delete">
            </ipv6host-items>
          </Host-list>
        </host-items>
      </Prof-list>
    </prof-items>
  </dns-items>
</System>


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

no ipv6 host Name_1 1:2::3:4

Note: The property information for this example was added in Release 9.3(3).


Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
dnsEntity sys/dns
dnsProf sys/dns/prof-{[name]}
dnsHost sys/dns/prof-{[name]}/host-{name}
dnsIpv6Host sys/dns/prof-{[name]}/host-{name}/ipv6host


dnsProf Properties

The following table contains information about the dnsProf properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
namepol:ObjName
(naming:Name256)
Object name
MAX SIZE: 64


dnsHost Properties

The following table contains information about the dnsHost properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
namestring:Basic
Host NameA sequence of characters


dnsIpv6Host Properties

The following table contains information about the dnsIpv6Host properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
statusmo:ModificationStatus
(scalar:Bitmask32)
The upgrade status. This property is for internal use only.SELECTION:
2 - created
4 - modified
8 - deleted
16 - replaced


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html