Configuring DNS

This chapter contains the following sections:

Finding Feature Information

Your software release might not support all the features documented in this module. For the latest caveats and feature information, see the Bug Search Tool at https://tools.cisco.com/bugsearch/ and the release notes for your software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the "New and Changed Information"chapter or the Feature History table in this chapter.

Information About DNS Clients

DNS Client Overview

If your network devices require connectivity with devices in networks for which you do not control the name assignment, you can assign device names that uniquely identify your devices within the entire internetwork using the domain name server (DNS). DNS uses a hierarchical scheme for establishing host names for network nodes, which allows local control of the segments of the network through a client-server scheme. The DNS system can locate a network device by translating the hostname of the device into its associated IP address.

On the Internet, a domain is a portion of the naming hierarchy tree that refers to general groupings of networks based on the organization type or geography. Domain names are pieced together with periods (.) as the delimiting characters. For example, Cisco is a commercial organization that the Internet identifies by a com domain, so its domain name is cisco.com. A specific hostname in this domain, the File Transfer Protocol (FTP) system, for example, is identified as ftp.cisco.com.

DNS Name Servers

Name servers keep track of domain names and know the parts of the domain tree for which they have complete information. A name server may also store information about other parts of the domain tree. To map domain names to IP addresses in Cisco NX-OS, you must identify the hostnames, specify a name server, and enable the DNS service.

Cisco NX-OS allows you to statically map IP addresses to domain names. You can also configure Cisco NX-OS to use one or more domain name servers to find an IP address for a host name.

DNS Operation

A name server handles client-issued queries to the DNS server for locally defined hosts within a particular zone as follows:

  • An authoritative name server responds to DNS user queries for a domain name that is under its zone of authority by using the permanent and cached entries in its own host table. If the query is for a domain name that is under its zone of authority but for which it does not have any configuration information, the authoritative name server replies that no such information exists.

  • A name server that is not configured as the authoritative name server responds to DNS user queries by using information that it has cached from previously received query responses. If no router is configured as the authoritative name server for a zone, queries to the DNS server for locally defined hosts receive nonauthoritative responses.

Name servers answer DNS queries (forward incoming DNS queries or resolve internally generated DNS queries) according to the forwarding and lookup parameters configured for the specific domain.

High Availability for DNS Clients

Cisco NX-OS supports stateless restarts for the DNS client. After a reboot or supervisor switchover, Cisco NX-OS applies the running configuration.

Virtualization Support for DNS Clients

Cisco NX-OS supports multiple instances of the DNS clients that run on the same system. You can configure a DNS client in each virtual device connect (VDC).You can optionally have a different DNS client configuration in each virtual routing and forwarding (VRF) instance within a VDC. By default, Cisco NX-OS places you in the default VDC and default VRF unless you specifically configure another VDC and VRF. See the Cisco NX-OS Virtual Device Context Configuration Guide .

Prerequisites for DNS Clients

  • You must have a DNS name server on your network.

Guidelines and Limitations for DNS Clients

  • You configure the DNS client in a specific VRF. If you do not specify a VRF, Cisco NX-OS uses the default VRF.

  • Cisco NX-OS does not support underscore in a DNS name. Hence do not use underscore in a DNS name.

  • If you are familiar with the Cisco IOS CLI, be aware that the Cisco NX-OS commands for this feature might differ from the Cisco IOS commands that you would use.

Default Settings for DNS Client Parameters

The table below lists the default settings for DNS client parameters.

Table 1. Default DNS Client Parameters
Parameters Default

DNS client

Enabled

Configuring DNS Clients

Configuring the DNS Client

Before you begin

  • Ensure that you have a domain name server on your network.

  • Ensure that you are in the correct VDC (or use the switchto vdc command).

Procedure

  Command or Action Purpose

Step 1

switch# configure terminal

Enters global configuration mode.

Step 2

switch(config)# ip host name address1 [address2... address6]

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

Step 3

(Optional) switch(config)# ip domain-name name [use-vrf vrf-name]

(Optional)

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.

use-vrf is used as a DNS query supposed to be sending on a different VRF and listening for the reply on a different VRF. Example: DNS query is sent over VRF RED while the response should come on VRF Default.

Step 4

switch(config)# ip dns source-interface [loopback X different interface]

Defines what will be the source IP for the DNS Query which will be sent out. When DNS server tries to answer back, it will use the Loopback0 as the destination and there should be a valid return route.

Step 5

(Optional) switch(config)# ip domain-list name [use-vrf vrf-name]

(Optional)

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.

Step 6

(Optional) switch(config)# ip name-server address1 [address2... address6] [ use-vrf vrf-name]

(Optional)

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.

Step 7

(Optional) switch(config)# ip domain-lookup

(Optional)

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

Step 8

(Optional) switch(config)# show hosts

(Optional)

Displays information about DNS.

Step 9

(Optional) switch(config)# copy running-config startup-config

(Optional)

Saves the change persistently through reboots and restarts by copying the running configuration to the startup configuration.

Verifying the DNS Client Configuration

To display the DNS client configuration, perform the following task:

Command Purpose
show hosts

Displays information about DNS.

Configuration Examples for DNS Clients

This example shows how to establish a domain list with several alternate domain names:

ip domain list csi.com
ip domain list telecomprog.edu
ip domain list merit.edu

This example shows how to configure the hostname-to-address mapping process and specify IP DNS-based translation. The example also configures the addresses of the name servers and the default domain name.

ip domain lookup
ip name-server 192.168.1.111 192.168.1.2
ip domain name cisco.com

Related Documents for DNS Clients

Related Topic

DNS Client CLI commands

Cisco Nexus 7000 Series NX-OS Unicast Routing Command Reference

VDCs and VRFs

Cisco Nexus 7000 Series NX-OS Virtual Device Context Configuration Guide, Release 5.x

Standards for DNS Clients

No new or modified standards are supported by this feature, and support for existing standards has not been modified by this feature.

Feature History for DNS

This table includes only the updates for those releases that have resulted in additions or changes to the feature.

Feature Name

Release

Feature Information

DNS

4.0(1)

This feature was introduced.