ip dns

Configures the IPv4 Domain Name System (DNS).
Syntax
ip dns {domain-list domain-name | server-address ip-address [ip-address...]}
no ip dns {domain-list domain-name | server-address ip-address [ip-address... ]}
Command Default

IP DNS is not configured.

Parameters
domain-list
Configures a list of DNS domains.
domain-name
The domain name.
server-address
Configures the DNS server IPv4 address.
ip-address
The IPv4 address of the DNS server. You can configure up to a maximum of four IP addresses separated by a space.
Modes

Global configuration mode

Usage Guidelines

Once this command is enabled, syslog messages include the configured domain name. However, the initial syslogs generated during reboot do not contain a domain name.

The no form of the command removes the DNS configurations.

Examples

The following example shows how to configure an IPv4 address for a DNS server.

device(config)# ip dns server-address 192.168.10.1 192.168.100.1

The following example shows how to configure the DNS domain-list.

device(config)# ip dns domain-list company.com