ip dns server address
Syntax
ip dns server-address <IP-ADDR> [ vrf <VRF-NAME> ]
no ip dns server-address <IP-ADDR> [ vrf <VRF-NAME> ]
Description
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
no
form of this command removes a name server from the list.
Command context
config
Parameters
<IP-ADDR>
Specifies an IP address in IPv4 format (
x.x.x.x
), wherex
is a decimal number from 0 to 255, or IPv6 format (xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx
), wherex
is a hexadecimal number from 0 to F.vrf <VRF-NAME>
- 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 at 1.1.1.1.
switch(config)# ip dns server-address 1.1.1.1This example defines a name server at a::1.
switch(config)# ip dns server-address a::1This example removes a name server at a::1.
switch(config)# no ip dns server-address a::1