ip dns server address

Syntax

ip dns server-address[ vrf没有ip dns服务器地址[ vrf]

描述

Configures the DNS name servers that the DNS client queries to resolve DNS queries. Up to six name servers can be defined. The DNS client queries the servers in the order that they are defined. If no VRF is defined, the default VRF is used.

The没有form of this command removes a name server from the list.

Command context

config

Parameters

Specifies an IP address in IPv4 format (x.x.x.x), wherexis a decimal number from 0 to 255, or IPv6 format (xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx), wherexis a hexadecimal number from 0 to F.

vrf
Specifies a VRF name. Default: default.

Authority

Administrators or local user group members with execution rights for this command.

Examples

This example defines a name server at1.1.1.1.

switch(config)#ip dns server-address 1.1.1.1
This example defines a name server ata::1.
switch(config)#ip dns server-address a::1
This example removes a name server ata::1.
switch(config)#没有ip dns server-address a::1