Skip to content

DNS

DNS configuration manages domain name lookup, the default domain name, the domain search list, name servers and static host entries for hostname resolution on NX-OS devices. Domain names, domain lists and name servers can also be configured per VRF (ip domain-name|domain-list|name-server ... use-vrf <vrf>).

DNS configuration manages domain name lookup and the default domain name for hostname resolution on NX-OS devices.

NameTypeConstraintMandatoryDefault Value
devicesListdevicesNo
device_groupsListdevice_groupsNo
globalClassglobalNo
templatesListtemplatesNo

NameTypeConstraintMandatoryDefault Value
configurationClassconfigurationNo

NameTypeConstraintMandatoryDefault Value
configurationClassconfigurationNo

NameTypeConstraintMandatoryDefault Value
configurationClassconfigurationNo

NameTypeConstraintMandatoryDefault Value
configurationClassconfigurationNo

NameTypeConstraintMandatoryDefault Value
dnsClassdnsNo

NameTypeConstraintMandatoryDefault Value
domain_lookupBooleantrue, falseNo
domain_nameStringNo
domain_listsListStringNo
name_serversListname_serversNo
hostsListhostsNo
vrfsListvrfsNo

NameTypeConstraintMandatoryDefault Value
domain_lookupBooleantrue, falseNo
domain_nameStringNo

name_servers (nxos.devices.configuration.dns)

Section titled “name_servers (nxos.devices.configuration.dns)”
NameTypeConstraintMandatoryDefault Value
ipIPYes
source_interface_typeChoiceethernet, loopback, mgmt, port-channel, vlan, vniNo
source_interface_idAnyString or Integer[min: 0]No

NameTypeConstraintMandatoryDefault Value
nameStringYes
ip_addressIPNo
ipv6_addressIPNo

NameTypeConstraintMandatoryDefault Value
vrfStringYes
domain_nameStringNo
domain_listsListStringNo
name_serversListname_serversNo

Example 1: DNS domain lookup with default domain

nxos:
devices:
- name: LEAF1
configuration:
dns:
domain_lookup: true
domain_name: example.com

Example 2: DNS with name servers, domain list, static hosts and per-VRF settings

nxos:
devices:
- name: LEAF1
configuration:
dns:
domain_lookup: true
domain_name: example.com
domain_lists:
- example.net
- example.org
name_servers:
- ip: 10.1.1.1
source_interface_type: mgmt
source_interface_id: 0
- ip: 2001:db8::53
hosts:
- name: server1
ip_address: 10.2.2.2
ipv6_address: 2001:db8::2
vrfs:
- vrf: management
domain_name: mgmt.example.com
domain_lists:
- mgmt.example.net
name_servers:
- ip: 10.3.3.3

Example 1: DNS domain lookup with default domain

nxos:
devices:
- name: LEAF1
configuration:
dns:
domain_lookup: true
domain_name: example.com